mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:47:36 +00:00
LibPthread: Move the pthread and semaphore implementation to LibC
This additionally adds some compatibility code to redirect linking attempts for LibPthread to LibC instead.
This commit is contained in:
parent
e156f79f53
commit
2f3b9c49a5
16 changed files with 11 additions and 159 deletions
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Gunnar Beutner <gunnar@beutner.name>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
struct PthreadFunctions {
|
||||
int (*pthread_mutex_trylock)(pthread_mutex_t* mutex);
|
||||
int (*pthread_mutex_destroy)(pthread_mutex_t*);
|
||||
|
||||
int (*pthread_mutexattr_init)(pthread_mutexattr_t*);
|
||||
int (*pthread_mutexattr_settype)(pthread_mutexattr_t*, int);
|
||||
int (*pthread_mutexattr_destroy)(pthread_mutexattr_t*);
|
||||
|
||||
int (*pthread_once)(pthread_once_t*, void (*)(void));
|
||||
|
||||
int (*pthread_cond_broadcast)(pthread_cond_t*);
|
||||
int (*pthread_cond_init)(pthread_cond_t*, pthread_condattr_t const*);
|
||||
int (*pthread_cond_signal)(pthread_cond_t*);
|
||||
int (*pthread_cond_wait)(pthread_cond_t*, pthread_mutex_t*);
|
||||
int (*pthread_cond_destroy)(pthread_cond_t*);
|
||||
int (*pthread_cond_timedwait)(pthread_cond_t*, pthread_mutex_t*, const struct timespec*);
|
||||
};
|
||||
|
||||
void __init_pthread_forward(PthreadFunctions);
|
Loading…
Add table
Add a link
Reference in a new issue