File tree Expand file tree Collapse file tree 1 file changed +19
-12
lines changed
Expand file tree Collapse file tree 1 file changed +19
-12
lines changed Original file line number Diff line number Diff line change 221221 RESTORE_ERRNO; \
222222 } STMT_END
223223
224- # define MUTEX_DESTROY (m ) \
225- STMT_START { \
226- int _eC_; \
227- if ((_eC_ = pthread_mutex_destroy((m)))) { \
228- Perl_croak_nocontext("panic: MUTEX_DESTROY (%d) [%s:%d]", \
229- _eC_, __FILE__, __LINE__); \
230- } \
224+ # define MUTEX_DESTROY (m ) \
225+ STMT_START { \
226+ int _eC_; \
227+ if ((_eC_ = pthread_mutex_destroy((m)))) { \
228+ dTHX; \
229+ if (PL_phase != PERL_PHASE_DESTRUCT) { \
230+ Perl_croak_nocontext("panic: MUTEX_DESTROY (%d) [%s:%d]", \
231+ _eC_, __FILE__, __LINE__); \
232+ } \
233+ } \
231234 } STMT_END
232235#endif /* MUTEX_INIT */
233236
265268 } STMT_END
266269
267270# define COND_DESTROY (c ) \
268- STMT_START { \
269- int _eC_; \
270- if ((_eC_ = pthread_cond_destroy((c)))) \
271- Perl_croak_nocontext("panic: COND_DESTROY (%d) [%s:%d]", \
272- _eC_, __FILE__, __LINE__); \
271+ STMT_START { \
272+ int _eC_; \
273+ if ((_eC_ = pthread_cond_destroy((c)))) { \
274+ dTHX; \
275+ if (PL_phase != PERL_PHASE_DESTRUCT) { \
276+ Perl_croak_nocontext("panic: COND_DESTROY (%d) [%s:%d]", \
277+ _eC_, __FILE__, __LINE__); \
278+ } \
279+ } \
273280 } STMT_END
274281#endif /* COND_INIT */
275282
You can’t perform that action at this time.
0 commit comments