LibPthread: Stub pthread_setcancelstate() and pthread_setcanceltype()

This commit is contained in:
Andreas Kling 2021-01-12 13:40:48 +01:00
parent 51a2d3c1fa
commit bee1145bdf
Notes: sideshowbarker 2024-07-18 23:53:35 +09:00
2 changed files with 16 additions and 1 deletions

View file

@ -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"

View file

@ -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*);