mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
60cb435cb4
If threads are being used, then fork() will now acquire and release and runtime locks so that fork() may be safely used from threads. This also makes vfork() thread safe, because pthread mutexes will do nothing when the process is a child of vfork(). More torture tests have been written to confirm this all works like a charm. Additionally: - Invent hexpcpy() api - Rename nsync_malloc_() to kmalloc() - Complete posix named semaphore implementation - Make pthread_create() asynchronous signal safe - Add rm, rmdir, and touch to command interpreter builtins - Invent sigisprecious() and modify sigset functions to use it - Add unit tests for posix_spawn() attributes and fix its bugs One unresolved problem is the reclaiming of *NSYNC waiter memory in the forked child processes, within apps which have threads waiting on locks
29 lines
643 B
C
29 lines
643 B
C
#ifndef COSMOPOLITAN_LIBC_SYSV_CONSTS_CPIO_H_
|
|
#define COSMOPOLITAN_LIBC_SYSV_CONSTS_CPIO_H_
|
|
|
|
#define MAGIC "070707"
|
|
|
|
#define C_IRUSR 000400
|
|
#define C_IWUSR 000200
|
|
#define C_IXUSR 000100
|
|
#define C_IRGRP 000040
|
|
#define C_IWGRP 000020
|
|
#define C_IXGRP 000010
|
|
#define C_IROTH 000004
|
|
#define C_IWOTH 000002
|
|
#define C_IXOTH 000001
|
|
|
|
#define C_ISUID 004000
|
|
#define C_ISGID 002000
|
|
#define C_ISVTX 001000
|
|
|
|
#define C_ISBLK 060000
|
|
#define C_ISCHR 020000
|
|
#define C_ISDIR 040000
|
|
#define C_ISFIFO 010000
|
|
#define C_ISSOCK 0140000
|
|
#define C_ISLNK 0120000
|
|
#define C_ISCTG 0110000
|
|
#define C_ISREG 0100000
|
|
|
|
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_CPIO_H_ */
|