mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-07-19 07:31:30 -07:00
raddbgi_from_pdb: move top-level compilation unit parsing to asynchronous tasks
This commit is contained in:
@@ -1,3 +1,13 @@
|
||||
////////////////////////////////
|
||||
//~ rjf: Basic Type Functions
|
||||
|
||||
internal TS_Ticket
|
||||
ts_ticket_zero(void)
|
||||
{
|
||||
TS_Ticket ticket = {0};
|
||||
return ticket;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Top-Level Layer Initialization
|
||||
|
||||
@@ -93,21 +103,24 @@ ts_join(TS_Ticket ticket, U64 endt_us)
|
||||
TS_TaskArtifactSlot *slot = &ts_shared->artifact_slots[slot_idx];
|
||||
TS_TaskArtifactStripe *stripe = &ts_shared->artifact_stripes[stripe_idx];
|
||||
TS_TaskArtifact *artifact = (TS_TaskArtifact *)ticket.u64[1];
|
||||
OS_MutexScopeR(stripe->rw_mutex) for(;;)
|
||||
if(artifact != 0)
|
||||
{
|
||||
B64 task_is_done = artifact->task_is_done;
|
||||
if(task_is_done)
|
||||
OS_MutexScopeR(stripe->rw_mutex) for(;;)
|
||||
{
|
||||
OS_MutexScopeRWPromote(stripe->rw_mutex)
|
||||
B64 task_is_done = artifact->task_is_done;
|
||||
if(task_is_done)
|
||||
{
|
||||
result = artifact->result;
|
||||
SLLStackPush(stripe->free_artifact, artifact);
|
||||
OS_MutexScopeRWPromote(stripe->rw_mutex)
|
||||
{
|
||||
result = artifact->result;
|
||||
SLLStackPush(stripe->free_artifact, artifact);
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
os_condition_variable_wait_rw_r(stripe->cv, stripe->rw_mutex, endt_us);
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
os_condition_variable_wait_rw_r(stripe->cv, stripe->rw_mutex, endt_us);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user