mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-03-30 04:18:45 +00:00
- Document redbean's argon2 module - Fix regressions in cthreads library - Make testlib work better with threads - Give the cthreads library lots of love - Remove some of the stdio assembly code - Implement getloadavg() across platforms - Code size optimizations for errnos, etc. - Only check for signals in main thread on Windows - Make errnos for dup2 / dup3 consistent with posix This change also fixes a bug in the argon2 module, where the NUL terminator was being included in the hash encoded ascii string. This shouldn't require any database migrations to folks who found this module and productionized it, since the argon2 library treats it as a c string.
24 lines
663 B
C
24 lines
663 B
C
#ifndef COSMOPOLITAN_LIBC_THREAD_NATIVESEM_H_
|
|
#define COSMOPOLITAN_LIBC_THREAD_NATIVESEM_H_
|
|
#include "libc/calls/struct/timespec.h"
|
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
COSMOPOLITAN_C_START_
|
|
|
|
/**
|
|
* @fileoverview native semaphore for implementation details
|
|
*/
|
|
|
|
typedef union cthread_sem_t {
|
|
struct {
|
|
uint64_t count;
|
|
} linux;
|
|
} cthread_sem_t;
|
|
|
|
int cthread_sem_init(cthread_sem_t *, int);
|
|
int cthread_sem_destroy(cthread_sem_t *);
|
|
int cthread_sem_wait(cthread_sem_t *, int, const struct timespec *);
|
|
int cthread_sem_signal(cthread_sem_t *);
|
|
|
|
COSMOPOLITAN_C_END_
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
|
#endif /* COSMOPOLITAN_LIBC_THREAD_SELF_H_ */
|