microsoft / STL

MSVC's implementation of the C++ Standard Library.
Other
10.07k stars 1.49k forks source link

<execution>, <shared_mutex>: use aliasobj #801

Open AlexGuteniev opened 4 years ago

AlexGuteniev commented 4 years ago

Due to no need to support XP in import library, this can be handled like #688 :

  1. Threadpool in parallel_algorithms.cpp
  2. Shared mutex in sharedmutex.cpp (need to tune calling conventions)

I think it not worth doing for by handle and symlink APIs in filesystem.cpp or for syserror_import_lib.cpp.

I assume this also cancels #763 , as symbol alias is better than forwarder for forwarding during link time.

AlexGuteniev commented 4 years ago

@StephanTLavavej , I think that's performance, not enhancement. From maintenance perspective it is making things a bit worse - complicates build. For performance, it is saving a bit on unnecessary indirect functions calls for lightweight thread synchronization functions.

AlexGuteniev commented 1 year ago

I tried to work on this and noticed that /ALTERNATENAME has an issue of not being linked in. Always potentially called __std_init_once_link_alternate_names_and_abort() is a workaround for call_once, but does not seem to work for shared_mutex and _Thrd_id