@@ -86,11 +86,11 @@ struct _Cnd_internal_imp_t;
86
86
using _Cnd_t = _Cnd_internal_imp_t * ;
87
87
#endif // ^^^ !defined(_M_CEE) ^^^
88
88
89
- enum { _Thrd_success , _Thrd_nomem , _Thrd_timedout , _Thrd_busy , _Thrd_error };
89
+ enum class _Thrd_result : int { _Success , _Nomem , _Timedout , _Busy , _Error };
90
90
91
91
// threads
92
- _CRTIMP2_PURE int __cdecl _Thrd_detach (_Thrd_t );
93
- _CRTIMP2_PURE int __cdecl _Thrd_join (_Thrd_t , int * );
92
+ _CRTIMP2_PURE _Thrd_result __cdecl _Thrd_detach (_Thrd_t );
93
+ _CRTIMP2_PURE _Thrd_result __cdecl _Thrd_join (_Thrd_t , int * );
94
94
_CRTIMP2_PURE void __cdecl _Thrd_sleep (const _timespec64 * );
95
95
_CRTIMP2_PURE void __cdecl _Thrd_yield ();
96
96
_CRTIMP2_PURE unsigned int __cdecl _Thrd_hardware_concurrency ();
@@ -104,15 +104,15 @@ enum { // mutex types
104
104
_Mtx_recursive = 0x100
105
105
};
106
106
107
- _CRTIMP2_PURE int __cdecl _Mtx_init (_Mtx_t * , int );
107
+ _CRTIMP2_PURE _Thrd_result __cdecl _Mtx_init (_Mtx_t * , int );
108
108
_CRTIMP2_PURE void __cdecl _Mtx_destroy (_Mtx_t );
109
109
_CRTIMP2_PURE void __cdecl _Mtx_init_in_situ (_Mtx_t , int );
110
110
_CRTIMP2_PURE void __cdecl _Mtx_destroy_in_situ (_Mtx_t );
111
111
_CRTIMP2_PURE int __cdecl _Mtx_current_owns (_Mtx_t );
112
- _CRTIMP2_PURE int __cdecl _Mtx_lock (_Mtx_t );
113
- _CRTIMP2_PURE int __cdecl _Mtx_trylock (_Mtx_t );
114
- _CRTIMP2_PURE int __cdecl _Mtx_timedlock (_Mtx_t , const _timespec64 * );
115
- _CRTIMP2_PURE int __cdecl _Mtx_unlock (_Mtx_t ); // TRANSITION, ABI: always returns _Thrd_success
112
+ _CRTIMP2_PURE _Thrd_result __cdecl _Mtx_lock (_Mtx_t );
113
+ _CRTIMP2_PURE _Thrd_result __cdecl _Mtx_trylock (_Mtx_t );
114
+ _CRTIMP2_PURE _Thrd_result __cdecl _Mtx_timedlock (_Mtx_t , const _timespec64 * );
115
+ _CRTIMP2_PURE _Thrd_result __cdecl _Mtx_unlock (_Mtx_t ); // TRANSITION, ABI: Always succeeds
116
116
117
117
_CRTIMP2_PURE void * __cdecl _Mtx_getconcrtcs (_Mtx_t );
118
118
_CRTIMP2_PURE void __cdecl _Mtx_clear_owner (_Mtx_t );
@@ -128,14 +128,14 @@ void __cdecl _Smtx_unlock_exclusive(_Smtx_t*);
128
128
void __cdecl _Smtx_unlock_shared (_Smtx_t * );
129
129
130
130
// condition variables
131
- _CRTIMP2_PURE int __cdecl _Cnd_init (_Cnd_t * );
131
+ _CRTIMP2_PURE _Thrd_result __cdecl _Cnd_init (_Cnd_t * );
132
132
_CRTIMP2_PURE void __cdecl _Cnd_destroy (_Cnd_t );
133
133
_CRTIMP2_PURE void __cdecl _Cnd_init_in_situ (_Cnd_t );
134
134
_CRTIMP2_PURE void __cdecl _Cnd_destroy_in_situ (_Cnd_t );
135
- _CRTIMP2_PURE int __cdecl _Cnd_wait (_Cnd_t , _Mtx_t ); // TRANSITION, ABI: Always returns _Thrd_success
136
- _CRTIMP2_PURE int __cdecl _Cnd_timedwait (_Cnd_t , _Mtx_t , const _timespec64 * );
137
- _CRTIMP2_PURE int __cdecl _Cnd_broadcast (_Cnd_t ); // TRANSITION, ABI: Always returns _Thrd_success
138
- _CRTIMP2_PURE int __cdecl _Cnd_signal (_Cnd_t ); // TRANSITION, ABI: Always returns _Thrd_success
135
+ _CRTIMP2_PURE _Thrd_result __cdecl _Cnd_wait (_Cnd_t , _Mtx_t ); // TRANSITION, ABI: Always succeeds
136
+ _CRTIMP2_PURE _Thrd_result __cdecl _Cnd_timedwait (_Cnd_t , _Mtx_t , const _timespec64 * );
137
+ _CRTIMP2_PURE _Thrd_result __cdecl _Cnd_broadcast (_Cnd_t ); // TRANSITION, ABI: Always succeeds
138
+ _CRTIMP2_PURE _Thrd_result __cdecl _Cnd_signal (_Cnd_t ); // TRANSITION, ABI: Always succeeds
139
139
_CRTIMP2_PURE void __cdecl _Cnd_register_at_thread_exit (_Cnd_t , _Mtx_t , int * );
140
140
_CRTIMP2_PURE void __cdecl _Cnd_unregister_at_thread_exit (_Mtx_t );
141
141
_CRTIMP2_PURE void __cdecl _Cnd_do_broadcast_at_thread_exit ();
0 commit comments