formatting
This commit is contained in:
parent
0a3e9adcbd
commit
5dd56dea5c
@ -806,4 +806,5 @@ void bitbuff_test(void)
|
|||||||
|
|
||||||
scratch_end(scratch);
|
scratch_end(scratch);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -244,12 +244,12 @@ INTERNAL void space_cell_node_release(struct space_cell_node *n)
|
|||||||
}
|
}
|
||||||
cell->valid = false;
|
cell->valid = false;
|
||||||
|
|
||||||
/* Insert into free list */
|
/* Insert cell into free list */
|
||||||
cell->next_free = space->first_free_cell;
|
cell->next_free = space->first_free_cell;
|
||||||
space->first_free_cell = cell;
|
space->first_free_cell = cell;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Insert into free list */
|
/* Insert node into free list */
|
||||||
n->next_free = space->first_free_cell_node;
|
n->next_free = space->first_free_cell_node;
|
||||||
space->first_free_cell_node = n;
|
space->first_free_cell_node = n;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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
|
/* 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
|
* included in the arguments (instead of w/ the specifier like in printf).
|
||||||
* is safer.
|
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* string_format(arena,
|
* string_format(arena,
|
||||||
|
|||||||
@ -399,7 +399,7 @@ void sys_wait(void *addr, void *cmp, u32 size, f32 timeout_seconds)
|
|||||||
i16 parent_fiber_id = fiber->parent_id;
|
i16 parent_fiber_id = fiber->parent_id;
|
||||||
/* Yield if job fiber, otherwise fall back to windows blocking function */
|
/* Yield if job fiber, otherwise fall back to windows blocking function */
|
||||||
if (parent_fiber_id > 0) {
|
if (parent_fiber_id > 0) {
|
||||||
/* Yield if job fiber */
|
/* FIXME: Implement fiber timeout */
|
||||||
*fiber->yield_param = (struct yield_param) {
|
*fiber->yield_param = (struct yield_param) {
|
||||||
.kind = YIELD_KIND_WAIT,
|
.kind = YIELD_KIND_WAIT,
|
||||||
.wait = {
|
.wait = {
|
||||||
@ -571,10 +571,9 @@ INTERNAL struct fiber *fiber_alloc(enum fiber_kind kind)
|
|||||||
i32 rev_start = 0;
|
i32 rev_start = 0;
|
||||||
i32 rev_end = id_chars_len - 1;
|
i32 rev_end = id_chars_len - 1;
|
||||||
while (rev_start < rev_end) {
|
while (rev_start < rev_end) {
|
||||||
char a = id_chars[rev_start];
|
char swp = id_chars[rev_start];
|
||||||
char b = id_chars[rev_end];
|
id_chars[rev_start] = id_chars[rev_end];
|
||||||
id_chars[rev_start] = b;
|
id_chars[rev_end] = swp;
|
||||||
id_chars[rev_end] = a;
|
|
||||||
++rev_start;
|
++rev_start;
|
||||||
--rev_end;
|
--rev_end;
|
||||||
}
|
}
|
||||||
@ -763,8 +762,8 @@ INTERNAL SYS_THREAD_DEF(job_worker_entry, worker_ctx_arg)
|
|||||||
success = SetThreadPriority(thread_handle, priority);
|
success = SetThreadPriority(thread_handle, priority);
|
||||||
ASSERT(success);
|
ASSERT(success);
|
||||||
|
|
||||||
u64 affinity_mask = 1 << (ctx->id * 2);
|
u64 affinity_mask = (u64)1 << (ctx->id * 2);
|
||||||
success = !!SetThreadAffinityMask(thread_handle, affinity_mask);
|
success = SetThreadAffinityMask(thread_handle, affinity_mask) != 0;
|
||||||
ASSERT(success);
|
ASSERT(success);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user