mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:17:34 +00:00
LibPthread: Add stubs for pthread_spin_* functions
The stress-ng port depends on these now that it detects we have thread support.
This commit is contained in:
parent
88cebb05ad
commit
2520ccfca4
2 changed files with 28 additions and 0 deletions
|
@ -580,6 +580,31 @@ int pthread_setcanceltype([[maybe_unused]] int type, [[maybe_unused]] int* oldty
|
||||||
TODO();
|
TODO();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int pthread_spin_destroy([[maybe_unused]] pthread_spinlock_t* lock)
|
||||||
|
{
|
||||||
|
TODO();
|
||||||
|
}
|
||||||
|
|
||||||
|
int pthread_spin_init([[maybe_unused]] pthread_spinlock_t* lock, [[maybe_unused]] int shared)
|
||||||
|
{
|
||||||
|
TODO();
|
||||||
|
}
|
||||||
|
|
||||||
|
int pthread_spin_lock([[maybe_unused]] pthread_spinlock_t* lock)
|
||||||
|
{
|
||||||
|
TODO();
|
||||||
|
}
|
||||||
|
|
||||||
|
int pthread_spin_trylock([[maybe_unused]] pthread_spinlock_t* lock)
|
||||||
|
{
|
||||||
|
TODO();
|
||||||
|
}
|
||||||
|
|
||||||
|
int pthread_spin_unlock([[maybe_unused]] pthread_spinlock_t* lock)
|
||||||
|
{
|
||||||
|
TODO();
|
||||||
|
}
|
||||||
|
|
||||||
int pthread_equal(pthread_t t1, pthread_t t2)
|
int pthread_equal(pthread_t t1, pthread_t t2)
|
||||||
{
|
{
|
||||||
return t1 == t2;
|
return t1 == t2;
|
||||||
|
|
|
@ -81,6 +81,9 @@ int pthread_setschedparam(pthread_t thread, int policy, const struct sched_param
|
||||||
#define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL
|
#define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL
|
||||||
#define PTHREAD_MUTEX_INITIALIZER __PTHREAD_MUTEX_INITIALIZER
|
#define PTHREAD_MUTEX_INITIALIZER __PTHREAD_MUTEX_INITIALIZER
|
||||||
|
|
||||||
|
#define PTHREAD_PROCESS_PRIVATE 1
|
||||||
|
#define PTHREAD_PROCESS_SHARED 2
|
||||||
|
|
||||||
#define PTHREAD_COND_INITIALIZER \
|
#define PTHREAD_COND_INITIALIZER \
|
||||||
{ \
|
{ \
|
||||||
0, 0, CLOCK_MONOTONIC_COARSE \
|
0, 0, CLOCK_MONOTONIC_COARSE \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue