Tidy up the threading implementation

The organization of the source files is now much more rational.
Old experiments that didn't work out are now deleted. Naming of
things like files is now more intuitive.
This commit is contained in:
Justine Tunney 2022-09-10 02:56:25 -07:00
parent e9272f03fb
commit 155b378a39
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
199 changed files with 526 additions and 685 deletions

View file

@ -1,8 +1,8 @@
#ifndef COSMOPOLITAN_LIBC_THREAD_POSIXTHREAD_INTERNAL_H_
#define COSMOPOLITAN_LIBC_THREAD_POSIXTHREAD_INTERNAL_H_
#include "libc/calls/struct/sched_param.h"
#include "libc/intrin/pthread.h"
#include "libc/runtime/runtime.h"
#include "libc/thread/thread.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
@ -67,13 +67,14 @@ struct PosixThread {
pthread_attr_t attr;
};
void _pthread_free(struct PosixThread *) hidden;
void _pthread_wait(struct PosixThread *) hidden;
int _pthread_reschedule(struct PosixThread *) hidden;
int _pthread_setschedparam_freebsd(int, int, const struct sched_param *) hidden;
void _pthread_free(struct PosixThread *) hidden;
void _pthread_ungarbage(void) hidden;
void _pthread_wait(struct PosixThread *) hidden;
void _pthread_zombies_add(struct PosixThread *) hidden;
void _pthread_zombies_decimate(void) hidden;
void _pthread_zombies_harvest(void) hidden;
int _pthread_setschedparam_freebsd(int, int, const struct sched_param *);
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */