Skip to content

Commit

Permalink
xglobals: Make main thread joinable, partially
Browse files Browse the repository at this point in the history
  • Loading branch information
lhmouse committed Nov 13, 2024
1 parent 7662448 commit 00c88b5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mcfgthread/xglobals.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,10 @@ __MCF_gthread_initialize_globals(void)
__MCF_G_SET_LAZY(__MCF_crt_kernelbase, GetSystemTimePreciseAsFileTime); /* win8 */
__MCF_G_SET_LAZY(__MCF_crt_kernelbase, QueryInterruptTime); /* win10 */

/* Attach the main thread. The structure should be all zeroes so no
* initialization is necessary. */
/* Attach the main thread and make it joinable. The structure should
* be all zeroes so no initialization is necessary. */
__MCF_thread_attach_foreign(__MCF_g->__main_thread);
_MCF_atomic_store_32_rel(__MCF_g->__main_thread->__nref, 2);
}

__MCF_DLLEXPORT
Expand Down

0 comments on commit 00c88b5

Please sign in to comment.