Skip to content

Commit

Permalink
ifdef out pthread_cancel
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
yamt committed Nov 13, 2023
1 parent be1704a commit cc4c8e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libc-top-half/musl/include/pthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ int pthread_equal(pthread_t, pthread_t);
int pthread_setcancelstate(int, int *);
int pthread_setcanceltype(int, int *);
void pthread_testcancel(void);
#ifdef __wasilibc_unmodified_upstream /* WASI has no cancellation support. */
int pthread_cancel(pthread_t);
#endif

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

0 comments on commit cc4c8e8

Please sign in to comment.