formatting

This commit is contained in:
jacob 2025-07-09 11:38:22 -05:00
parent 0a3e9adcbd
commit 5dd56dea5c
4 changed files with 10 additions and 11 deletions

View File

@ -806,4 +806,5 @@ void bitbuff_test(void)
scratch_end(scratch);
}
#endif

View File

@ -244,12 +244,12 @@ INTERNAL void space_cell_node_release(struct space_cell_node *n)
}
cell->valid = false;
/* Insert into free list */
/* Insert cell into free list */
cell->next_free = space->first_free_cell;
space->first_free_cell = cell;
}
/* Insert into free list */
/* Insert node into free list */
n->next_free = space->first_free_cell_node;
space->first_free_cell_node = n;
}

View File

@ -406,8 +406,7 @@ b32 string_ends_with(struct string str, struct string substring)
* ========================== */
/* String formatting only has one format specifier: "%F". All specifier info is
* included in the arguments (instead of w/ the specifier like in printf). This
* is safer.
* included in the arguments (instead of w/ the specifier like in printf).
*
* Example:
* string_format(arena,

View File

@ -399,7 +399,7 @@ void sys_wait(void *addr, void *cmp, u32 size, f32 timeout_seconds)
i16 parent_fiber_id = fiber->parent_id;
/* Yield if job fiber, otherwise fall back to windows blocking function */
if (parent_fiber_id > 0) {
/* Yield if job fiber */
/* FIXME: Implement fiber timeout */
*fiber->yield_param = (struct yield_param) {
.kind = YIELD_KIND_WAIT,
.wait = {
@ -571,10 +571,9 @@ INTERNAL struct fiber *fiber_alloc(enum fiber_kind kind)
i32 rev_start = 0;
i32 rev_end = id_chars_len - 1;
while (rev_start < rev_end) {
char a = id_chars[rev_start];
char b = id_chars[rev_end];
id_chars[rev_start] = b;
id_chars[rev_end] = a;
char swp = id_chars[rev_start];
id_chars[rev_start] = id_chars[rev_end];
id_chars[rev_end] = swp;
++rev_start;
--rev_end;
}
@ -763,8 +762,8 @@ INTERNAL SYS_THREAD_DEF(job_worker_entry, worker_ctx_arg)
success = SetThreadPriority(thread_handle, priority);
ASSERT(success);
u64 affinity_mask = 1 << (ctx->id * 2);
success = !!SetThreadAffinityMask(thread_handle, affinity_mask);
u64 affinity_mask = (u64)1 << (ctx->id * 2);
success = SetThreadAffinityMask(thread_handle, affinity_mask) != 0;
ASSERT(success);
}