mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 11:37:35 +00:00
daf4454a06
- Work towards improving non-optimized build support - Introduce MODE=zero which is -O0 without ASAN/UBSAN - Use system GCC when ~/.cosmo.mk has USE_SYSTEM_TOOLCHAIN=1 - Have package.com check .privileged code doesn't call non-privileged
33 lines
697 B
C
33 lines
697 B
C
#ifndef COSMOPOLITAN_LIBC_CALLS_STRUCT_FD_INTERNAL_H_
|
|
#define COSMOPOLITAN_LIBC_CALLS_STRUCT_FD_INTERNAL_H_
|
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
COSMOPOLITAN_C_START_
|
|
|
|
#define kFdEmpty 0
|
|
#define kFdFile 1
|
|
#define kFdSocket 2
|
|
#define kFdProcess 3
|
|
#define kFdConsole 4
|
|
#define kFdSerial 5
|
|
#define kFdZip 6
|
|
#define kFdEpoll 7
|
|
#define kFdReserved 8
|
|
|
|
struct Fd {
|
|
int kind;
|
|
unsigned flags;
|
|
unsigned mode;
|
|
int64_t handle;
|
|
int64_t extra;
|
|
bool zombie;
|
|
};
|
|
|
|
struct Fds {
|
|
_Atomic(int) f; /* lowest free slot */
|
|
size_t n;
|
|
struct Fd *p, *e;
|
|
};
|
|
|
|
COSMOPOLITAN_C_END_
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
|
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_FD_INTERNAL_H_ */
|