Skip to content

Commit 26e868c

Browse files
committed
Add required stub for pthread_join
1 parent e922c6e commit 26e868c

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Include/cpython/pthread_stubs.h

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ PyAPI_FUNC(int) pthread_create(pthread_t *restrict thread,
8383
void *(*start_routine)(void *),
8484
void *restrict arg);
8585
PyAPI_FUNC(int) pthread_detach(pthread_t thread);
86+
PyAPI_FUNC(int) pthread_join(pthread_t thread, void** value_ptr);
8687
PyAPI_FUNC(pthread_t) pthread_self(void);
8788
PyAPI_FUNC(int) pthread_exit(void *retval) __attribute__ ((__noreturn__));
8889
PyAPI_FUNC(int) pthread_attr_init(pthread_attr_t *attr);

Python/thread_pthread_stubs.h

+9
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,15 @@ pthread_detach(pthread_t thread)
9494
return 0;
9595
}
9696

97+
int
98+
pthread_join(pthread_t thread, void** value_ptr)
99+
{
100+
if (value_ptr) {
101+
*value_ptr = NULL;
102+
}
103+
return 0;
104+
}
105+
97106
PyAPI_FUNC(pthread_t) pthread_self(void)
98107
{
99108
return 0;

0 commit comments

Comments
 (0)