Skip to content

Commit 7882c7d

Browse files
disable pthread_cleanup_push and pthread_cleanup_post, as we lack those api
1 parent 7ffc860 commit 7882c7d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Modules/_testcapimodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3338,13 +3338,13 @@ static PyObject *
33383338
finalize_thread_hang(PyObject *self, PyObject *callback)
33393339
{
33403340
// WASI builds some pthread stuff but doesn't have these APIs today?
3341-
#if defined(_POSIX_THREADS) && !defined(__wasi__)
3341+
#if defined(_POSIX_THREADS) && !defined(__wasi__) && !defined(__OS2__)
33423342
pthread_cleanup_push(finalize_thread_hang_cleanup_callback, NULL);
33433343
#endif
33443344
PyObject_CallNoArgs(callback);
33453345
// Should not reach here.
33463346
Py_FatalError("thread unexpectedly did not hang");
3347-
#if defined(_POSIX_THREADS) && !defined(__wasi__)
3347+
#if defined(_POSIX_THREADS) && !defined(__wasi__) && !defined(__OS2__)
33483348
pthread_cleanup_pop(0);
33493349
#endif
33503350
Py_RETURN_NONE;

0 commit comments

Comments
 (0)