mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-02 03:58:11 +00:00
define synchronization primitive interface in base layer, implement using os layer; convert all usage -> base layer; use base sync primitives in lane tctx info
This commit is contained in:
@@ -21,13 +21,13 @@ geo_init(void)
|
||||
for(U64 idx = 0; idx < geo_shared->stripes_count; idx += 1)
|
||||
{
|
||||
geo_shared->stripes[idx].arena = arena_alloc();
|
||||
geo_shared->stripes[idx].rw_mutex = os_rw_mutex_alloc();
|
||||
geo_shared->stripes[idx].cv = os_condition_variable_alloc();
|
||||
geo_shared->stripes[idx].rw_mutex = rw_mutex_alloc();
|
||||
geo_shared->stripes[idx].cv = cond_var_alloc();
|
||||
}
|
||||
geo_shared->u2x_ring_size = KB(64);
|
||||
geo_shared->u2x_ring_base = push_array_no_zero(arena, U8, geo_shared->u2x_ring_size);
|
||||
geo_shared->u2x_ring_cv = os_condition_variable_alloc();
|
||||
geo_shared->u2x_ring_mutex = os_mutex_alloc();
|
||||
geo_shared->u2x_ring_cv = cond_var_alloc();
|
||||
geo_shared->u2x_ring_mutex = mutex_alloc();
|
||||
geo_shared->evictor_thread = os_thread_launch(geo_evictor_thread__entry_point, 0, 0);
|
||||
}
|
||||
|
||||
@@ -217,11 +217,11 @@ geo_u2x_enqueue_req(U128 hash, U64 endt_us)
|
||||
{
|
||||
break;
|
||||
}
|
||||
os_condition_variable_wait(geo_shared->u2x_ring_cv, geo_shared->u2x_ring_mutex, endt_us);
|
||||
cond_var_wait(geo_shared->u2x_ring_cv, geo_shared->u2x_ring_mutex, endt_us);
|
||||
}
|
||||
if(good)
|
||||
{
|
||||
os_condition_variable_broadcast(geo_shared->u2x_ring_cv);
|
||||
cond_var_broadcast(geo_shared->u2x_ring_cv);
|
||||
}
|
||||
return good;
|
||||
}
|
||||
@@ -237,9 +237,9 @@ geo_u2x_dequeue_req(U128 *hash_out)
|
||||
geo_shared->u2x_ring_read_pos += ring_read_struct(geo_shared->u2x_ring_base, geo_shared->u2x_ring_size, geo_shared->u2x_ring_read_pos, hash_out);
|
||||
break;
|
||||
}
|
||||
os_condition_variable_wait(geo_shared->u2x_ring_cv, geo_shared->u2x_ring_mutex, max_U64);
|
||||
cond_var_wait(geo_shared->u2x_ring_cv, geo_shared->u2x_ring_mutex, max_U64);
|
||||
}
|
||||
os_condition_variable_broadcast(geo_shared->u2x_ring_cv);
|
||||
cond_var_broadcast(geo_shared->u2x_ring_cv);
|
||||
}
|
||||
|
||||
ASYNC_WORK_DEF(geo_xfer_work)
|
||||
|
||||
Reference in New Issue
Block a user