Skip to content

Commit 0edc7ae

Browse files
authored
ifdef out pthread_cancel (#445)
as we don't actually support thread cancellation. note: currently we don't build pthread_cancel.c either. this commit just disables it in our header too to make users notice that it isn't provided a bit earlier. should we disable other cancellation related functions like pthread_testcancel? maybe. but they are harmless to ignore.
1 parent be1704a commit 0edc7ae

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

libc-top-half/musl/include/pthread.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ int pthread_equal(pthread_t, pthread_t);
9797
int pthread_setcancelstate(int, int *);
9898
int pthread_setcanceltype(int, int *);
9999
void pthread_testcancel(void);
100+
#ifdef __wasilibc_unmodified_upstream /* WASI has no cancellation support. */
100101
int pthread_cancel(pthread_t);
102+
#endif
101103

102104
#ifdef __wasilibc_unmodified_upstream /* WASI has no CPU scheduling support. */
103105
int pthread_getschedparam(pthread_t, int *__restrict, struct sched_param *__restrict);

0 commit comments

Comments
 (0)