Hunt down more bugs

After going through the MODE=dbg and MODE=zero build modes, a bunch of
little issues were identified, which have been addressed. Fixing those
issues created even more troubles for the project, because it improved
our ability to detect latent problems which are getting fixed so fast.
This commit is contained in:
Justine Tunney 2023-07-03 17:35:11 -07:00
parent 73c0faa1b5
commit 97b7116953
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
39 changed files with 557 additions and 754 deletions

View file

@ -50,6 +50,8 @@
* Your spawn library abstracts clone() which also works on all
* platforms; however our implementation of clone() is significantly
* complicated so we strongly recommend always favoring this API.
*
* @deprecated
*/
#define _TLSZ ((intptr_t)_tls_size)
@ -92,6 +94,7 @@ static int Spawner(void *arg, int tid) {
* except when it isn't specified, in which case, the thread is kind
* of detached and will (currently) just leak the stack / tls memory
* @return 0 on success, or -1 w/ errno
* @deprecated
*/
int _spawn(int fun(void *, int), void *arg, struct spawn *opt_out_thread) {
errno_t rc;
@ -144,6 +147,8 @@ int _spawn(int fun(void *, int), void *arg, struct spawn *opt_out_thread) {
* Waits for thread created by _spawn() to terminate.
*
* This will free your thread's stack and tls memory too.
*
* @deprecated
*/
int _join(struct spawn *th) {
int rc;