diff --git a/Userland/Libraries/LibPthread/pthread.cpp b/Userland/Libraries/LibPthread/pthread.cpp index 9fe543a3de..8c7943461e 100644 --- a/Userland/Libraries/LibPthread/pthread.cpp +++ b/Userland/Libraries/LibPthread/pthread.cpp @@ -656,4 +656,14 @@ int pthread_getname_np(pthread_t thread, char* buffer, size_t buffer_size) __RETURN_PTHREAD_ERROR(rc); } +int pthread_setcancelstate([[maybe_unused]] int state, [[maybe_unused]] int* oldstate) +{ + TODO(); +} + +int pthread_setcanceltype([[maybe_unused]] int type, [[maybe_unused]] int* oldtype) +{ + TODO(); +} + } // extern "C" diff --git a/Userland/Libraries/LibPthread/pthread.h b/Userland/Libraries/LibPthread/pthread.h index 617aac8a90..f00cdcbaed 100644 --- a/Userland/Libraries/LibPthread/pthread.h +++ b/Userland/Libraries/LibPthread/pthread.h @@ -99,10 +99,15 @@ int pthread_cond_wait(pthread_cond_t*, pthread_mutex_t*); int pthread_condattr_init(pthread_condattr_t*); int pthread_condattr_setclock(pthread_condattr_t*, clockid_t); int pthread_condattr_destroy(pthread_condattr_t*); -int pthread_cancel(pthread_t); int pthread_cond_destroy(pthread_cond_t*); int pthread_cond_timedwait(pthread_cond_t*, pthread_mutex_t*, const struct timespec*); +#define PTHREAD_CANCEL_ENABLE 1 +#define PTHREAD_CANCEL_DISABLE 2 + +int pthread_cancel(pthread_t); +int pthread_setcancelstate(int state, int* oldstate); +int pthread_setcanceltype(int type, int* oldtype); void pthread_testcancel(void); int pthread_spin_destroy(pthread_spinlock_t*);