diff --git a/stl/inc/xthreads.h b/stl/inc/xthreads.h index 7f78cec33f..a34afd85e4 100644 --- a/stl/inc/xthreads.h +++ b/stl/inc/xthreads.h @@ -96,10 +96,6 @@ enum { // mutex types _Mtx_recursive = 0x100 }; -#ifdef _CRTBLD -_CRTIMP2_PURE _Thrd_result __cdecl _Mtx_init(_Mtx_t*, int); -_CRTIMP2_PURE void __cdecl _Mtx_destroy(_Mtx_t); -#endif // _CRTBLD _CRTIMP2_PURE void __cdecl _Mtx_init_in_situ(_Mtx_t, int); _CRTIMP2_PURE void __cdecl _Mtx_destroy_in_situ(_Mtx_t); _CRTIMP2_PURE int __cdecl _Mtx_current_owns(_Mtx_t); @@ -117,10 +113,6 @@ void __cdecl _Smtx_unlock_exclusive(_Smtx_t*); void __cdecl _Smtx_unlock_shared(_Smtx_t*); // condition variables -#ifdef _CRTBLD -_CRTIMP2_PURE _Thrd_result __cdecl _Cnd_init(_Cnd_t*); -_CRTIMP2_PURE void __cdecl _Cnd_destroy(_Cnd_t); -#endif // _CRTBLD _CRTIMP2_PURE void __cdecl _Cnd_init_in_situ(_Cnd_t); _CRTIMP2_PURE void __cdecl _Cnd_destroy_in_situ(_Cnd_t); _CRTIMP2_PURE _Thrd_result __cdecl _Cnd_wait(_Cnd_t, _Mtx_t); // TRANSITION, ABI: Always succeeds diff --git a/stl/src/cond.cpp b/stl/src/cond.cpp index fa094b0440..ea61d15575 100644 --- a/stl/src/cond.cpp +++ b/stl/src/cond.cpp @@ -28,6 +28,7 @@ _CRTIMP2_PURE void __cdecl _Cnd_init_in_situ(const _Cnd_t cond) { // initialize _CRTIMP2_PURE void __cdecl _Cnd_destroy_in_situ(_Cnd_t) {} // destroy condition variable in situ +// TRANSITION, ABI: used only by _Thrd_create(), which is preserved for binary compatibility _CRTIMP2_PURE _Thrd_result __cdecl _Cnd_init(_Cnd_t* const pcond) { // initialize *pcond = nullptr; @@ -41,6 +42,7 @@ _CRTIMP2_PURE _Thrd_result __cdecl _Cnd_init(_Cnd_t* const pcond) { // initializ return _Thrd_result::_Success; } +// TRANSITION, ABI: used only by _Thrd_create(), which is preserved for binary compatibility _CRTIMP2_PURE void __cdecl _Cnd_destroy(const _Cnd_t cond) { // clean up if (cond) { // something to do, do it _Cnd_destroy_in_situ(cond); diff --git a/stl/src/cthread.cpp b/stl/src/cthread.cpp index 618037bbfd..2fb7df1301 100644 --- a/stl/src/cthread.cpp +++ b/stl/src/cthread.cpp @@ -109,6 +109,12 @@ _CRTIMP2_PURE unsigned int __cdecl _Thrd_hardware_concurrency() { // return numb return info.dwNumberOfProcessors; } +// TRANSITION, ABI: these functions are used only by _Thrd_create() +_CRTIMP2_PURE _Thrd_result __cdecl _Mtx_init(_Mtx_t*, int); +_CRTIMP2_PURE void __cdecl _Mtx_destroy(_Mtx_t); +_CRTIMP2_PURE _Thrd_result __cdecl _Cnd_init(_Cnd_t*); +_CRTIMP2_PURE void __cdecl _Cnd_destroy(_Cnd_t); + // TRANSITION, ABI: _Thrd_create() is preserved for binary compatibility _CRTIMP2_PURE _Thrd_result __cdecl _Thrd_create(_Thrd_t* thr, _Thrd_start_t func, void* d) { // create thread _Thrd_result res; diff --git a/stl/src/mutex.cpp b/stl/src/mutex.cpp index 98cf98d1cd..1aeb9e038d 100644 --- a/stl/src/mutex.cpp +++ b/stl/src/mutex.cpp @@ -50,6 +50,7 @@ _CRTIMP2_PURE void __cdecl _Mtx_destroy_in_situ(_Mtx_t mtx) { // destroy mutex i (void) mtx; } +// TRANSITION, ABI: used only by _Thrd_create(), which is preserved for binary compatibility _CRTIMP2_PURE _Thrd_result __cdecl _Mtx_init(_Mtx_t* mtx, int type) { // initialize mutex *mtx = nullptr; @@ -65,6 +66,7 @@ _CRTIMP2_PURE _Thrd_result __cdecl _Mtx_init(_Mtx_t* mtx, int type) { // initial return _Thrd_result::_Success; } +// TRANSITION, ABI: used only by _Thrd_create(), which is preserved for binary compatibility _CRTIMP2_PURE void __cdecl _Mtx_destroy(_Mtx_t mtx) { // destroy mutex if (mtx) { // something to do, do it _Mtx_destroy_in_situ(mtx);