Repository navigation
Agent API_p3
Previous: API_p2.md
Imported by: drivers/kbd.c, drivers/usbhid.c, kernel/console_in.c, kernel/exec.c, kernel/shell.c, kernel/syscalls.c, kernel/vga_fb.c
-
kbd_available(function)headers/drivers/kbd.h:9int kbd_available(void); -
kbd_read(function)headers/drivers/kbd.h:10int kbd_read(void); -
kbd_feed_scancode(function)headers/drivers/kbd.h:11int kbd_feed_scancode(unsigned char sc); -
kbd_reset_for_shell(function)headers/drivers/kbd.h:12void kbd_reset_for_shell(void); -
kbd_get_layout(function)headers/drivers/kbd.h:15int kbd_get_layout(void);-- Keyboard layout: US qwerty (default) or Spanish (Spain) qwerty. -
kbd_set_layout(function)headers/drivers/kbd.h:16void kbd_set_layout(int layout); -
kbd_toggle_layout(function)headers/drivers/kbd.h:17void kbd_toggle_layout(void); -
kbd_q_empty(function)headers/drivers/kbd.h:27int kbd_q_empty(void);-- Printable test for console input: ASCII 32..126 plus Latin-1 160..255 (the ES layout emits single-byte Latin-1 for ñ... -
kbd_q_pop(function)headers/drivers/kbd.h:28int kbd_q_pop(void); -
kbd_q_push(function)headers/drivers/kbd.h:29void kbd_q_push(unsigned char c); -
kbd_drop_counts(function)headers/drivers/kbd.h:32void kbd_drop_counts(unsigned long *cooked, unsigned long *raw);-- Printable test for console input: ASCII 32..126 plus Latin-1 160..255 (the ES layout emits single-byte Latin-1 for ñ... -
kbd_raw_mode_get(function)headers/drivers/kbd.h:35int kbd_raw_mode_get(void);-- DEL (127) and the C1 controls (128..159) are never input. static inline int kbd_is_printable(int c) { return (c >=... -
kbd_raw_mode_set(function)headers/drivers/kbd.h:36void kbd_raw_mode_set(int on); -
kbd_raw_empty(function)headers/drivers/kbd.h:37int kbd_raw_empty(void); -
kbd_raw_pop(function)headers/drivers/kbd.h:38int kbd_raw_pop(void); -
kbd_raw_push_byte(function)headers/drivers/kbd.h:39void kbd_raw_push_byte(unsigned char c); -
kbd_e0_get(function)headers/drivers/kbd.h:40int kbd_e0_get(void); -
kbd_e0_set(function)headers/drivers/kbd.h:41void kbd_e0_set(int v); -
kbd_flush_all(function)headers/drivers/kbd.h:42void kbd_flush_all(void); -
kbd_raw_flush(function)headers/drivers/kbd.h:43void kbd_raw_flush(void); -
kbd_sys_raw_filter(function)headers/drivers/kbd.h:50int kbd_sys_raw_filter(unsigned char sc);-- Raw-path WM filter for the SYS_KBD direct-port read (DOOM/Quake/Nuklear read scancodes one byte per syscall...
Imported by: drivers/kbd.c, drivers/usbhid.c, headers/wm_events.h, tests/test_modifiers.c
-
modifiers_init(function)headers/drivers/modifiers.h:37static inline void modifiers_init(modifier_state_t *st)-- int ctrl_r; int alt_l; int alt_r; int super_l; int super_r; } modifier_keys_t; #define MOD_SHIFT (1 << 0) #define... -
modifiers_update(function)headers/drivers/modifiers.h:54static inline int modifiers_update(const modifier_keys_t *keys, ...-- Docstring: Track one make or break code, 1 when consumed. -
modifiers_match(function)headers/drivers/modifiers.h:92static inline int modifiers_match(const modifier_state_t *st, int mask)-- return 1; } if (code == keys->alt_r) { st->altgr = pressed; return 1; } if (code == keys->super_l || code ==...
Imported by: drivers/mouse.c, kernel/sched.c
-
mouse_hw_init(function)headers/drivers/mouse.h:11void mouse_hw_init(void);-- Docstring: mouse.h -- boundary of the PS/2 mouse device driver (drivers/mouse.c). -
mouse_disable(function)headers/drivers/mouse.h:14void mouse_disable(void);-- Docstring: mouse.h -- boundary of the PS/2 mouse device driver (drivers/mouse.c). -
mouse_enable(function)headers/drivers/mouse.h:17void mouse_enable(void);-- Docstring: mouse.h -- boundary of the PS/2 mouse device driver (drivers/mouse.c).
Imported by: drivers/block.c, drivers/nvme.c, kernel/shell.c
-
nvme_init(function)headers/drivers/nvme.h:4int nvme_init(void); -
nvme_present(function)headers/drivers/nvme.h:5int nvme_present(void); -
nvme_version(function)headers/drivers/nvme.h:6unsigned nvme_version(void); -
nvme_note(function)headers/drivers/nvme.h:7const char *nvme_note(void); -
nvme_sectors(function)headers/drivers/nvme.h:8unsigned long nvme_sectors(void); -
nvme_read_sectors(function)headers/drivers/nvme.h:9int nvme_read_sectors(unsigned lba, unsigned count, void *buf);
Imported by: drivers/nvme.c, drivers/virtio_blk.c, drivers/virtio_net.c, drivers/xhci.c, net/rtl8139.c, tests/test_pci.c
-
pci_cfg_read(function)headers/drivers/pci.h:80static inline unsigned pci_cfg_read(unsigned bus, unsigned dev, unsigned func, unsigned r...-- Docstring: Read one config dword. -
pci_cfg_write(function)headers/drivers/pci.h:90static inline void pci_cfg_write(unsigned bus, unsigned dev, unsigned func, unsigned reg,...-- Docstring: Read one config dword. -
pci_cfg_read8(function)headers/drivers/pci.h:100static inline unsigned char pci_cfg_read8(unsigned bus, unsigned dev, unsigned func, unsi...-- Docstring: Read a config byte. -
pci_cfg_write8(function)headers/drivers/pci.h:109static inline void pci_cfg_write8(unsigned bus, unsigned dev, unsigned func, unsigned reg...-- Docstring: Read a config byte. -
pci_present(function)headers/drivers/pci.h:122static inline int pci_present(unsigned bus, unsigned dev, unsigned func, void (*outl)(uns...-- Docstring: True when a function is populated. -
xHCI(function)headers/drivers/pci.h:134`* base class: an xHCI (0x0C/0x03/0x30) would look for class 0x03, and a PCI
- bridge (0x06/0x04)...`
-
pci_is_multifunction(function)headers/drivers/pci.h:152static inline int pci_is_multifunction(unsigned bus, unsigned dev, void (*outl)(unsigned ...-- Docstring: True when a function advertises more than one function in its * slot, so the walk must visit every... -
pci_find(function)headers/drivers/pci.h:165static inline int pci_find(unsigned vendor, unsigned device, unsigned (*inl)(unsigned sho...-- Docstring: Find a device by vendor/device ID on bus 0. -
pci_find_class(function)headers/drivers/pci.h:193static inline int pci_find_class(pci_bdf_t *out, unsigned cls, unsigned subclass, unsigne...-- The walk starts at bus 0 and follows each PCI-to-PCI bridge's secondary bus number, so a controller behind a chipset... -
pci_bar_count(function)headers/drivers/pci.h:248static inline unsigned pci_bar_count(unsigned bus, unsigned dev, unsigned func, void (*ou...-- outl, inl)) { unsigned sec = pci_cfg_read8(bus, dev, 0, PCI_REG_BRIDGE_SECONDARY, outl, inl); if (sec != 0u && sec <... -
pci_bar_is_io(function)headers/drivers/pci.h:263static inline int pci_bar_is_io(unsigned bus, unsigned dev, unsigned func, unsigned bar, ...-- void (*outl)(unsigned short, unsigned), unsigned (*inl)(unsigned short)) { unsigned n = 0; while (n <... -
pci_bar_is_64bit(function)headers/drivers/pci.h:274static inline int pci_bar_is_64bit(unsigned bus, unsigned dev, unsigned func, unsigned ba...-- Docstring: True when a BAR is a 64-bit memory BAR, so its high dword is * the next BAR slot and must be programmed... -
pci_bar_ctz32(function)headers/drivers/pci.h:284static inline unsigned pci_bar_ctz32(unsigned val)-- Docstring: True when a BAR is a 64-bit memory BAR, so its high dword is * the next BAR slot and must be programmed... -
pci_bar_size_from_mask(function)headers/drivers/pci.h:315static inline unsigned long long pci_bar_size_from_mask(unsigned long long mask)-- A BAR that fits below 4 GB has its unimplemented lines in the low half and an all-ones high half. -
pci_bar_size(function)headers/drivers/pci.h:346static inline unsigned long long pci_bar_size(unsigned bus, unsigned dev, unsigned func, ...-- The mask is what proves the region is big enough; a size is never assumed from a spec table because a wrong answer... -
pci_bar_relocate(function)headers/drivers/pci.h:382static inline int pci_bar_relocate(unsigned bus, unsigned dev, unsigned func, unsigned ba...-- Docstring: Program a memory BAR with a physical base address. -
pci_bar_base(function)headers/drivers/pci.h:406static inline unsigned long long pci_bar_base(unsigned bus, unsigned dev, unsigned func, ...-- Docstring: Physical base a memory BAR is programmed with, read back from the device. -
pci_bar_restore(function)headers/drivers/pci.h:424static inline void pci_bar_restore(unsigned bus, unsigned dev, unsigned func, unsigned ba...-- Docstring: Restore a BAR pair to previously saved raw values.
Imported by: drivers/block.c, drivers/usbblk.c, kernel.c, kernel/shell.c, tests/test_usbblk.c
-
ubk_init(function)headers/drivers/usbblk.h:21int ubk_init(void);-- Docstring: Bring up mass storage on every enumerated device. -
ubk_present(function)headers/drivers/usbblk.h:24int ubk_present(void);-- Docstring: Bring up mass storage on every enumerated device. -
ubk_sectors(function)headers/drivers/usbblk.h:27unsigned long ubk_sectors(void);-- Docstring: Bring up mass storage on every enumerated device. -
ubk_read_sectors(function)headers/drivers/usbblk.h:32int ubk_read_sectors(unsigned long lba, unsigned count, void *buf);-- Docstring: Read or write whole 512-byte sectors. -
ubk_write_sectors(function)headers/drivers/usbblk.h:33int ubk_write_sectors(unsigned long lba, unsigned count, const void *buf); -
ubk_counters(function)headers/drivers/usbblk.h:46void ubk_counters(ubk_counters_t *out);-- Docstring: Counters, so a disk that is absent is distinguishable from a * driver that is broken. typedef struct {... -
ubk_build_cbw(function)headers/drivers/usbblk.h:52void ubk_build_cbw(unsigned char *out, unsigned tag, unsigned long lba, unsigned blocks, int read, int data_len);-- Docstring: Build a Command Block Wrapper into out, which must have room for UBK_CBW_LEN bytes. -
ubk_check_csw(function)headers/drivers/usbblk.h:60int ubk_check_csw(const unsigned char *csw, unsigned tag, unsigned expect_len);-- Docstring: Check a Command Status Wrapper.
Imported by: drivers/usbhid.c, kernel.c, kernel/console_in.c, kernel/shell.c, tests/test_usbhid.c
-
usbhid_init(function)headers/drivers/usbhid.h:60int usbhid_init(void);-- Docstring: Bring up HID on every enumerated device and report what was found. -
usbhid_poll_keyboard(function)headers/drivers/usbhid.h:64int usbhid_poll_keyboard(void);-- Docstring: Service the interrupt endpoint of a claimed keyboard. -
usbhid_poll_mouse(function)headers/drivers/usbhid.h:68int usbhid_poll_mouse(void);-- Docstring: Service the interrupt endpoint of a claimed mouse. -
usbhid_poll(function)headers/drivers/usbhid.h:71int usbhid_poll(void);-- Docstring: Service the interrupt endpoint of a claimed mouse. -
usbhid_keyboard_present(function)headers/drivers/usbhid.h:76int usbhid_keyboard_present(void);-- Docstring: True when a USB keyboard is driving the input path, so the keyboard driver can skip the PS/2 port instead... -
usbhid_mouse_present(function)headers/drivers/usbhid.h:79int usbhid_mouse_present(void);-- Docstring: True when a USB keyboard is driving the input path, so the keyboard driver can skip the PS/2 port instead... -
usbhid_press_kbd_report(function)headers/drivers/usbhid.h:84int usbhid_press_kbd_report(const unsigned char report[HID_KBD_REPORT_LEN]);-- Docstring: Feed a boot keyboard report through the differ, for the host test and the in-OS self test. -
usbhid_kbd_scancodes(function)headers/drivers/usbhid.h:94int usbhid_kbd_scancodes(const unsigned char prev[HID_KBD_REPORT_LEN], const unsigned char cur[HID_KBD_REPORT_LEN]...-- Docstring: Set-1 scancode stream for one keyboard report transition. -
usbhid_mouse_decode(function)headers/drivers/usbhid.h:102void usbhid_mouse_decode(const unsigned char prev[HID_MOUSE_REPORT_LEN], const unsigned char...-- Docstring: Decode one boot mouse report transition into screen-space motion, buttons and wheel. -
usbhid_counters(function)headers/drivers/usbhid.h:116void usbhid_counters(usbhid_counters_t *out);-- Docstring: Counters, so a device that is absent is distinguishable from a * driver that is broken. typedef struct {... -
usbhid_set1_from_usage(function)headers/drivers/usbhid.h:127int usbhid_set1_from_usage(unsigned usage, unsigned char *sc, int *e0);-- Docstring: Translate a HID usage code to its PS/2 set-1 make code and whether it needs the 0xE0 prefix.
Imported by: drivers/block.c, drivers/virtio_blk.c, kernel.c, kernel/shell.c
-
vblk_init(function)headers/drivers/virtio_blk.h:11int vblk_init(void); -
vblk_present(function)headers/drivers/virtio_blk.h:12int vblk_present(void); -
vblk_sectors(function)headers/drivers/virtio_blk.h:13unsigned long vblk_sectors(void); -
vblk_read_sectors(function)headers/drivers/virtio_blk.h:14int vblk_read_sectors(unsigned lba, unsigned count, void *buf); -
vblk_write_sectors(function)headers/drivers/virtio_blk.h:15int vblk_write_sectors(unsigned lba, unsigned count, const void *buf); -
vblk_register_device(function)headers/drivers/virtio_blk.h:18void vblk_register_device(void);-- sector contract: probe once, then read/write 512-byte sectors by LBA.
Imported by: drivers/virtio_net.c, kernel/shell.c, net/net.c
-
vnet_init(function)headers/drivers/virtio_net.h:16int vnet_init(void);-- Docstring: Probe PCI for a virtio-net device and bring both queues up. -
vnet_present(function)headers/drivers/virtio_net.h:19int vnet_present(void);-- Docstring: Probe PCI for a virtio-net device and bring both queues up. -
failure(function)headers/drivers/virtio_net.h:22* 0 on failure (no device, oversize, or TX deadline expiry). Pads * short frames to 60 bytes like the rtl8139 path.... -
vnet_poll(function)headers/drivers/virtio_net.h:28void vnet_poll(void);-- Docstring: Drain completed RX buffers into net_rx_handle_frame, * reposting every descriptor. -
vnet_get_mac(function)headers/drivers/virtio_net.h:31void vnet_get_mac(unsigned char out[6]);-- Docstring: Drain completed RX buffers into net_rx_handle_frame, * reposting every descriptor. -
vnet_iobase(function)headers/drivers/virtio_net.h:34unsigned short vnet_iobase(void);-- Docstring: Drain completed RX buffers into net_rx_handle_frame, * reposting every descriptor. -
vnet_counters(function)headers/drivers/virtio_net.h:37void vnet_counters(unsigned int *tx_frames, unsigned int *rx_frames);-- Docstring: Drain completed RX buffers into net_rx_handle_frame, * reposting every descriptor. -
vnet_link_up(function)headers/drivers/virtio_net.h:40int vnet_link_up(void);-- Docstring: Drain completed RX buffers into net_rx_handle_frame, * reposting every descriptor.
Imported by: drivers/usbblk.c, drivers/usbhid.c, drivers/xhci.c, kernel.c, kernel/console_in.c, kernel/sched.c, kernel/shell.c, tests/test_xhci.c
-
xhc_init(function)headers/drivers/xhci.h:140int xhc_init(void);-- Docstring: Bring up the first xHCI controller found. -
xhc_poll(function)headers/drivers/xhci.h:146int xhc_poll(void);-- Docstring: Service the event ring. -
xhc_port_count(function)headers/drivers/xhci.h:150int xhc_port_count(void);-- Docstring: Number of root ports the controller reports, bounded by * XHC_MAX_PORTS. -
xhc_port_state(function)headers/drivers/xhci.h:154int xhc_port_state(int port, xhc_port_t *out);-- Docstring: Read a root port's live state. -
xhc_port_reset(function)headers/drivers/xhci.h:159int xhc_port_reset(int port);-- Docstring: Reset a port and wait for the device on it to be addressable. -
xhc_enumerate(function)headers/drivers/xhci.h:165int xhc_enumerate(int port);-- Docstring: Reset, address, describe and register the device on a port. -
xhc_enumerate_all(function)headers/drivers/xhci.h:169int xhc_enumerate_all(void);-- Docstring: Enumerate every port that has something attached. -
xhc_device_count(function)headers/drivers/xhci.h:172int xhc_device_count(void);-- Docstring: Enumerate every port that has something attached. -
xhc_device_info(function)headers/drivers/xhci.h:175int xhc_device_info(int index, xhc_dev_t *out);-- Docstring: Enumerate every port that has something attached. -
xhc_open_interface(function)headers/drivers/xhci.h:186int xhc_open_interface(int index, unsigned cls, unsigned sub, unsigned proto, xhc_iface_t *out);-- Docstring: Find an interface of an enumerated device by class triple and copy out its endpoints. -
xhc_control(function)headers/drivers/xhci.h:193int xhc_control(int index, const unsigned char setup[8], void *data, unsigned len, int host_to_device);-- Docstring: Issue a control transfer on the control endpoint of a device. setup is the eight setup bytes, already... -
xhc_configure_endpoint(function)headers/drivers/xhci.h:200int xhc_configure_endpoint(int index, int ep_index, int ep_addr, int ep_type, int max_packet, int mult, int...-- Docstring: Configure one non-control endpoint and give it a transfer ring. ep_index is the endpoint context index... -
xhc_transfer(function)headers/drivers/xhci.h:211int xhc_transfer(int index, int ep_index, void *buf, unsigned len, int *got);-- Docstring: Move data on a configured endpoint and wait for its transfer event. len must be exactly what the... -
xhc_reset_endpoint(function)headers/drivers/xhci.h:216int xhc_reset_endpoint(int index, int ep_index);-- Docstring: Stop, reset and re-point one endpoint's transfer ring after a stall or a timeout, so Bulk-Only recovery... -
xhc_transfer_async(function)headers/drivers/xhci.h:220int xhc_transfer_async(int index, int ep_index, void *buf, unsigned len);-- Docstring: Post one endpoint transfer without waiting. -
xhc_poll_token_limit(function)headers/drivers/xhci.h:225int xhc_poll_token_limit(int token, unsigned budget_ms);-- Docstring: Non-blocking completion check: 1 on success, -1 on a failed completion, -2 past the transfer budget, 0... -
xhc_poll_token(function)headers/drivers/xhci.h:226int xhc_poll_token(int token); -
xhc_counters(function)headers/drivers/xhci.h:229void xhc_counters(xhc_counters_t *out);-- Docstring: Non-blocking completion check: 1 on success, -1 on a failed completion, -2 past the transfer budget, 0... -
xhc_probe_note(function)headers/drivers/xhci.h:234const char *xhc_probe_note(void);-- Docstring: Why the last xhc_init failed, or NULL when it succeeded. -
xhc_info(function)headers/drivers/xhci.h:238int xhc_info(unsigned *version, unsigned *slots, unsigned *ports, unsigned *caplength);-- Docstring: Controller version and capability-derived limits for the usb * builtin.
Depends on: headers/kernel.h
Imported by: kernel/editor.c, kernel/shell.c
-
shell_cmd_edit(function)headers/editor.h:15void shell_cmd_edit(int argc, char **argv);
Imported by: fs/ext4.c, fs/vfs.c, kernel/shell.c, tests/test_ext4.c
-
ext4_list(function)headers/ext4.h:35int ext4_list(const char *imgpath, const char *dirpath, char names[][EXT4_NAME_MAX + 1], int *isdir, int cap);-- List one directory: names (dirs with trailing '/') up to cap. * Returns the entry count, or -1 when the image, path... -
ext4_vfs_open(function)headers/ext4.h:40int ext4_vfs_open(const char *path, int mode, void **handle);-- VFS verbs: open "imgpath:extpath" (first ':' splits), read, close, * fstat. -
ext4_vfs_read(function)headers/ext4.h:41int ext4_vfs_read(void *handle, void *buf, unsigned long pos, unsigned long len); -
ext4_vfs_write(function)headers/ext4.h:43int ext4_vfs_write(void *handle, const void *buf, unsigned long pos, unsigned long len); -
ext4_vfs_close(function)headers/ext4.h:45int ext4_vfs_close(void *handle); -
ext4_vfs_fstat(function)headers/ext4.h:46int ext4_vfs_fstat(void *handle, unsigned long *size_out); -
ext4_vfs_truncate(function)headers/ext4.h:47int ext4_vfs_truncate(void *handle, unsigned long size); -
first(function)headers/ext4.h:50* MBR 0x83 entry first (proven by a superblock read), then a magic * scan over 2048-aligned LBAs for superfloppy...
Imported by: fs/fat32.c, fs/vfs.c, kernel/shell.c, tests/test_fat32.c
-
file(function)headers/fat32.h:6* * A FAT32 disk image stored as a regular file (built on the host with * mkfs.vfat, packed into minifs.bin) is... -
fat32_list(function)headers/fat32.h:45int fat32_list(const char *imgpath, const char *dirpath, char names[][FAT32_NAME_MAX], int *isdir, int cap);-- List one directory: names (dirs with trailing '/') up to cap. * Returns the entry count, or -1 when the image, path... -
fat_dev_base(function)headers/fat32.h:54long fat_dev_base(void);-- Locate the first FAT32 partition on the primary IDE master: a real MBR FAT32 entry first (real hardware with a... -
fat32_vfs_open(function)headers/fat32.h:58int fat32_vfs_open(const char *path, int mode, void **handle);-- VFS verbs: open "imgpath:fatpath" (first ':' splits), read, close, * fstat. -
fat32_vfs_read(function)headers/fat32.h:59int fat32_vfs_read(void *handle, void *buf, unsigned long pos, unsigned long len); -
fat32_vfs_write(function)headers/fat32.h:61int fat32_vfs_write(void *handle, const void *buf, unsigned long pos, unsigned long len); -
fat32_vfs_close(function)headers/fat32.h:63int fat32_vfs_close(void *handle); -
fat32_vfs_fstat(function)headers/fat32.h:64int fat32_vfs_fstat(void *handle, unsigned long *size_out); -
fat32_vfs_truncate(function)headers/fat32.h:65int fat32_vfs_truncate(void *handle, unsigned long size);
Imported by: fs/ext4.c, fs/fat32.c, fs/fsimg.c, tests/test_ext4.c, tests/test_fat32.c
-
fsimg_open_file(function)headers/fsimg.h:23int fsimg_open_file(const char *resolved, fsimg_t *img);-- Open a resolved path as a loopback image. -
fsimg_open_dev(function)headers/fsimg.h:27int fsimg_open_dev(unsigned long base_lba, unsigned long nsec, fsimg_t *img);-- Open an absolute disk region [base_lba, base_lba + nsec) as an * image. -
fsimg_read(function)headers/fsimg.h:32int fsimg_read(const fsimg_t *img, unsigned long off, void *buf, unsigned long len);-- Read len bytes at off into buf. -
fsimg_split(function)headers/fsimg.h:40int fsimg_split(const char *path, char *left, unsigned llen, char *right, unsigned rlen);-- Split "left:right" at the first ':' (image names never carry one).
Depends on: headers/sched.h, headers/spinlock.h, headers/sync.h
Imported by: kernel/futex.c, kernel/sched.c, kernel/syscalls.c, tests/test_futex.c
-
futex_init(function)headers/futex.h:86void futex_init(void); -
futex_wait(function)headers/futex.h:87long futex_wait(unsigned long uaddr, int val); -
futex_wake(function)headers/futex.h:88long futex_wake(unsigned long uaddr, int n); -
FUTEX_CLOCK_REALTIME(function)headers/futex.h:93* FUTEX_CLOCK_REALTIME (it only selects the clock of a BITSET deadline). * Returns -1 for anything unserved... -
futex_linux_cmd(function)headers/futex.h:97int futex_linux_cmd(long op);-- Decode a Linux futex(2) op to LINUX_FUTEX_WAIT/WAKE/WAIT_BITSET/ WAKE_BITSET, masking FUTEX_PRIVATE_FLAG... -
futex_timeout_remaining_us(function)headers/futex.h:104long futex_timeout_remaining_us(int cmd, long sec, long nsec, unsigned long now_us);-- Microseconds left before a futex timeout: relative for WAIT, absolute (against now_us on the op's clock) for...
Imported by: kernel/shell.c, tests/test_httpd.c
-
httpd_ctype(function)headers/httpd.h:28static inline const char *httpd_ctype(const char *path)-- Docstring: Content type by file suffix. -
httpd_header(function)headers/httpd.h:121static inline int httpd_header(int code, const char *reason, const char *ctype, unsigned ...-- Docstring: Emit a response head into out.
Imported by: drivers/block.c, drivers/ide.c, fs/minifs.c, kernel.c, kernel/mm/swap.c, kernel/syscalls.c
-
ide_init(function)headers/ide.h:49void ide_init(void);-- #define IDE_CMD_FLUSH 0xE7 /* FLUSH CACHE /* Drive/Head register bits #define IDE_DRIVE_LBA 0x40... -
ide_read_sectors(function)headers/ide.h:53int ide_read_sectors(unsigned int lba, unsigned int count, void *buf);-- Read/write sectors using 28-bit LBA. * Returns 0 on success, -1 on error. -
ide_write_sectors(function)headers/ide.h:54int ide_write_sectors(unsigned int lba, unsigned int count, const void *buf); -
ide_read_sector(function)headers/ide.h:57int ide_read_sector(unsigned int lba, void *buf);-- Read/write sectors using 28-bit LBA. * Returns 0 on success, -1 on error. int ide_read_sectors(unsigned int lba... -
ide_write_sector(function)headers/ide.h:58int ide_write_sector(unsigned int lba, const void *buf); -
ide_total_sectors(function)headers/ide.h:61unsigned int ide_total_sectors(void);-- Read/write sectors using 28-bit LBA. * Returns 0 on success, -1 on error. int ide_read_sectors(unsigned int lba... -
ide_present(function)headers/ide.h:64int ide_present(void);-- Read/write sectors using 28-bit LBA. * Returns 0 on success, -1 on error. int ide_read_sectors(unsigned int lba... -
ide_register_device(function)headers/ide.h:68void ide_register_device(void);-- Publish the Strategy ops table to the device registry (driver.h). * Called from ide_init; re-registration is a no-op...
Depends on: headers/ldso.h, headers/pipe.h, headers/spinlock.h, headers/vma.h, progs/minios_abi.h
Imported by: headers/editor.h, headers/shell.h, headers/spawn.h, headers/tls_port.h
-
ktime_ms(function)headers/kernel.h:25unsigned long ktime_ms(void);-- Forward: PIT-calibrated wall clock (defined in kernel/time.c); valid * once pit_init has run. -
outb(function)headers/kernel.h:26static inline void outb(unsigned short port, unsigned char val) -
inb(function)headers/kernel.h:29static inline unsigned char inb(unsigned short port) -
outw(function)headers/kernel.h:34static inline void outw(unsigned short port, unsigned short val) -
inw(function)headers/kernel.h:37static inline unsigned short inw(unsigned short port) -
insw(function)headers/kernel.h:47static inline void insw(unsigned short port, unsigned short *buf, unsigne...-- String port I/O: one instruction movescountwords between the port and the buffer. -
outsw(function)headers/kernel.h:54static inline void outsw(unsigned short port, const unsigned short *buf, ... -
waits(function)headers/kernel.h:64`* and mouse_hw_init issues dozens of waits (measured 5 s of boot). This
- polls the port once p...`
-
vga_clear(function)headers/kernel.h:94void vga_clear(void); -
vga_putc(function)headers/kernel.h:95void vga_putc(char c); -
vga_puts(function)headers/kernel.h:96void vga_puts(const char *s); -
vga_scroll(function)headers/kernel.h:97void vga_scroll(void); -
vga_set_cursor(function)headers/kernel.h:98void vga_set_cursor(int x, int y); -
vga_newline(function)headers/kernel.h:99void vga_newline(void); -
vga_cursor_enable(function)headers/kernel.h:100void vga_cursor_enable(int on); -
vga_get_x(function)headers/kernel.h:108int vga_get_x(void);-- Console output lock (kernel/console.c): serializes SMP console output across CPUs. -
vga_get_y(function)headers/kernel.h:109int vga_get_y(void); -
vga_set_xy(function)headers/kernel.h:110void vga_set_xy(int x, int y); -
vga_get_color(function)headers/kernel.h:111char vga_get_color(void); -
minfo_sleep_init(function)headers/kernel.h:116void minfo_sleep_init(int tick_ok);-- MINFO sleep support (kernel/syscalls.c): timed park for ring-3 monitors. sched_init passes the tick-registration... -
minfo_tick_wake(function)headers/kernel.h:117void minfo_tick_wake(void *ctx); -
sb_init(function)headers/kernel.h:120void sb_init(void);-- MINFO sleep support (kernel/syscalls.c): timed park for ring-3 monitors. sched_init passes the tick-registration... -
sb_capture_row0(function)headers/kernel.h:121void sb_capture_row0(void); -
sb_reset(function)headers/kernel.h:122void sb_reset(void); -
sb_get_count(function)headers/kernel.h:123int sb_get_count(void); -
sb_get_head(function)headers/kernel.h:124int sb_get_head(void); -
sb_get_char(function)headers/kernel.h:125char sb_get_char(int row, int col); -
serial_init(function)headers/kernel.h:128void serial_init(void);-- monitors. sched_init passes the tick-registration result; without a * registered waker sel 6 fails closed instead of... -
serial_putc(function)headers/kernel.h:129void serial_putc(char c); -
serial_puts(function)headers/kernel.h:130void serial_puts(const char *s); -
sc_record_dump(function)headers/kernel.h:131void sc_record_dump(int pid); -
serial_e_count(function)headers/kernel.h:132unsigned long serial_e_count(void); -
serial_available(function)headers/kernel.h:134int serial_available(void);-- void sb_init(void); void sb_capture_row0(void); void sb_reset(void); int sb_get_count(void); int... -
serial_getc(function)headers/kernel.h:135int serial_getc(void); -
kbd_read(function)headers/kernel.h:173int kbd_read(void); -
kbd_available(function)headers/kernel.h:174int kbd_available(void); -
kbd_reset_for_shell(function)headers/kernel.h:175void kbd_reset_for_shell(void); -
kmalloc(function)headers/kernel.h:213void *kmalloc(unsigned long size); -
kfree(function)headers/kernel.h:215void kfree(void *ptr); -
kcalloc(function)headers/kernel.h:216void *kcalloc(unsigned long nmemb, unsigned long size); -
krealloc(function)headers/kernel.h:217void *krealloc(void *ptr, unsigned long size); -
kallocator_init(function)headers/kernel.h:218void kallocator_init(void); -
kmalloc_aligned(function)headers/kernel.h:219void *kmalloc_aligned(unsigned long size, unsigned long align); -
kmalloc_page(function)headers/kernel.h:221void *kmalloc_page(void);-- define KMALLOC_PAGE 0x1000UL -
kfree_aligned(function)headers/kernel.h:222void kfree_aligned(void *ptr); -
dlmalloc_init(function)headers/kernel.h:226void dlmalloc_init(unsigned long size);-- dlmalloc backend (third_party/dlmalloc): an mspace rooted over the fixed * kernel heap. -
dlmalloc_malloc(function)headers/kernel.h:230void *dlmalloc_malloc(unsigned long size); -
dlmalloc_memalign(function)headers/kernel.h:231void *dlmalloc_memalign(unsigned long align, unsigned long size); -
dlmalloc_free(function)headers/kernel.h:232void dlmalloc_free(void *ptr); -
dlmalloc_calloc(function)headers/kernel.h:233void *dlmalloc_calloc(unsigned long nmemb, unsigned long size); -
dlmalloc_realloc(function)headers/kernel.h:234void *dlmalloc_realloc(void *ptr, unsigned long size); -
dlmalloc_usage(function)headers/kernel.h:236void dlmalloc_usage(unsigned long *used, unsigned long *free_b, unsigned long *arena);-- Bytes of kernel heap actually in use as the dlmalloc space: HEAP_SIZE * clamped to the RAM installed above... -
ramdisk_init(function)headers/kernel.h:278void ramdisk_init(void); -
ramdisk_open(function)headers/kernel.h:279RDFile *ramdisk_open(const char *name); -
ramdisk_read(function)headers/kernel.h:280int ramdisk_read(RDFile *f, void *buf, unsigned offset, unsigned len); -
ramdisk_write(function)headers/kernel.h:281int ramdisk_write(RDFile *f, const void *buf, unsigned offset, unsigned len); -
ramdisk_create(function)headers/kernel.h:282RDFile *ramdisk_create(const char *name, unsigned size); -
ramdisk_resize(function)headers/kernel.h:283int ramdisk_resize(RDFile *f, unsigned newsize); -
ramdisk_delete(function)headers/kernel.h:284int ramdisk_delete(RDFile *f); -
RAMDISK_FNAME_LEN(function)headers/kernel.h:286* RAMDISK_FNAME_LEN (fs_resolve guarantees it); -
ramdisk_rename(function)headers/kernel.h:288int ramdisk_rename(const char *oldname, const char *newname);-- Docstring: In-place rename of one ramdisk entry. -
ramdisk_list(function)headers/kernel.h:289int ramdisk_list(RDFile **out, int max); -
ramdisk_setup_from(function)headers/kernel.h:290void ramdisk_setup_from(void *data, unsigned size); -
ramdisk_count(function)headers/kernel.h:291int ramdisk_count(void); -
ramdisk_file_name(function)headers/kernel.h:292const char *ramdisk_file_name(int idx); -
ramdisk_usage(function)headers/kernel.h:294void ramdisk_usage(unsigned *used, unsigned *cap, unsigned *max);-- Docstring: In-place rename of one ramdisk entry. -
fs_resolve(function)headers/kernel.h:302int fs_resolve(const char *path, char *out, unsigned cap);-- Path resolution choke point shared by the shell builtins and the zip builtins. fs_resolve resolves a path against... -
fs_dir_exists(function)headers/kernel.h:303int fs_dir_exists(const char *dir); -
fs_is_dir(function)headers/kernel.h:304int fs_is_dir(const char *resolved); -
vfs_register(function)headers/kernel.h:408int vfs_register(const char *prefix, const vfs_ops_t *ops, const char *driver); -
vfs_unregister(function)headers/kernel.h:409int vfs_unregister(const char *prefix); -
vfs_list(function)headers/kernel.h:413int vfs_list(char prefixes[][VFS_PREFIX_LEN], char drivers[][VFS_DRIVER_LEN], int refs[], int cap);-- define VFS_MAX_MOUNTS 8 define VFS_PREFIX_LEN 32 define VFS_DRIVER_LEN 16 -
vfs_mount_driver(function)headers/kernel.h:415int vfs_mount_driver(const char *prefix, const char *driver); -
vfs_open(function)headers/kernel.h:416int vfs_open(const char *path, int mode, vfs_file_t *f); -
vfs_read(function)headers/kernel.h:417int vfs_read(vfs_file_t *f, void *buf, unsigned long len); -
vfs_write(function)headers/kernel.h:418int vfs_write(vfs_file_t *f, const void *buf, unsigned long len); -
vfs_close(function)headers/kernel.h:419int vfs_close(vfs_file_t *f); -
vfs_fstat(function)headers/kernel.h:420int vfs_fstat(vfs_file_t *f, unsigned long *size_out); -
vfs_readdir(function)headers/kernel.h:421int vfs_readdir(const char *path, vfs_dirent_t *ents, int cap); -
vfs_init(function)headers/kernel.h:422void vfs_init(void); -
vfs_register_builtins(function)headers/kernel.h:423void vfs_register_builtins(void); -
minifs_mkdir_p(function)headers/kernel.h:424int minifs_mkdir_p(const char *resolved); -
kfopen(function)headers/kernel.h:483KFILE *kfopen(const char *path, const char *mode); -
kfclose(function)headers/kernel.h:484int kfclose(KFILE *f); -
today(function)headers/kernel.h:489* cell is correct today (single shared ET_REL window, no miniGCC * threads); -
fs_rename(function)headers/kernel.h:508int fs_rename(const char *oldr, const char *newr);-- Rename one file within its filesystem; see fs/kfile.c for the contract: * 0 ok, -2 missing src, -21 directory, -17... -
kfgetc(function)headers/kernel.h:509int kfgetc(KFILE *f); -
kfgets(function)headers/kernel.h:510char *kfgets(char *buf, int size, KFILE *f); -
kfungetc(function)headers/kernel.h:511int kfungetc(int c, KFILE *f); -
kfread(function)headers/kernel.h:512unsigned long kfread(void *ptr, unsigned long size, unsigned long nmemb, KFILE *f); -
kfwrite(function)headers/kernel.h:513unsigned long kfwrite(const void *ptr, unsigned long size, unsigned long nmemb, KFILE *f); -
kfseek(function)headers/kernel.h:514int kfseek(KFILE *f, long offset, int whence); -
kftell(function)headers/kernel.h:515long kftell(KFILE *f); -
kfputs(function)headers/kernel.h:516int kfputs(const char *s, KFILE *f); -
kfputc(function)headers/kernel.h:517int kfputc(int c, KFILE *f); -
kfflush(function)headers/kernel.h:518int kfflush(KFILE *f); -
krewind(function)headers/kernel.h:519void krewind(KFILE *f); -
kfile_stdin(function)headers/kernel.h:524KFILE *kfile_stdin(void); -
kfile_stdout(function)headers/kernel.h:525KFILE *kfile_stdout(void); -
kfile_stderr(function)headers/kernel.h:526KFILE *kfile_stderr(void); -
kstrlen(function)headers/kernel.h:529unsigned long kstrlen(const char *s);-- long kftell(KFILE *f); int kfputs(const char *s, KFILE *f); int kfputc(int c, KFILE *f); int... -
kstrcpy(function)headers/kernel.h:530char *kstrcpy(char *dst, const char *src); -
kstrncpy(function)headers/kernel.h:531char *kstrncpy(char *dst, const char *src, unsigned long n); -
kstrncat(function)headers/kernel.h:532char *kstrncat(char *dst, const char *src, unsigned long n); -
kstrcmp(function)headers/kernel.h:533int kstrcmp(const char *a, const char *b); -
kstrncmp(function)headers/kernel.h:534int kstrncmp(const char *a, const char *b, unsigned long n); -
kstrchr(function)headers/kernel.h:535char *kstrchr(const char *s, int c); -
kstrstr(function)headers/kernel.h:536char *kstrstr(const char *hay, const char *ndl); -
kmemcpy(function)headers/kernel.h:537void *kmemcpy(void *dst, const void *src, unsigned long n); -
kmemset(function)headers/kernel.h:538void *kmemset(void *dst, int c, unsigned long n); -
kmemcmp(function)headers/kernel.h:539int kmemcmp(const void *a, const void *b, unsigned long n); -
kmemmove(function)headers/kernel.h:540void *kmemmove(void *dst, const void *src, unsigned long n); -
katol(function)headers/kernel.h:541long katol(const char *s); -
kprintf(function)headers/kernel.h:544int kprintf(const char *fmt, ...);-- char *kstrcpy(char *dst, const char *src); char *kstrncpy(char *dst, const char *src, unsigned long n); char... -
kfprintf(function)headers/kernel.h:545int kfprintf(KFILE *f, const char *fmt, ...); -
ksprintf(function)headers/kernel.h:546int ksprintf(char *buf, const char *fmt, ...); -
ksnprintf(function)headers/kernel.h:547int ksnprintf(char *buf, unsigned long size, const char *fmt, ...); -
klog(function)headers/kernel.h:562void klog(log_level_t level, log_subsystem_t subsys, const char *fmt, ...); -
klog_hexdump(function)headers/kernel.h:564void klog_hexdump(log_level_t level, log_subsystem_t subsys, const void *data, unsigned long len, const char *label); -
klog_set_level(function)headers/kernel.h:566void klog_set_level(log_level_t level); -
klog_set_subsys_level(function)headers/kernel.h:567void klog_set_subsys_level(log_subsystem_t subsys, log_level_t level); -
klog_disable(function)headers/kernel.h:568void klog_disable(void); -
klog_enable(function)headers/kernel.h:569void klog_enable(void); -
shell_init(function)headers/kernel.h:572void shell_init(void);-- LOG_SUBSYS_SHELL, LOG_SUBSYS_BOOT, LOG_SUBSYS_GENERAL, LOG_SUBSYS_COUNT } log_subsystem_t; void klog(log_level_t... -
shell_run(function)headers/kernel.h:573void shell_run(void); -
console_getc(function)headers/kernel.h:574int console_getc(void); -
console_peek(function)headers/kernel.h:575int console_peek(void); -
redirect_suspend(function)headers/kernel.h:576int redirect_suspend(void); -
redirect_resume(function)headers/kernel.h:577void redirect_resume(int was); -
redirect_begin(function)headers/kernel.h:578int redirect_begin(void); -
redirect_commit(function)headers/kernel.h:579int redirect_commit(const char *path, int append_mode); -
redirect_take(function)headers/kernel.h:580char *redirect_take(unsigned long *len_out); -
redirect_pending(function)headers/kernel.h:581unsigned long redirect_pending(void); -
redirect_take_into(function)headers/kernel.h:582unsigned long redirect_take_into(char *dst, unsigned long cap, unsigned long *len_out); -
redirect_discard(function)headers/kernel.h:584void redirect_discard(void); -
redirect_active(function)headers/kernel.h:585int redirect_active(void); -
console_stdin_push(function)headers/kernel.h:586int console_stdin_push(const char *data, unsigned long len); -
console_stdin_clear(function)headers/kernel.h:587void console_stdin_clear(void); -
console_stdin_active(function)headers/kernel.h:588int console_stdin_active(void); -
panic_screen(function)headers/kernel.h:591void panic_screen(unsigned long vector, unsigned long err, unsigned long rip, unsigned long rsp, unsigned long rbp...-- void redirect_resume(int was); int redirect_begin(void); int redirect_commit(const char *path, int append_mode)... -
clip_set(function)headers/kernel.h:595int clip_set(const char *data, unsigned long len);-- unsigned long redirect_pending(void); unsigned long redirect_take_into(char *dst, unsigned long cap, unsigned long... -
clip_get(function)headers/kernel.h:596int clip_get(char *out, unsigned long cap); -
clip_clear(function)headers/kernel.h:597void clip_clear(void); -
clip_len_get(function)headers/kernel.h:598int clip_len_get(void); -
shell_take_redirect(function)headers/kernel.h:599int shell_take_redirect(int *argc, char **argv, char **path, int *append_mode); -
shell_run_any(function)headers/kernel.h:600int shell_run_any(const char *name, int argc, char **argv); -
shell_exec_builtin(function)headers/kernel.h:601void shell_exec_builtin(int argc, char **argv); -
shell_report_exit(function)headers/kernel.h:602void shell_report_exit(int code); -
shell_report(function)headers/kernel.h:603void shell_report(const char *what, const char *detail); -
kprog_slot(function)headers/kernel.h:628KProg *kprog_slot(const char *name); -
kprog_lookup(function)headers/kernel.h:629KProg *kprog_lookup(const char *name); -
ksym_resolve(function)headers/kernel.h:630void *ksym_resolve(const char *name); -
k_spawn(function)headers/kernel.h:631int k_spawn(const char *name, int argc, char **argv); -
k_register_program(function)headers/kernel.h:632void k_register_program(const char *name, prog_entry_t entry); -
k_register_process(function)headers/kernel.h:633void k_register_process(const char *name, void *proc_entry); -
k_register_symbol(function)headers/kernel.h:634void k_register_symbol(const char *name, void *addr); -
register_libc_symbols(function)headers/kernel.h:638void register_libc_symbols(void);-- Libc name table for ET_REL programs (kernel/console.c). -
k_exec_user(function)headers/kernel.h:641int k_exec_user(void *entry, int argc, char **argv);-- Libc name table for ET_REL programs (kernel/console.c). -
k_run_rel(function)headers/kernel.h:642int k_run_rel(prog_entry_t entry, int argc, char **argv); -
kexit(function)headers/kernel.h:643void kexit(int code); -
k_run_on_stack(function)headers/kernel.h:646int k_run_on_stack(void *stack_top, prog_entry_t entry, int argc, char **argv);-- ET_REL stack switch (arch/x86/ctx_sw.S): runs entry(argc, argv) on * the 64 KB stack ending at stack_top. -
ksetjmp(function)headers/kernel.h:651int ksetjmp(void *buf) __attribute__((returns_twice)); -
klongjmp(function)headers/kernel.h:652void klongjmp(void *buf, int val) __attribute__((noreturn)); -
setup_user_stack(function)headers/kernel.h:655unsigned long *setup_user_stack(char *sbase, unsigned long ssize, int argc, char **argv); -
vga_mode_set(function)headers/kernel.h:657void vga_mode_set(int on); -
vga_mode_is_active(function)headers/kernel.h:658int vga_mode_is_active(void); -
vga_gfx_ran_set(function)headers/kernel.h:659void vga_gfx_ran_set(int on); -
desktop_launch(function)headers/kernel.h:662void desktop_launch(const char *cmd); -
shell_queue_launch(function)headers/kernel.h:663void shell_queue_launch(const char *cmd); -
vga_fb_focus_next(function)headers/kernel.h:666void vga_fb_focus_next(void);-- void klongjmp(void *buf, int val) attribute((noreturn)); extern kjmpbuf exec_return; extern int... -
vga_fb_focus_id(function)headers/kernel.h:667int vga_fb_focus_id(int id); -
vga_fb_focus_get(function)headers/kernel.h:668int vga_fb_focus_get(void); -
vga_fb_nterms_get(function)headers/kernel.h:669int vga_fb_nterms_get(void); -
vga_fb_term_split(function)headers/kernel.h:670int vga_fb_term_split(void); -
vga_fb_term_close_focused(function)headers/kernel.h:671int vga_fb_term_close_focused(void); -
vga_fb_tile_all(function)headers/kernel.h:672void vga_fb_tile_all(void); -
vga_fb_list_windows(function)headers/kernel.h:673void vga_fb_list_windows(void); -
vga_fb_park_line(function)headers/kernel.h:674void vga_fb_park_line(const char *b, int p); -
vga_fb_unpark_line(function)headers/kernel.h:675int vga_fb_unpark_line(char *b, int *p); -
vga_fb_set_gfx_program(function)headers/kernel.h:676void vga_fb_set_gfx_program(const char *name); -
vga_fb_act_empty(function)headers/kernel.h:677int vga_fb_act_empty(void); -
vga_fb_prompt_live(function)headers/kernel.h:678int vga_fb_prompt_live(void); -
vga_fb_note_prompt(function)headers/kernel.h:679void vga_fb_note_prompt(void); -
vga_fb_clear_prompt(function)headers/kernel.h:680void vga_fb_clear_prompt(void); -
vga_fb_prompted(function)headers/kernel.h:681int vga_fb_prompted(void); -
shell_readline_active(function)headers/kernel.h:685int shell_readline_active(void);-- Shell side of window focus: park/restore the half-typed input line so it * travels with its window. -
shell_focus_park(function)headers/kernel.h:686void shell_focus_park(void); -
shell_focus_restore(function)headers/kernel.h:687void shell_focus_restore(void); -
user_range_ok(function)headers/kernel.h:692int user_range_ok(unsigned long p, unsigned long len);-- Shell side of window focus: park/restore the half-typed input line so it * travels with its window. -
user_str_ok(function)headers/kernel.h:693int user_str_ok(unsigned long p, unsigned long maxlen); -
mm_setup_protections(function)headers/kernel.h:696void mm_setup_protections(void);-- Shell side of window focus: park/restore the half-typed input line so it * travels with its window. -
pt_page_alloc(function)headers/kernel.h:697void *pt_page_alloc(void); -
pt_page_free(function)headers/kernel.h:698void pt_page_free(void *ptr); -
mm_user_pte_update(function)headers/kernel.h:699void mm_user_pte_update(unsigned long vaddr, int exec, unsigned long cr3); -
mm_user_set_exec(function)headers/kernel.h:700void mm_user_set_exec(unsigned long start, unsigned long end, unsigned long cr3); -
swap_out(function)headers/kernel.h:703int swap_out(unsigned long window_sz);-- extern volatile int shell_fg_active; /* -
swap_in(function)headers/kernel.h:704int swap_in(void); -
elf_load(function)headers/kernel.h:750void *elf_load(void *data, unsigned size, void **base_out); -
load_exec_elf(function)headers/kernel.h:751void *load_exec_elf(void *data, unsigned size);-- Heap/mmap ceiling: the shared-library region starts here with the graphics tail above it, so brk growth and the mmap... -
load_exec_elf_into(function)headers/kernel.h:752void *load_exec_elf_into(void *data, unsigned size, unsigned long cr3, unsigned long *brk_out, unsigned long *base_out);-- Heap/mmap ceiling: the shared-library region starts here with the graphics tail above it, so brk growth and the mmap... -
ldso_bind_into(function)headers/kernel.h:761int ldso_bind_into(void *data, unsigned size, unsigned long base, unsigned long cr3, vma_ctx_t *vma);-- Minimal dynamic linker (T8 ld.so, kernel/loader.c). bind_into maps the DT_NEEDED libraries of an already-copied... -
ldso_pseudo_stat(function)headers/kernel.h:763int ldso_pseudo_stat(int ino, unsigned long *size_out); -
ldso_pseudo_read(function)headers/kernel.h:764int ldso_pseudo_read(int ino, void *dst, unsigned long off, unsigned len); -
pt_clone_user_empty(function)headers/kernel.h:765unsigned long pt_clone_user_empty(void); -
mm_user_ensure_page(function)headers/kernel.h:766int mm_user_ensure_page(unsigned long cr3, unsigned long va); -
mm_user_map_page(function)headers/kernel.h:767int mm_user_map_page(unsigned long cr3, unsigned long va, unsigned long phys, int write, int exec); -
mm_file_fault(function)headers/kernel.h:769int mm_file_fault(unsigned long cr3, unsigned long va); -
mm_file_break(function)headers/kernel.h:770int mm_file_break(unsigned long cr3, unsigned long va); -
mm_file_page_phys(function)headers/kernel.h:771unsigned long mm_file_page_phys(unsigned long cr3, unsigned long va); -
mm_file_range_release(function)headers/kernel.h:772void mm_file_range_release(unsigned long cr3, unsigned long base, unsigned long len, int ino, unsigned long off, int... -
mm_demand_pte(function)headers/kernel.h:788unsigned long mm_demand_pte(unsigned long prot);-- Anonymous demand paging (docs/spec/kernel.md): a reserved page is a non-present PTE carrying PTE_DEMAND and the... -
mm_anon_reserve(function)headers/kernel.h:789int mm_anon_reserve(unsigned long cr3, unsigned long base, unsigned long len, unsigned long prot); -
mm_anon_fault(function)headers/kernel.h:791int mm_anon_fault(unsigned long cr3, unsigned long va, int write); -
pt_page_owned(function)headers/kernel.h:792int pt_page_owned(unsigned long phys); -
mm_anon_release(function)headers/kernel.h:793void mm_anon_release(unsigned long cr3, unsigned long base, unsigned long len); -
cow_drop_ref(function)headers/kernel.h:794int cow_drop_ref(unsigned long phys); -
refused(function)headers/kernel.h:800* refused (see kernel/mm/paging.c for the fail-closed list). */ unsigned long kmm_map_device(unsigned long phys... -
kmm_make_uncached(function)headers/kernel.h:802int kmm_make_uncached(unsigned long phys, unsigned long len); -
mm_copy_user_page(function)headers/kernel.h:803int mm_copy_user_page(unsigned long dst_cr3, unsigned long src_cr3, unsigned long va); -
fault(function)headers/kernel.h:807* fixes one write fault (0 = resume), cow_release_window drops a * dying window's shares ahead of pt_free_user. */... -
cow_resolve(function)headers/kernel.h:810int cow_resolve(unsigned long cr3, unsigned long va); -
user_page_present(function)headers/kernel.h:811int user_page_present(unsigned long cr3, unsigned long va); -
cow_release_window(function)headers/kernel.h:812void cow_release_window(unsigned long cr3); -
cow_shared(function)headers/kernel.h:813int cow_shared(void); -
cow_page_shared(function)headers/kernel.h:814int cow_page_shared(unsigned long phys); -
syscall_init(function)headers/kernel.h:817void syscall_init(void);-- Copy-on-write fork (kernel/mm/cow.c): share on fork, privatize on first write. cow_fork_window builds the child... -
ksyscall(function)headers/kernel.h:821long ksyscall(long n, long a1, long a2, long a3, long a4, long a5, long a6); -
syscall_trace_enabled(function)headers/kernel.h:822long syscall_trace_enabled(void); -
syscall_trace_set(function)headers/kernel.h:823void syscall_trace_set(int on); -
syscall_trace_verbose_enabled(function)headers/kernel.h:824long syscall_trace_verbose_enabled(void); -
syscall_trace_verbose_set(function)headers/kernel.h:825void syscall_trace_verbose_set(int on); -
syscall_trace_shown(function)headers/kernel.h:826unsigned long syscall_trace_shown(void); -
syscall_name(function)headers/kernel.h:827const char *syscall_name(long n); -
kfd_get(function)headers/kernel.h:848KFILE *kfd_get(int fd); -
kfd_put(function)headers/kernel.h:849void kfd_put(KFILE *f); -
kfd_override(function)headers/kernel.h:850KFILE *kfd_override(int fd, KFILE *f); -
kpipe_pair(function)headers/kernel.h:851int kpipe_pair(KFILE **rend_out, KFILE **wend_out); -
kpipe_empty_wopen(function)headers/kernel.h:852int kpipe_empty_wopen(KFILE *f); -
kpipe_is_write_end(function)headers/kernel.h:853int kpipe_is_write_end(KFILE *f); -
kpipe_state(function)headers/kernel.h:856int kpipe_state(KFILE *f, unsigned *avail, unsigned *space, int *wopen, int *ropen);-- Pipe snapshot for poll and the blocking syscall layer: bytes waiting, * free space, writer open, reader open. -1 on... -
kfd_poll_revents(function)headers/kernel.h:859int kfd_poll_revents(int fd);-- poll(2) readiness bits of a non-socket descriptor (kernel/syscalls.c): * pipes, eventfds, files and the console... -
kevent_create(function)headers/kernel.h:865KFILE *kevent_create(unsigned long long initval, int semaphore);-- eventfd(2) descriptions (docs/spec/smp-sched.md): create with an initial counter, read (0 or -EAGAIN when the... -
kevent_read(function)headers/kernel.h:866long kevent_read(KFILE *f, unsigned long long *out); -
kevent_write(function)headers/kernel.h:867long kevent_write(KFILE *f, unsigned long long v); -
kevent_readable(function)headers/kernel.h:868int kevent_readable(KFILE *f); -
kevent_writable(function)headers/kernel.h:869int kevent_writable(KFILE *f); -
fd_lock(function)headers/kernel.h:872* fd_lock (never nested, never held across yields); -
C(function)headers/kernel.h:886`* it with pointer subtraction in C (undefined behaviour). The value is
- a link-time difference,...`
-
ktime_us(function)headers/kernel.h:896unsigned long ktime_us(void); -
wall_us_now(function)headers/kernel.h:897unsigned long wall_us_now(void); -
bootlog_mark(function)headers/kernel.h:900void bootlog_mark(const char *name);-- it with pointer subtraction in C (undefined behaviour). -
bootlog_report(function)headers/kernel.h:901void bootlog_report(void); -
pcspk_init(function)headers/kernel.h:904void pcspk_init(void);-- static inline unsigned long ramdisk_image_size(void) { return (unsigned long)ramdisk_size; } /* -
pcspk_tone(function)headers/kernel.h:905void pcspk_tone(unsigned freq); -
pcspk_off(function)headers/kernel.h:906void pcspk_off(void); -
pcspk_set_volume(function)headers/kernel.h:907void pcspk_set_volume(unsigned volume); -
pcspk_get_volume(function)headers/kernel.h:908unsigned pcspk_get_volume(void); -
rtc_read_tod(function)headers/kernel.h:911int rtc_read_tod(int *hour, int *min, int *sec);-- unsigned long wall_us_now(void); /* -
ide_init(function)headers/kernel.h:914void ide_init(void);-- void bootlog_mark(const char name); void bootlog_report(void); / -
ide_read_sectors(function)headers/kernel.h:915int ide_read_sectors(unsigned int lba, unsigned int count, void *buf); -
ide_write_sectors(function)headers/kernel.h:916int ide_write_sectors(unsigned int lba, unsigned int count, const void *buf); -
ide_read_sector(function)headers/kernel.h:917int ide_read_sector(unsigned int lba, void *buf); -
ide_write_sector(function)headers/kernel.h:918int ide_write_sector(unsigned int lba, const void *buf); -
ide_total_sectors(function)headers/kernel.h:919unsigned int ide_total_sectors(void); -
ide_present(function)headers/kernel.h:920int ide_present(void); -
block_init(function)headers/kernel.h:923void block_init(void); -
block_read(function)headers/kernel.h:924int block_read(unsigned int block_num, void *buf); -
block_write(function)headers/kernel.h:925int block_write(unsigned int block_num, const void *buf); -
block_read_multi(function)headers/kernel.h:926int block_read_multi(unsigned int block_num, unsigned int count, void *buf); -
block_write_multi(function)headers/kernel.h:927int block_write_multi(unsigned int block_num, unsigned int count, const void *buf); -
block_total(function)headers/kernel.h:928unsigned int block_total(void); -
k_user_fault_return(function)headers/kernel.h:931void k_user_fault_return(void);-- int ide_read_sector(unsigned int lba, void *buf); int ide_write_sector(unsigned int lba, const void *buf)...
Next: API_p4.md
Generated offline by readmenator from commit d64a8fe9383a. Edits here are overwritten by readmenator . --rebuild.
Start
Wiki
- community_0_headers_kernel
- community_10_orphans
- community_1_progs_doomgeneric_d_englsh
- community_2_progs_src
- community_3_progs_doomgeneric_p_spec
- community_4_tools_tls_crypto
- community_5_headers_vga_fb
- community_6_progs_doomgeneric_net_defs
- community_7_headers_batch
- community_8_headers_tick
- community_9_tools_doom_pwad
- concepts
- queries
- REPORT
Agent Docs
- API
- API_p10
- API_p11
- API_p12
- API_p13
- API_p14
- API_p15
- API_p16
- API_p17
- API_p18
- API_p19
- API_p2
- API_p20
- API_p21
- API_p3
- API_p4
- API_p5
- API_p6
- API_p7
- API_p8
- API_p9
- ARCHITECTURE
- ARCHITECTURE_p2
- ARCHITECTURE_p3
- ARCHITECTURE_p4
- CONCEPTS
- GOTCHAS
- INDEX
- INDEX_p2
- KB_asm
- KB_boot
- KB_doomgeneric
- KB_doomgeneric_p10
- KB_doomgeneric_p11
- KB_doomgeneric_p12
- KB_doomgeneric_p2
- KB_doomgeneric_p3
- KB_doomgeneric_p4
- KB_doomgeneric_p5
- KB_doomgeneric_p6
- KB_doomgeneric_p7
- KB_doomgeneric_p8
- KB_doomgeneric_p9
- KB_drivers
- KB_drivers_p2
- KB_file
- KB_freedomui
- KB_fs
- KB_headers
- KB_headers_arch_x86
- KB_headers_drivers
- KB_headers_kernel
- KB_headers_p2
- KB_headers_p3
- KB_headers_p4
- KB_headers_p5
- KB_headers_p6
- KB_kernel
- KB_kernel_p2
- KB_kernel_p3
- KB_kernel_p4
- KB_lib
- KB_lisp
- KB_lua
- KB_mcp
- KB_minios
- KB_misc
- KB_misc_p2
- KB_misc_p3
- KB_mm
- KB_net
- KB_nuklear
- KB_pokemon
- KB_progs
- KB_quake2generic
- KB_root
- KB_src
- KB_src_p2
- KB_src_p3
- KB_tests
- KB_tests_p2
- KB_tls_u
- KB_tools
- KB_tools_p2
- KB_wl
- KB_x86
- MEMORY
- SECURITY
- SYMBOLS
- SYMBOLS_p10
- SYMBOLS_p11
- SYMBOLS_p12
- SYMBOLS_p13
- SYMBOLS_p14
- SYMBOLS_p15
- SYMBOLS_p16
- SYMBOLS_p17
- SYMBOLS_p18
- SYMBOLS_p19
- SYMBOLS_p2
- SYMBOLS_p20
- SYMBOLS_p21
- SYMBOLS_p22
- SYMBOLS_p23
- SYMBOLS_p24
- SYMBOLS_p25
- SYMBOLS_p26
- SYMBOLS_p27
- SYMBOLS_p3
- SYMBOLS_p4
- SYMBOLS_p5
- SYMBOLS_p6
- SYMBOLS_p7
- SYMBOLS_p8
- SYMBOLS_p9
Recipes