lhmouse / mcfgthread

Cornerstone of the MOST efficient std::thread on Windows for mingw-w64
https://gcc-mcf.lhmouse.com/
Other
269 stars 28 forks source link

Use SEH in `*_once()` #246

Closed lhmouse closed 6 months ago

lhmouse commented 6 months ago
  1. Unify all variants.
  2. Allow __gthread_once() etc. work with MSVC.
lhmouse commented 6 months ago

Are the ARM and AArch64 implementations correct?

/* in case of stack unwinding, `my_once_abort(once)` is called.  */
void
do_call_once_seh(once_t* once, void init_proc(void*), void* arg)
  {
    init_proc(arg);
    my_once_release(once);
  }
lhmouse commented 6 months ago

am gonna merge this thing this week; maybe sooner if I can find a test machine.