mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 06:48:31 +00:00
[WIP] Threading (#282)
* Thread creation * Proper thread creation and exit * Join/Detach protocol * Added semaphore with futex (hopefully fast)
This commit is contained in:
parent
d852640a1e
commit
a0b39f886c
30 changed files with 792 additions and 12 deletions
15
libc/thread/join.h
Normal file
15
libc/thread/join.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_THREAD_JOIN_H_
|
||||
#define COSMOPOLITAN_LIBC_THREAD_JOIN_H_
|
||||
#include "libc/thread/descriptor.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
/**
|
||||
* @fileoverview join a thread
|
||||
*/
|
||||
|
||||
int cthread_join(cthread_t, int*);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_THREAD_JOIN_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue