mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Implement POSIX threads API
This commit is contained in:
parent
af24f21556
commit
9be364d40a
95 changed files with 6029 additions and 317 deletions
|
@ -21,12 +21,11 @@
|
|||
|
||||
/**
|
||||
* Initializes mutex.
|
||||
* @param attr may be NULL
|
||||
*
|
||||
* @param attr may be null
|
||||
* @return 0 on success, or error number on failure
|
||||
*/
|
||||
int(pthread_mutex_init)(pthread_mutex_t *mutex,
|
||||
const pthread_mutexattr_t *attr) {
|
||||
bzero(mutex, sizeof(*mutex));
|
||||
mutex->attr = attr ? attr->attr : PTHREAD_MUTEX_DEFAULT;
|
||||
return 0;
|
||||
return pthread_mutex_init(mutex, attr);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue