mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-05 04:02:28 +00:00
Get rid of kmalloc()
This changes *NSYNC to allocate waiters on the stack so our locks don't need to depend on dynamic memory. This make our runtiem simpler, and it also fixes bugs with thread cancellation support.
This commit is contained in:
parent
77a7873057
commit
a359de7893
57 changed files with 405 additions and 472 deletions
8
third_party/nsync/common.internal.h
vendored
8
third_party/nsync/common.internal.h
vendored
|
@ -244,12 +244,8 @@ waiter *nsync_dll_waiter_(struct Dll *e);
|
|||
: DLL_CONTAINER(struct waiter_s, same_condition, e))
|
||||
waiter *nsync_dll_waiter_samecond_(struct Dll *e);
|
||||
|
||||
/* Return a pointer to an unused waiter struct.
|
||||
Ensures that the enclosed timer is stopped and its channel drained. */
|
||||
waiter *nsync_waiter_new_(void);
|
||||
|
||||
/* Return an unused waiter struct *w to the free pool. */
|
||||
void nsync_waiter_free_(waiter *w);
|
||||
void nsync_waiter_init_(waiter *);
|
||||
void nsync_waiter_destroy_(waiter *);
|
||||
|
||||
/* ---------- */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue