2022-07-10 11:01:17 +00:00
|
|
|
#ifndef COSMOPOLITAN_LIBC_THREAD_SPAWN_H_
|
|
|
|
#define COSMOPOLITAN_LIBC_THREAD_SPAWN_H_
|
2022-09-13 21:57:38 +00:00
|
|
|
#include "libc/thread/tls.h"
|
2022-07-10 11:01:17 +00:00
|
|
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
|
|
COSMOPOLITAN_C_START_
|
|
|
|
|
|
|
|
struct spawn {
|
|
|
|
int ptid;
|
|
|
|
char *stk;
|
|
|
|
char *tls;
|
2022-09-13 21:57:38 +00:00
|
|
|
struct CosmoTib *tib;
|
2022-07-10 11:01:17 +00:00
|
|
|
};
|
|
|
|
|
2022-11-08 19:39:50 +00:00
|
|
|
int _spawn(int (*)(void *, int), void *, struct spawn *) _Hide;
|
|
|
|
int _join(struct spawn *) _Hide;
|
|
|
|
char *_mktls(struct CosmoTib **) _Hide;
|
2022-07-10 11:01:17 +00:00
|
|
|
|
|
|
|
COSMOPOLITAN_C_END_
|
|
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
|
|
|
#endif /* COSMOPOLITAN_LIBC_THREAD_SPAWN_H_ */
|