mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-01 03:53:33 +00:00
416fd86676
- Emulator can now test the αcτµαlly pδrταblε εxεcµταblε bootloader - Whipped up a webserver named redbean. It services 150k requests per second on a single core. Bundling assets inside zip enables extremely fast serving for two reasons. The first is that zip central directory lookups go faster than stat() system calls. The second is that both zip and gzip content-encoding use DEFLATE, therefore, compressed responses can be served via the sendfile() system call which does an in-kernel copy directly from the zip executable structure. Also note that red bean zip executables can be deployed easily to all platforms, since these native executables work on Linux, Mac, BSD, and Windows. - Address sanitizer now works very well
28 lines
723 B
C
28 lines
723 B
C
#ifndef COSMOPOLITAN_TOOL_BUILD_LIB_FDS_H_
|
|
#define COSMOPOLITAN_TOOL_BUILD_LIB_FDS_H_
|
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
COSMOPOLITAN_C_START_
|
|
|
|
struct MachineFds {
|
|
size_t i, n;
|
|
struct MachineFd {
|
|
int fd;
|
|
struct MachineFdCb {
|
|
int (*close)(int);
|
|
ssize_t (*read)(int, void *, size_t);
|
|
ssize_t (*write)(int, const void *, size_t);
|
|
int (*ioctl)(int, uint64_t, void *);
|
|
} * cb;
|
|
} * p;
|
|
struct MachineFdClosed {
|
|
unsigned fd;
|
|
struct MachineFdClosed *next;
|
|
} * closed;
|
|
};
|
|
|
|
int MachineFdAdd(struct MachineFds *);
|
|
void MachineFdRemove(struct MachineFds *, int);
|
|
|
|
COSMOPOLITAN_C_END_
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
|
#endif /* COSMOPOLITAN_TOOL_BUILD_LIB_FDS_H_ */
|