Repository navigation
Agent API_p5
Previous: API_p4.md
Imported by: drivers/pcspk.c, kernel/shell.c, kernel/syscalls.c
-
pcspk_init(function)headers/pcspk.h:8void pcspk_init(void); -
pcspk_tone(function)headers/pcspk.h:9void pcspk_tone(unsigned freq); -
pcspk_off(function)headers/pcspk.h:10void pcspk_off(void); -
pcspk_set_volume(function)headers/pcspk.h:11void pcspk_set_volume(unsigned volume); -
pcspk_get_volume(function)headers/pcspk.h:12unsigned pcspk_get_volume(void);
Depends on: headers/sched.h, headers/spinlock.h
Imported by: kernel/percpu_rq.c, kernel/sched.c, kernel/shell.c, kernel/syscalls.c, tests/test_percpu_rq.c
-
rq_init(function)headers/percpu_rq.h:61void rq_init(void); -
rq_enqueue(function)headers/percpu_rq.h:62void rq_enqueue(int cpu, int pid); -
rq_pop_local(function)headers/percpu_rq.h:63int rq_pop_local(int cpu); -
rq_steal_once(function)headers/percpu_rq.h:64int rq_steal_once(int self_cpu, int *from_cpu); -
rq_empty(function)headers/percpu_rq.h:65int rq_empty(int cpu); -
rq_should_rescan(function)headers/percpu_rq.h:66int rq_should_rescan(int cpu); -
rq_note_poll(function)headers/percpu_rq.h:67void rq_note_poll(int cpu); -
rq_stats(function)headers/percpu_rq.h:68void rq_stats(int cpu, unsigned long *hits, unsigned long *steals, unsigned long *drops);
Imported by: headers/kernel.h, kernel/console_in.c, tests/test_pipe.c
-
ends(function)headers/pipe.h:4* * Single source of truth for the pipe byte ring shared by the kernel * pipe ends (fs/kfile.c), the pipe/dup/dup2... -
pipe_ring_init(function)headers/pipe.h:47static inline int pipe_ring_init(pipe_ring_t *r, unsigned char *buf, unsigned cap)-- Docstring: Bind a caller-owned buffer to a ring. -
pipe_ring_avail(function)headers/pipe.h:64static inline unsigned pipe_ring_avail(const pipe_ring_t *r)-- return PIPE_ERR_BOUND; if (cap == 0u || cap > PIPE_CAP_MAX) return PIPE_ERR_BOUND; r->buf = buf; r->cap = cap... -
pipe_ring_space(function)headers/pipe.h:71static inline unsigned pipe_ring_space(const pipe_ring_t *r)-- r->count = 0u; r->wopen = 1; r->ropen = 1; return 0; } /** Docstring: Bytes available to read. -
pipe_ring_write(function)headers/pipe.h:79static inline unsigned pipe_ring_write(pipe_ring_t *r, const unsigned char *src, unsigned...-- Docstring: Append up to len bytes, return bytes stored. -
pipe_ring_close_writer(function)headers/pipe.h:118static inline int pipe_ring_close_writer(pipe_ring_t *r)-- Docstring: Mark the writer closed. -
pipe_ring_close_reader(function)headers/pipe.h:128static inline int pipe_ring_close_reader(pipe_ring_t *r)-- Docstring: Mark the reader closed. -
pipe_ring_ropen(function)headers/pipe.h:135static inline int pipe_ring_ropen(const pipe_ring_t *r)-- Docstring: Mark the reader closed. -
pipe_ring_stat(function)headers/pipe.h:140static inline int pipe_ring_stat(const pipe_ring_t *r, pipe_cfg_t *out)-- Docstring: Snapshot ring geometry into a caller struct.
Imported by: kernel/exec.c, kernel/proc_sec.c, kernel/sched.c, kernel/shell.c, kernel/syscalls.c, kernel/syscalls_proc.c
-
proc_sec_inherit(function)headers/proc_sec.h:23void proc_sec_inherit(int child, int parent);-- Exit code of a process or thread a filter kills: a death by SIGSYS (31), recorded negative like every MiniOS signal... -
proc_sec_release(function)headers/proc_sec.h:24void proc_sec_release(int pid); -
proc_sec_exec(function)headers/proc_sec.h:25void proc_sec_exec(int pid); -
proc_sec_set_exe(function)headers/proc_sec.h:26void proc_sec_set_exe(int pid, const char *resolved); -
proc_sec_exe(function)headers/proc_sec.h:28const char *proc_sec_exe(int pid);-- Exit code of a process or thread a filter kills: a death by SIGSYS (31), recorded negative like every MiniOS signal... -
it(function)headers/proc_sec.h:31* the syscall must answer in *ret when a filter decided it (ERRNO, TRACE, * USER_NOTIF); -
proc_sec_filter(function)headers/proc_sec.h:34int proc_sec_filter(long n, long a1, long a2, long a3, long a4, long a5, long a6, long *ret);-- Run the caller's filters for syscall n. -
proc_sec_prctl(function)headers/proc_sec.h:36long proc_sec_prctl(long option, long a2, long a3, long a4, long a5); -
proc_sec_seccomp(function)headers/proc_sec.h:37long proc_sec_seccomp(long op, long flags, long uargs);
Imported by: qga.c
-
qga_init(function)headers/qga.h:48void qga_init(void); -
qga_poll(function)headers/qga.h:49void qga_poll(void);
Imported by: kernel/syscalls.c, tests/test_randmix.c
-
source(function)headers/randmix.h:11`* source (all-zero seed) still walks, because the increment is inside
- the mixer, not in the ca...`
Depends on: headers/sched.h, headers/spinlock.h
Imported by: kernel/rcu.c, kernel/sched.c, kernel/syscalls.c, tests/test_rcu.c
-
retirement(function)headers/rcu.h:30* retirement (the writer keeps ownership) instead of dropping the free. * Callbacks run in tick context with... -
rcu_init(function)headers/rcu.h:51void rcu_init(void); -
rcu_read_lock(function)headers/rcu.h:52void rcu_read_lock(void); -
rcu_read_unlock(function)headers/rcu.h:53void rcu_read_unlock(void); -
rcu_deref(function)headers/rcu.h:54void *rcu_deref(void *volatile *pp); -
rcu_publish(function)headers/rcu.h:55void rcu_publish(void *volatile *pp, void *v); -
rcu_call(function)headers/rcu.h:56long rcu_call(rcu_cb_t fn, void *arg); -
rcu_note_tick(function)headers/rcu.h:57void rcu_note_tick(int cpu); -
rcu_note_idle(function)headers/rcu.h:58void rcu_note_idle(int cpu); -
rcu_poll(function)headers/rcu.h:59void rcu_poll(void); -
rcu_synchronize(function)headers/rcu.h:60long rcu_synchronize(void);
Imported by: drivers/rtc.c, kernel/minifetch.c, kernel/shell.c, kernel/syscalls.c, qga.c, tests/test_rtc.c
-
rtc_read_tod(function)headers/rtc.h:4int rtc_read_tod(int *hour, int *min, int *sec); -
rtc_read_date(function)headers/rtc.h:11int rtc_read_date(int *year, int *mon, int *day);-- Calendar date from the CMOS RTC (registers 0x07-0x09). -
suite(function)headers/rtc.h:15* host suite (tests/test_rtc.c); -
rtc_days_from_civil(function)headers/rtc.h:18static inline long rtc_days_from_civil(long y, long m, long d)-- Days since 1970-01-01 for a civil date (Howard Hinnant's algorithm, pure integer arithmetic, no tables). -
rtc_wall_seconds(function)headers/rtc.h:33int rtc_wall_seconds(unsigned long *out);-- Wall-clock seconds since the Unix epoch from one RTC snapshot.
Imported by: drivers/pcm2.c, drivers/sb16.c, kernel.c, kernel/sched.c, kernel/shell.c, kernel/syscalls.c
-
sb16_init(function)headers/sb16.h:65int sb16_init(void); -
sb16_present(function)headers/sb16.h:66int sb16_present(void); -
sb16_tone(function)headers/sb16.h:67void sb16_tone(unsigned freq); -
sb16_irq(function)headers/sb16.h:68void sb16_irq(void); -
sb16_poll(function)headers/sb16.h:69void sb16_poll(void); -
sb16_pcm_open(function)headers/sb16.h:73void sb16_pcm_open(void);-- Legacy single-stream API (maps to mixer stream 0: pcm_open allocates it, * pcm_submit forwards into it, pcm_close... -
sb16_pcm_submit(function)headers/sb16.h:74int sb16_pcm_submit(const unsigned char *pcm, unsigned len); -
sb16_pcm_close(function)headers/sb16.h:75void sb16_pcm_close(void); -
sb16_pump(function)headers/sb16.h:76void sb16_pump(void); -
sb16_stream_open(function)headers/sb16.h:79int sb16_stream_open(void);-- Legacy single-stream API (maps to mixer stream 0: pcm_open allocates it, * pcm_submit forwards into it, pcm_close... -
sb16_stream_close(function)headers/sb16.h:80void sb16_stream_close(int id); -
sb16_stream_submit(function)headers/sb16.h:81int sb16_stream_submit(int id, const unsigned char *pcm, unsigned len); -
sb16_stream_volume(function)headers/sb16.h:82void sb16_stream_volume(int id, unsigned char vol); -
sb16_stream_count(function)headers/sb16.h:83int sb16_stream_count(void); -
sb16_ring_free(function)headers/sb16.h:85unsigned sb16_ring_free(void); -
sb16_mode_active(function)headers/sb16.h:86int sb16_mode_active(void); -
sb16_legacy_busy(function)headers/sb16.h:91int sb16_legacy_busy(void);-- True while the legacy engine audibly owns the DSP (PCM stream open or a tone sounding). pcm2_open consults it for... -
sb16_counters(function)headers/sb16.h:93void sb16_counters(sb16_counters_t *out);
Depends on: headers/spinlock.h, headers/vma.h
Imported by: drivers/kbd.c, drivers/pcm2.c, headers/futex.h, headers/percpu_rq.h, headers/rcu.h, headers/spawn.h, headers/sync.h, kernel.c, kernel/console.c, kernel/exec.c, kernel/loader.c, kernel/minifetch.c, kernel/mm.c, kernel/mm/cow.c, kernel/mm/tlb.c, kernel/panic.c, kernel/proc_sec.c, kernel/sched.c, kernel/serial.c, kernel/shell.c, kernel/spawn.c, kernel/syscalls.c, kernel/syscalls_proc.c, kernel/vga_fb.c, net/net.c, net/rtl8139.c, progs/src/lxabi.c, smp.c
-
group(function)headers/sched.h:108* process is its own group (tgid == pid); -
entry(function)headers/sched.h:135* private view with one KFILE ref per live entry (0 on OOM), release * drops the view at reap, cloexec closes marked... -
kfd_view_copy(function)headers/sched.h:138int kfd_view_copy(proc_t *child, proc_t *parent); -
kfd_view_release(function)headers/sched.h:139void kfd_view_release(proc_t *p); -
kfd_view_cloexec(function)headers/sched.h:140void kfd_view_cloexec(void); -
kfd_view_root(function)headers/sched.h:141kfd_view_t *kfd_view_root(void); -
bytes(function)headers/sched.h:173* RLIM_AS total user bytes (brk growth + mmap) beyond the load base * RLIM_CPU timer ticks of CPU time, then... -
first(function)headers/sched.h:232* address first (SYSCALL_FRAME_WORDS in syscall_asm.h). It ends exactly at * the saved top (sc_top_save[pid]); -
syscall_frame_current(function)headers/sched.h:245const syscall_frame_t *syscall_frame_current(void);-- The frame syscall_entry.S builds on the per-proc kernel stack, lowest address first (SYSCALL_FRAME_WORDS in... -
sched_idle_on_kernel_cr3(function)headers/sched.h:359int sched_idle_on_kernel_cr3(int cpu);-- 1 when cpu's idle context is parked on the kernel page tables, never on * a process's (whose tables are freed when... -
sched_init(function)headers/sched.h:379void sched_init(void);-- Per-CPU TSS selectors: slot 5 + 2*cpu in the runtime GDT (each TSS descriptor occupies two 8-byte slots). -
kstack_report(function)headers/sched.h:380void kstack_report(void); -
schedtop_report(function)headers/sched.h:381void schedtop_report(void); -
irqstat_report(function)headers/sched.h:382void irqstat_report(void); -
gdb_regs_report(function)headers/sched.h:383void gdb_regs_report(int pid); -
gdb_dump_report(function)headers/sched.h:384void gdb_dump_report(unsigned long addr, unsigned long len); -
tss_init_ap(function)headers/sched.h:388void tss_init_ap(int cpu); -
smp_ap_idle_loop(function)headers/sched.h:389void smp_ap_idle_loop(void); -
proc_create(function)headers/sched.h:390int proc_create(const char *name, int parent_pid); -
proc_get(function)headers/sched.h:391proc_t *proc_get(int pid); -
schedule(function)headers/sched.h:392void schedule(void); -
sched_set_nice(function)headers/sched.h:393int sched_set_nice(int pid, int nice); -
seccomp_deny_one(function)headers/sched.h:394int seccomp_deny_one(int pid, int n); -
seccomp_allow_one(function)headers/sched.h:395int seccomp_allow_one(int pid, int n); -
seccomp_denied(function)headers/sched.h:396int seccomp_denied(int pid, int n); -
rlimit_cpu_exceeded(function)headers/sched.h:397int rlimit_cpu_exceeded(int pid); -
rlimit_cpu_tick(function)headers/sched.h:398void rlimit_cpu_tick(int pid); -
switch_to(function)headers/sched.h:399void switch_to(proc_t *prev, proc_t *next); -
switch_to_notrap(function)headers/sched.h:400void switch_to_notrap(proc_t *prev, proc_t *next); -
switch_save_only(function)headers/sched.h:401void switch_save_only(proc_t *prev); -
resume_iretq(function)headers/sched.h:408void resume_iretq(void); -
yield(function)headers/sched.h:409void yield(void); -
do_exit(function)headers/sched.h:410void do_exit(int code); -
do_clone(function)headers/sched.h:411long do_clone(long flags, long newsp); -
do_fork(function)headers/sched.h:412long do_fork(void); -
do_fork_ex(function)headers/sched.h:413long do_fork_ex(uint64_t set_tid, uint64_t clear_tid); -
do_linux_clone(function)headers/sched.h:414long do_linux_clone(unsigned long flags, unsigned long newsp, unsigned long ptid, unsigned long ctid, unsigned long... -
do_group_exit(function)headers/sched.h:416void do_group_exit(int code); -
mm_view_claim_current(function)headers/sched.h:417void mm_view_claim_current(void); -
do_kill_code(function)headers/sched.h:418int do_kill_code(int pid, int code); -
fork_child_settid(function)headers/sched.h:421void fork_child_settid(void);-- void sched_park_capture(proc_t *cur); void resume_iretq(void); void yield(void); void do_exit(int... -
aslr_stack_bytes(function)headers/sched.h:431unsigned long aslr_stack_bytes(void);-- ASLR jitter, fresh per exec (TSC + ticks + per-exec counter, never zero for stack/brk so consecutive execs differ... -
aslr_brk_pages(function)headers/sched.h:432unsigned long aslr_brk_pages(void); -
aslr_mmap_pages(function)headers/sched.h:433unsigned long aslr_mmap_pages(void); -
aslr_dyn_base(function)headers/sched.h:434unsigned long aslr_dyn_base(void); -
failure(function)headers/sched.h:439* failure (negative errno); -
do_execve(function)headers/sched.h:440long do_execve(char *kpath, int kargc, char **kargv);-- do_execve() - replace the caller's image with a fresh ET_EXEC/ET_DYN program (kernel/sched.c). -
do_thread_spawn(function)headers/sched.h:441long do_thread_spawn(unsigned long fn, unsigned long stack, unsigned long arg); -
do_waitpid(function)headers/sched.h:443int do_waitpid(int pid); -
do_waitpid_nb(function)headers/sched.h:444int do_waitpid_nb(int pid); -
shell_reap_nb(function)headers/sched.h:445int shell_reap_nb(int *pid_out, int *code_out); -
shell_reap_one(function)headers/sched.h:446int shell_reap_one(int pid, int *code_out); -
shell_nchildren(function)headers/sched.h:447int shell_nchildren(void); -
do_waitpid_linux(function)headers/sched.h:451int do_waitpid_linux(int pid, int nohang, int *found);-- kstack slot family, fd table and limits; everything else (window, VMA, brk view, stack, FPU, FSBASE, name) is rebuilt. -
do_kill(function)headers/sched.h:452int do_kill(int pid); -
timer_tick(function)headers/sched.h:453void timer_tick(void); -
pt_clone_user(function)headers/sched.h:456uint64_t pt_clone_user(uint64_t parent_cr3);-- unsigned long arg); int do_waitpid(int pid); int do_waitpid_nb(int pid); int shell_reap_nb(int... -
pt_free_user(function)headers/sched.h:457void pt_free_user(uint64_t cr3); -
caller(function)headers/sched.h:462* caller (shell mrun) reaps it with do_waitpid. Returns pid or -1. * Programs using mmap/VMA or expecting a shared...
Imported by: kernel/proc_sec.c, kernel/seccomp_bpf.c, tests/test_seccomp_bpf.c
-
sbpf_check(function)headers/seccomp_bpf.h:95int sbpf_check(const sbpf_insn *prog, unsigned len, unsigned short *scratch);-- Validate a program before it ever runs: 1..SBPF_MAX_INSNS instructions, only the opcodes Linux accepts for seccomp... -
sbpf_run(function)headers/seccomp_bpf.h:100unsigned int sbpf_run(const sbpf_insn *prog, unsigned len, const sbpf_data *d);-- Run a program sbpf_check accepted over one syscall's data; returns the 32-bit action. -
sbpf_action_rank(function)headers/seccomp_bpf.h:104int sbpf_action_rank(unsigned int action);-- Restrictiveness rank of an action (0 = most restrictive): the order * stacked filters are combined in.
Imported by: kernel/syscalls.c, tests/test_select_map.c
-
select_fd_isset(function)headers/select_map.h:37static inline int select_fd_isset(const unsigned char *set, int fd) -
select_fd_put(function)headers/select_map.h:41static inline void select_fd_put(unsigned char *set, int fd) -
select_poll_count(function)headers/select_map.h:46static inline unsigned select_poll_count(const unsigned char *r, ...-- int fd; short events; short revents; } select_pollfd_t; static inline int select_fd_isset(const unsigned char *set... -
select_poll_build(function)headers/select_map.h:66static inline unsigned select_poll_build(select_pollfd_t *pfd, ...-- Docstring: Build the pollfd array for the fds the sets request. -
select_poll_result(function)headers/select_map.h:95static inline unsigned select_poll_result(unsigned char *rout, ...-- Docstring: Map poll revents into fresh result sets (Linux classes). -
select_poll_badfd(function)headers/select_map.h:131static inline int select_poll_badfd(const select_pollfd_t *pfd, ...-- (rv & (SELECT_POLLOUT | SELECT_POLLERR))) { select_fd_put(wout, fd); any = 1; } if (eout && select_fd_isset(ein, fd)...
Depends on: headers/kernel.h, headers/kernel/console_in.h
Imported by: kernel/editor.c, kernel/shell.c, kernel/syscalls.c
-
shell_readline_buf(function)headers/shell.h:18void shell_readline_buf(char *buf, int size);-- Read one line into buf with arrow-key editing; used by the built-in * editor to edit file text. -
shell_parse(function)headers/shell.h:21int shell_parse(char *line, char **argv, int max_args);-- Read one line into buf with arrow-key editing; used by the built-in * editor to edit file text. void... -
shell_parse_long(function)headers/shell.h:29int shell_parse_long(const char *s, long *out);-- Strict signed decimal parse for numeric shell/editor operands: an optional sign followed by at least one digit... -
shell_parse_pid(function)headers/shell.h:34int shell_parse_pid(const char *s, int min_pid, int *out);-- Bounded pid parse: strict shell_parse_long plus min_pid <= pid < MAX_PROCS. -
shell_cmd_sh(function)headers/shell.h:39int shell_cmd_sh(int argc, char **argv);-- Execute a shell script: readpathline by line, skip blanks and#comments, parse each line and dispatch it...
Imported by: kernel/ed25519.c, kernel/loader.c, tests/test_sign.c
-
sign_pubkey(function)headers/sign.h:47static inline const unsigned char *sign_pubkey(unsigned id)-- Docstring: Look up the trusted public key for a key id. * Answers 0 for unknown ids and for the unprovisioned slot. -
ed_sha512_init(function)headers/sign.h:69void ed_sha512_init(ed_sha *c); -
ed_sha512_update(function)headers/sign.h:70void ed_sha512_update(ed_sha *c, const unsigned char *data, unsigned long len); -
ed_sha512_final(function)headers/sign.h:71void ed_sha512_final(ed_sha *c, unsigned char out[64]); -
ed25519_verify(function)headers/sign.h:75int ed25519_verify(const unsigned char sig[64], const unsigned char *msg, unsigned long msglen, const unsigned char...-- Docstring: Verify an Ed25519 signature, 1 valid else 0. * See kernel/ed25519.c for the full contract.
Depends on: headers/spinlock.h
Imported by: kernel.c, kernel/mm/tlb.c, kernel/sched.c, kernel/shell.c, smp.c
-
smp_init(function)headers/smp.h:41void smp_init(void); -
smp_ap_entry(function)headers/smp.h:42void smp_ap_entry(void); -
smp_ipi_broadcast(function)headers/smp.h:43void smp_ipi_broadcast(int vector);-- PIT-anchored LAPIC calibration (ticks per 10 ms at divide-by-16). -
smp_nmi_broadcast(function)headers/smp.h:44void smp_nmi_broadcast(void);-- PIT-anchored LAPIC calibration (ticks per 10 ms at divide-by-16).
Depends on: headers/kernel.h, headers/sched.h, headers/vma.h
Imported by: kernel/sched.c, kernel/shell.c, kernel/spawn.c, kernel/syscalls.c
-
spawn_backup(function)headers/spawn.h:28int spawn_backup(spawn_ctx_t *ctx);-- Docstring: Save the caller shared-window view into ctx. -
spawn_restore(function)headers/spawn.h:31void spawn_restore(spawn_ctx_t *ctx);-- Docstring: Save the caller shared-window view into ctx. -
spawn_validate_argv(function)headers/spawn.h:34int spawn_validate_argv(int argc, const char **uargv);-- Docstring: Save the caller shared-window view into ctx. -
spawn_copy_argv(function)headers/spawn.h:39char **spawn_copy_argv(int argc, const char **uargv);-- Docstring: Copy user argv into kernel memory, zero terminated. -
spawn_free_argv(function)headers/spawn.h:42void spawn_free_argv(char **kargv, int argc);-- Docstring: Copy user argv into kernel memory, zero terminated. -
spawn_load_image(function)headers/spawn.h:45unsigned char *spawn_load_image(const char *resolved, unsigned *size_out);-- Docstring: Copy user argv into kernel memory, zero terminated. -
spawn_execute(function)headers/spawn.h:48int spawn_execute(const char *resolved, const char *redirect, unsigned char *data, unsigned data_size, int argc...-- Docstring: Copy user argv into kernel memory, zero terminated.
Imported by: drivers/pcm2.c, headers/futex.h, headers/kernel.h, headers/percpu_rq.h, headers/rcu.h, headers/sched.h, headers/smp.h, headers/sync.h, kernel/mm/tlb.c
-
spin_init(function)headers/spinlock.h:46static inline void spin_init(spinlock_t *lock) -
spin_save_irq(function)headers/spinlock.h:56static inline irqflags_t spin_save_irq(void)-- Host unit-test variants (tests/test_sync.c,make test-sync): cli/sti and pushf/popf are privileged and fault in... -
spin_restore_irq(function)headers/spinlock.h:57static inline void spin_restore_irq(irqflags_t flags) -
spin_lock(function)headers/spinlock.h:58static inline void spin_lock(spinlock_t *lock) -
spin_unlock(function)headers/spinlock.h:64static inline void spin_unlock(spinlock_t *lock) -
spin_lock_irqsave(function)headers/spinlock.h:68static inline void spin_lock_irqsave(spinlock_t *lock, irqflags_t *flags) -
spin_unlock_irqrestore(function)headers/spinlock.h:75static inline void spin_unlock_irqrestore(spinlock_t *lock, irqflags_t flags) -
spin_unlock_keep_irq(function)headers/spinlock.h:80static inline void spin_unlock_keep_irq(spinlock_t *lock) -
spin_trylock(function)headers/spinlock.h:84static inline int spin_trylock(spinlock_t *lock) -
spin_save_irq(function)headers/spinlock.h:92static inline irqflags_t spin_save_irq(void)-- __sync_lock_release(&lock->locked); } static inline void spin_unlock_keep_irq(spinlock_t *lock) {... -
spin_restore_irq(function)headers/spinlock.h:99static inline void spin_restore_irq(irqflags_t flags)-- int was = __sync_lock_test_and_set(&lock->locked, 1); if (!was) __sync_synchronize(); return !was; } #else /* Read... -
spin_lock(function)headers/spinlock.h:107static inline void spin_lock(spinlock_t *lock)-- Acquire the lock and disable interrupts. -
spin_unlock(function)headers/spinlock.h:118static inline void spin_unlock(spinlock_t *lock)-- Release the lock and re-enable interrupts. -
spin_unlock_keep_irq(function)headers/spinlock.h:130static inline void spin_unlock_keep_irq(spinlock_t *lock)-- Release the lock WITHOUT touching interrupts (IF stays as-is). -
spin_unlock_irqrestore(function)headers/spinlock.h:150static inline void spin_unlock_irqrestore(spinlock_t *lock, irqflags_t flags)-- Release the lock and restore the saved interrupt state.
Depends on: headers/sched.h, headers/spinlock.h
Imported by: drivers/sb16.c, headers/futex.h, kernel/futex.c, kernel/sched.c, kernel/sync.c, kernel/syscalls.c, tests/test_sync.c
-
wq_init(function)headers/sync.h:50void wq_init(wait_queue_t *q); -
sleep_on(function)headers/sync.h:51void sleep_on(wait_queue_t *q); -
wake_up(function)headers/sync.h:52int wake_up(wait_queue_t *q); -
wake_up_all(function)headers/sync.h:53int wake_up_all(wait_queue_t *q); -
inheritance(function)headers/sync.h:56* Priority inheritance (thesis correction 3): a low-priority holder that * blocks a high-priority waiter is boosted... -
mutex_init(function)headers/sync.h:72void mutex_init(mutex_t *m); -
mutex_lock(function)headers/sync.h:73void mutex_lock(mutex_t *m); -
mutex_unlock(function)headers/sync.h:74void mutex_unlock(mutex_t *m); -
mutex_trylock(function)headers/sync.h:75int mutex_trylock(mutex_t *m); -
mutex_note_waiter(function)headers/sync.h:76void mutex_note_waiter(mutex_t *m, int waiter); -
pi_set_base(function)headers/sync.h:77void pi_set_base(int pid, int prio); -
pi_get_eff(function)headers/sync.h:78int pi_get_eff(int pid); -
sem_init(function)headers/sync.h:89void sem_init(sem_t *s, int value); -
sem_wait(function)headers/sync.h:90void sem_wait(sem_t *s); -
sem_post(function)headers/sync.h:91void sem_post(sem_t *s); -
cond_init(function)headers/sync.h:103void cond_init(cond_t *c); -
cond_wait(function)headers/sync.h:104void cond_wait(cond_t *c, mutex_t *m); -
cond_signal(function)headers/sync.h:105void cond_signal(cond_t *c); -
cond_broadcast(function)headers/sync.h:106void cond_broadcast(cond_t *c); -
rwlock_init(function)headers/sync.h:124void rwlock_init(rwlock_t *rw); -
rwlock_read_lock(function)headers/sync.h:125void rwlock_read_lock(rwlock_t *rw); -
rwlock_read_unlock(function)headers/sync.h:126void rwlock_read_unlock(rwlock_t *rw); -
rwlock_write_lock(function)headers/sync.h:127void rwlock_write_lock(rwlock_t *rw); -
rwlock_write_unlock(function)headers/sync.h:128void rwlock_write_unlock(rwlock_t *rw); -
now(function)headers/sync.h:130* available right now (a reader never takes it while a writer waits). */ int rwlock_read_trylock(rwlock_t *rw); -
rwlock_write_trylock(function)headers/sync.h:132int rwlock_write_trylock(rwlock_t *rw);
Imported by: kernel/proc_sec.c, kernel/syscalls.c, kernel/syscalls_proc.c
-
dispatcher(function)headers/syscalls_proc.h:5* dispatcher (kernel/syscalls.c). These handlers touch only scheduler * state (current_pid, procs[], do_* /... -
sys_minios_nice(function)headers/syscalls_proc.h:12long sys_minios_nice(long a1, long a2, long a3, long a4, long a5, long a6); -
sys_minios_clone(function)headers/syscalls_proc.h:13long sys_minios_clone(long flags, long newsp, long a3, long a4, long a5, long a6); -
sys_minios_thread_spawn(function)headers/syscalls_proc.h:14long sys_minios_thread_spawn(long a1, long a2, long a3, long a4, long a5, long a6); -
sys_linux_yield(function)headers/syscalls_proc.h:15long sys_linux_yield(long a1, long a2, long a3, long a4, long a5, long a6); -
sys_linux_getpid(function)headers/syscalls_proc.h:16long sys_linux_getpid(long a1, long a2, long a3, long a4, long a5, long a6); -
sys_linux_gettid(function)headers/syscalls_proc.h:17long sys_linux_gettid(long a1, long a2, long a3, long a4, long a5, long a6); -
sys_linux_fork(function)headers/syscalls_proc.h:18long sys_linux_fork(long a1, long a2, long a3, long a4, long a5, long a6); -
sys_linux_clone(function)headers/syscalls_proc.h:19long sys_linux_clone(long a1, long a2, long a3, long a4, long a5, long a6); -
sys_linux_vfork(function)headers/syscalls_proc.h:20long sys_linux_vfork(long a1, long a2, long a3, long a4, long a5, long a6); -
sys_linux_execve(function)headers/syscalls_proc.h:21long sys_linux_execve(long a1, long a2, long a3, long a4, long a5, long a6); -
sys_linux_exit(function)headers/syscalls_proc.h:22long sys_linux_exit(long a1, long a2, long a3, long a4, long a5, long a6); -
sys_linux_wait4(function)headers/syscalls_proc.h:23long sys_linux_wait4(long a1, long a2, long a3, long a4, long a5, long a6); -
sys_linux_kill(function)headers/syscalls_proc.h:24long sys_linux_kill(long a1, long a2, long a3, long a4, long a5, long a6); -
linux_signal_fatal(function)headers/syscalls_proc.h:31int linux_signal_fatal(long sig);-- Linux signal numbers 1..LINUX_SIGNAL_MAX; a fatal one ends its target. * The foreground shell reports a signal death... -
do_proc_exit(function)headers/syscalls_proc.h:34long do_proc_exit(long code);-- Linux signal numbers 1..LINUX_SIGNAL_MAX; a fatal one ends its target. * The foreground shell reports a signal death...
Imported by: kernel/sched.c, kernel/tick.c, tests/test_tick.c
-
tick_reset(function)headers/tick.h:47void tick_reset(void);-- needs; the bound exists so the tables stay fixed-size. #define TICK_MAX_USB_LISTENERS 2 /** Docstring: Default bus... -
tick_register_audio(function)headers/tick.h:54int tick_register_audio(tick_fn_t fn, void *ctx);-- Docstring: Register an unconditional BSP audio effect. -
tick_register_desktop(function)headers/tick.h:61int tick_register_desktop(tick_fn_t fn, void *ctx);-- Docstring: Register a gated desktop effect. -
tick_register_usb(function)headers/tick.h:69int tick_register_usb(tick_fn_t fn, void *ctx);-- Docstring: Register a polled USB controller effect. -
tick_run_usb(function)headers/tick.h:72void tick_run_usb(void);-- Docstring: Register a polled USB controller effect. -
tick_run_audio(function)headers/tick.h:75void tick_run_audio(void);-- Docstring: Register a polled USB controller effect. -
tick_run_desktop(function)headers/tick.h:78void tick_run_desktop(void);-- The xHCI event ring is polled by decision rather than interrupt-driven, so this listener is the polling trigger. -
tick_audio_count(function)headers/tick.h:81int tick_audio_count(void);-- handler is null or the USB table is full. -
tick_desktop_count(function)headers/tick.h:84int tick_desktop_count(void);-- /** Docstring: Run USB listeners in registration order. void tick_run_usb(void); /** Docstring: Run audio listeners... -
tick_desktop_due(function)headers/tick.h:92int tick_desktop_due(unsigned long long ticks, unsigned interval);-- Docstring: Pure desktop gating predicate.
Imported by: kernel/mm/cow.c, kernel/mm/paging.c, kernel/mm/tlb.c, kernel/sched.c, kernel/shell.c, kernel/syscalls.c
-
space(function)headers/tlb.h:4* while that CPU keeps running the same address space (CLONE_VM threads on * an AP). Callers clear the PTEs, flush... -
tlb_shootdown_count(function)headers/tlb.h:22unsigned long tlb_shootdown_count(void);-- Shootdowns broadcast and acknowledgement waits that ran out of budget * (reported by the smp builtin). -
tlb_shootdown_timeouts(function)headers/tlb.h:23unsigned long tlb_shootdown_timeouts(void); -
tlb_nmi_entry(function)headers/tlb.h:26void tlb_nmi_entry(void);-- Shootdowns broadcast and acknowledgement waits that ran out of budget * (reported by the smp builtin). unsigned long...
Imported by: net/net.c, net/tls.c, net/tls_crypto.c, net/tls_x509.c, progs/tls_u/tls_u_main.c, tls_test.c
-
sha256_init(function)headers/tls.h:168void sha256_init(struct sha256_ctx *c); -
sha256_update(function)headers/tls.h:169void sha256_update(struct sha256_ctx *c, const unsigned char *data, unsigned len); -
sha256_final(function)headers/tls.h:170void sha256_final(struct sha256_ctx *c, unsigned char out[32]); -
sha256(function)headers/tls.h:171void sha256(const unsigned char *data, unsigned len, unsigned char out[32]); -
sha384(function)headers/tls.h:172void sha384(const unsigned char *data, unsigned len, unsigned char out[48]); -
hmac_sha256(function)headers/tls.h:174void hmac_sha256(const unsigned char *key, unsigned klen, const unsigned char *data, unsigned dlen, unsigned char... -
tls_prf(function)headers/tls.h:179void tls_prf(const unsigned char *secret, unsigned secret_len, const char *label, const unsigned char *seed... -
aes128_encrypt_block(function)headers/tls.h:184void aes128_encrypt_block(const unsigned char key[16], const unsigned char in[16], unsigned char out[16]);-- void sha256_final(struct sha256_ctx *c, unsigned char out[32]); void sha256(const unsigned char *data, unsigned len... -
aes128_gcm_seal(function)headers/tls.h:189int aes128_gcm_seal(const unsigned char key[16], const unsigned char salt[4], unsigned long long seq, const unsigned...-- GCM. -
aes128_gcm_open(function)headers/tls.h:197int aes128_gcm_open(const unsigned char key[16], const unsigned char salt[4], unsigned long long seq, const unsigned...-- GCM. -
aes128_gcm_seal_core(function)headers/tls.h:208int aes128_gcm_seal_core(const unsigned char key[16], const unsigned char nonce[12], const unsigned char *aad...-- Core GCM with an arbitrary 12-byte nonce (the TLS API above is the 4-byte salt + 8-byte sequence special case). -
aes128_gcm_open_core(function)headers/tls.h:213int aes128_gcm_open_core(const unsigned char key[16], const unsigned char nonce[12], const unsigned char *aad... -
p256_scalar_mult(function)headers/tls.h:222int p256_scalar_mult(const unsigned char scalar[32], const unsigned char qx[32], const unsigned char qy[32]...-- secp256r1 / secp384r1: shared Jacobian point arithmetic over NIST * primes. curve: 0 = P-256, 1 = P-384. -
p384_scalar_mult(function)headers/tls.h:225int p384_scalar_mult(const unsigned char scalar[48], const unsigned char qx[48], const unsigned char qy[48]... -
p256_ecdh(function)headers/tls.h:231int p256_ecdh(const unsigned char priv[32], const unsigned char peer_x[32], const unsigned char peer_y[32], unsigned...-- ECDH shared secret: Z = priv * peer_pub (P-256). -
p256_point_valid(function)headers/tls.h:236int p256_point_valid(const unsigned char x[32], const unsigned char y[32]);-- ECDH shared secret: Z = priv * peer_pub (P-256). -
p256_pub(function)headers/tls.h:237int p256_pub(const unsigned char priv[32], unsigned char x[32], unsigned char y[32]); -
p256_scalar_valid(function)headers/tls.h:239int p256_scalar_valid(const unsigned char scalar[32]); -
ecdsa_verify(function)headers/tls.h:243int ecdsa_verify(int curve, const unsigned char pub_x[], const unsigned char pub_y[], const unsigned char digest[]...-- ECDSA verify over a SHA-256 or SHA-384 digest. curve: 0 = P-256, * 1 = P-384. -
rsa_pkcs1_verify_sha256(function)headers/tls.h:249int rsa_pkcs1_verify_sha256(const unsigned char *n, unsigned n_len, const unsigned char *e, unsigned e_len, const...-- RSA PKCS#1 v1.5 signature verify with SHA-256. modulus up to 4096 bits. * digest is the SHA-256 of the signed data. -
rsa_pkcs1_verify_sha384(function)headers/tls.h:253int rsa_pkcs1_verify_sha384(const unsigned char *n, unsigned n_len, const unsigned char *e, unsigned e_len, const... -
tls_x509_parse_pubkey(function)headers/tls.h:261int tls_x509_parse_pubkey(const unsigned char *der, unsigned len, struct tls_pubkey *pk);-- RSA PKCS#1 v1.5 signature verify with SHA-256. modulus up to 4096 bits. * digest is the SHA-256 of the signed data. -
now(function)headers/tls.h:267* window against now (days since epoch). Returns 0 on success. */ int tls_x509_verify_chain(const unsigned char... -
tls_handshake(function)headers/tls.h:277int tls_handshake(int fd, const char *host);-- Blocking TLS 1.2 handshake over an open TCP socket (net fd index). host is the SNI + certificate hostname. -
tls_send(function)headers/tls.h:280int tls_send(int fd, const char *buf, int len);-- Blocking TLS 1.2 handshake over an open TCP socket (net fd index). host is the SNI + certificate hostname. -
tls_recv(function)headers/tls.h:284int tls_recv(int fd, char *buf, int len);-- Receive decrypted application bytes. -
tls_free_fd(function)headers/tls.h:293static inline void tls_free_fd(int fd)-- Kernel built without the TLS engine (net/tls*.c unlinked): no session can ever exist, so the net.c close path needs... -
tls_sys_handshake(function)headers/tls.h:297long tls_sys_handshake(long fd, long host);-- Kernel built without the TLS engine (net/tls*.c unlinked): no session can ever exist, so the net.c close path needs... -
tls_sys_send(function)headers/tls.h:298long tls_sys_send(long fd, long buf, long len); -
tls_sys_recv(function)headers/tls.h:299long tls_sys_recv(long fd, long buf, long len);
Depends on: headers/kernel.h, headers/net.h, kernel/string.c, kernel/time.c
Imported by: net/tls.c, net/tls_crypto.c, net/tls_x509.c, progs/tls_u/tls_u_main.c, tls_test.c
-
these(function)headers/tls_port.h:29* of these (tls_test.c). */ extern int tls_test_send(int fd, const char *buf, int len); -
tls_test_recv(function)headers/tls_port.h:31extern int tls_test_recv(int fd, char *buf, int len); -
tls_test_recv_timeout(function)headers/tls_port.h:32extern int tls_test_recv_timeout(int fd, char *buf, int len, unsigned long ms); -
tls_test_close(function)headers/tls_port.h:33extern void tls_test_close(int fd); -
tls_now_days(function)headers/tls_port.h:40static inline long tls_now_days(void) -
tls_random(function)headers/tls_port.h:44static inline void tls_random(unsigned char *out, unsigned len) -
sockets(function)headers/tls_port.h:62* sockets (glibc maps socket/connect/send/recv/poll onto the MiniOS * Linux ABI numbers the kernel implements); -
gettimeofday(function)headers/tls_port.h:64* gettimeofday(96) and entropy from /dev/urandom with a time/pid * fallback. Session slots are indexed by raw OS fd... -
tls_u_recv(function)headers/tls_port.h:82int tls_u_recv(int fd, char *buf, int len); -
tls_u_recv_timeout(function)headers/tls_port.h:83int tls_u_recv_timeout(int fd, char *buf, int len, unsigned long ms); -
tls_u_close(function)headers/tls_port.h:84void tls_u_close(int fd); -
syscall(function)headers/tls_port.h:95* the MiniOS DNS syscall (200, invoked sig-0-safe). 0 on success. */ int tls_u_resolve(const char *host, unsigned...
Depends on: headers/wm_notify.h, progs/minios_abi.h
Imported by: drivers/kbd.c, drivers/usbhid.c, kernel.c, kernel/console.c, kernel/console_in.c, kernel/exec.c, kernel/loader.c, kernel/minifetch.c, kernel/mm/cow.c, kernel/mm/paging.c, kernel/panic.c, kernel/sched.c, kernel/shell.c, kernel/spawn.c, kernel/syscalls.c, kernel/vga_cursor.c, kernel/vga_fb.c, kernel/vga_fx.c, progs/src/freedom_wl.c
-
fb_bytes_per_pixel(function)headers/vga_fb.h:30int fb_bytes_per_pixel(void);-- Bytes per framebuffer pixel derived from fb_bpp (1 for 8-bit, 3 for 24, * 4 for 32). -
vga_fb_read_rgb(function)headers/vga_fb.h:34unsigned long vga_fb_read_rgb(int x, int y);-- Read one desktop pixel as packed 0x00RRGGBB (palette-resolved in 8-bit mode, native in true color). -
vga_fb_set_gfx_palette(function)headers/vga_fb.h:38void vga_fb_set_gfx_palette(const unsigned char *pal);-- Store the graphics program's 768-byte palette (SYS_PALETTE). -
vga_fb_boot_config(function)headers/vga_fb.h:40void vga_fb_boot_config(void); -
SYS_DOOM_FRAME(function)headers/vga_fb.h:44* and calls SYS_DOOM_FRAME (211) to have the kernel composite it onto the * desktop at its native resolution, so the... -
SYS_NK_FRAME(function)headers/vga_fb.h:63* SYS_NK_FRAME (220); -
vga_fb_blit_nk_window(function)headers/vga_fb.h:75void vga_fb_blit_nk_window(void);-- RGB companion buffer (3 bytes per pixel, R,G,B order, NK_W x NK_H). -
vga_fb_blit_nk_rgb_window(function)headers/vga_fb.h:76void vga_fb_blit_nk_rgb_window(void); -
below(function)headers/vga_fb.h:99* file below (800x600 RGB PNG on the ramdisk, produced by * tools/gen_desktop_pngs.py) is decoded once per boot via... -
vga_fb_init(function)headers/vga_fb.h:177void vga_fb_init(void);-- A scrollback line can be up to the widest terminal (TERM_MAX_COLS), and a long logical line that wrapped across... -
vga_fb_term_ring_init(function)headers/vga_fb.h:182void vga_fb_term_ring_init(void);-- Feed one completed console line into the terminal history (the text-mode console has no other history) and page that... -
vga_fb_term_feed(function)headers/vga_fb.h:183void vga_fb_term_feed(const char *line, int len); -
vga_fb_history_page(function)headers/vga_fb.h:184void vga_fb_history_page(int dir); -
vga_fb_clear(function)headers/vga_fb.h:185void vga_fb_clear(void); -
vga_fb_pixel(function)headers/vga_fb.h:186void vga_fb_pixel(int x, int y, uint8_t color); -
vga_fb_rect(function)headers/vga_fb.h:187void vga_fb_rect(int x, int y, int w, int h, uint8_t color); -
vga_fb_pixel_rgb(function)headers/vga_fb.h:189void vga_fb_pixel_rgb(int x, int y, uint8_t r, uint8_t g, uint8_t b);-- Feed one completed console line into the terminal history (the text-mode console has no other history) and page that... -
vga_fb_rect_rgb(function)headers/vga_fb.h:190void vga_fb_rect_rgb(int x, int y, int w, int h, uint8_t r, uint8_t g, uint8_t b); -
vga_fb_char(function)headers/vga_fb.h:191void vga_fb_char(int col, int row, char c, uint8_t fg, uint8_t bg); -
vga_fb_str(function)headers/vga_fb.h:192void vga_fb_str(int col, int row, const char *s, uint8_t fg, uint8_t bg); -
vga_fb_putc_term(function)headers/vga_fb.h:193void vga_fb_putc_term(char c); -
vga_fb_puts_term(function)headers/vga_fb.h:194void vga_fb_puts_term(const char *s); -
term_clear(function)headers/vga_fb.h:195void term_clear(void); -
vga_fb_text_cursor(function)headers/vga_fb.h:196void vga_fb_text_cursor(int col); -
vga_fb_hide_text_cursor(function)headers/vga_fb.h:197void vga_fb_hide_text_cursor(void); -
fb_read_packed(function)headers/vga_fb.h:200unsigned long fb_read_packed(int x, int y);-- Packed-pixel primitives (0x00RRGGBB): the cursor layer draws through * these so it never touches raw framebuffer... -
fb_write_packed(function)headers/vga_fb.h:201void fb_write_packed(int x, int y, unsigned long rgb); -
vga_fb_draw_desktop(function)headers/vga_fb.h:202void vga_fb_draw_desktop(void); -
vga_fb_toggle_fullscreen(function)headers/vga_fb.h:203void vga_fb_toggle_fullscreen(void); -
vga_fb_move_terminal(function)headers/vga_fb.h:204void vga_fb_move_terminal(int dx, int dy); -
vga_fb_snap_window(function)headers/vga_fb.h:205void vga_fb_snap_window(int zone); -
vga_fb_resize(function)headers/vga_fb.h:206void vga_fb_resize(int dcols, int drows); -
vga_fb_reset_default(function)headers/vga_fb.h:207void vga_fb_reset_default(void); -
vga_fb_toggle_minimize(function)headers/vga_fb.h:208void vga_fb_toggle_minimize(void); -
vga_fb_is_minimized(function)headers/vga_fb.h:209int vga_fb_is_minimized(void); -
vga_fb_is_fullscreen(function)headers/vga_fb.h:210int vga_fb_is_fullscreen(void); -
vga_fb_gfx_set_fullscreen(function)headers/vga_fb.h:218int vga_fb_gfx_set_fullscreen(int on);-- Graphics window view (headers/wm_gfxview.h owns the math). -
vga_fb_gfx_set_hidden(function)headers/vga_fb.h:219int vga_fb_gfx_set_hidden(int hide); -
vga_fb_gfx_view_name(function)headers/vga_fb.h:220const char *vga_fb_gfx_view_name(void); -
vga_fb_gfx_origin(function)headers/vga_fb.h:221void vga_fb_gfx_origin(int *x, int *y); -
vga_fb_gfx_map_mouse(function)headers/vga_fb.h:222void vga_fb_gfx_map_mouse(int *x, int *y); -
fb_write_row_packed(function)headers/vga_fb.h:224void fb_write_row_packed(int x, int y, const unsigned int *src, int n);-- Graphics window view (headers/wm_gfxview.h owns the math). -
fb_read_row_packed(function)headers/vga_fb.h:225void fb_read_row_packed(int x, int y, unsigned int *dst, int n); -
vga_fb_close_active(function)headers/vga_fb.h:226int vga_fb_close_active(void); -
vga_fb_focus_next(function)headers/vga_fb.h:230void vga_fb_focus_next(void);-- Multi-window manager: Alt-Tab focus cycle, Super-Tab tiling, second * terminal. -
vga_fb_focus_id(function)headers/vga_fb.h:231int vga_fb_focus_id(int id); -
vga_fb_focus_get(function)headers/vga_fb.h:232int vga_fb_focus_get(void); -
vga_fb_focus_event(function)headers/vga_fb.h:235const wm_notify_event_t *vga_fb_focus_event(void);-- Focus event bus (wm_notify.h): last move for serial-observable state, * plus programmatic reporting for focus moves... -
vga_fb_focus_report(function)headers/vga_fb.h:236void vga_fb_focus_report(int before, int source); -
vga_fb_theme_name(function)headers/vga_fb.h:237int vga_fb_theme_name(char *dst, int cap); -
vga_fb_ps2_owner(function)headers/vga_fb.h:243int vga_fb_ps2_owner(int pid);-- PS/2 ownership for pid: 1 when pid may consume the keyboard port. -
vga_fb_nterms_get(function)headers/vga_fb.h:244int vga_fb_nterms_get(void); -
vga_fb_term_split(function)headers/vga_fb.h:245int vga_fb_term_split(void); -
vga_fb_term_close_focused(function)headers/vga_fb.h:246int vga_fb_term_close_focused(void); -
vga_fb_tile_all(function)headers/vga_fb.h:247void vga_fb_tile_all(void); -
vga_fb_layout_set(function)headers/vga_fb.h:248int vga_fb_layout_set(int mode); -
vga_fb_layout_cycle(function)headers/vga_fb.h:249void vga_fb_layout_cycle(void); -
vga_fb_layout_get(function)headers/vga_fb.h:250int vga_fb_layout_get(void); -
vga_fb_layout_name(function)headers/vga_fb.h:251const char *vga_fb_layout_name(void); -
vga_fb_list_windows(function)headers/vga_fb.h:252void vga_fb_list_windows(void); -
wm_close_pending(function)headers/vga_fb.h:253int wm_close_pending(void); -
wm_clear_close(function)headers/vga_fb.h:254void wm_clear_close(void); -
wm_gfx_mode_active(function)headers/vga_fb.h:255int wm_gfx_mode_active(void); -
vga_fb_mouse_tick(function)headers/vga_fb.h:256void vga_fb_mouse_tick(void); -
vga_fb_wait_tick(function)headers/vga_fb.h:260void vga_fb_wait_tick(void);-- Desktop tick for a kernel wait loop (foreground process wait, mrun): runs vga_fb_mouse_tick at DESKTOP_TICK_INTERVAL... -
vga_fb_mouse_init(function)headers/vga_fb.h:261void vga_fb_mouse_init(void); -
dock_bounce_counts(function)headers/vga_fb.h:264void dock_bounce_counts(unsigned long *kicks, unsigned long *paints);-- Dock click bounce (Mac style): arm count and strip repaints while live, * for the serial-observable proof (`wm... -
dock_click_count(function)headers/vga_fb.h:265void dock_click_count(unsigned long *edges); -
dock_pending_active(function)headers/vga_fb.h:266int dock_pending_active(void); -
pixels(function)headers/vga_fb.h:270* are heap buffers of packed pixels (fb_read_packed order), 0 on OOM or a * degenerate rect. A disabled effect or a... -
vga_fx_enabled(function)headers/vga_fb.h:274int vga_fx_enabled(void); -
vga_fx_snap_rect(function)headers/vga_fb.h:275unsigned int *vga_fx_snap_rect(int x, int y, int w, int h); -
vga_fx_restore_rect(function)headers/vga_fb.h:276void vga_fx_restore_rect(int x, int y, int w, int h, const unsigned int *buf); -
vga_fx_free(function)headers/vga_fb.h:277void vga_fx_free(unsigned int *buf); -
vga_fx_melt_rect(function)headers/vga_fb.h:278void vga_fx_melt_rect(int x, int y, int w, int h, const unsigned int *oldb, const unsigned int *newb); -
vga_fx_melt_from_black(function)headers/vga_fb.h:280void vga_fx_melt_from_black(int x, int y, int w, int h, const unsigned int *newb); -
vga_fb_set_gfx_mode(function)headers/vga_fb.h:291void vga_fb_set_gfx_mode(int on);-- Graphics-mode pointer.
Imported by: kernel/vga_fb.c, kernel/vga_fx.c, tests/test_fx.c
-
vga_fx_rand(function)headers/vga_fx.h:30static inline unsigned long vga_fx_rand(unsigned long *s)-- typedef struct { int step_px; int frame_ms; int max_delay; unsigned long seed; } vga_fx_config_t; /** Docstring... -
vga_fx_init_cols(function)headers/vga_fx.h:47static inline int vga_fx_init_cols(const vga_fx_config_t *cfg, int *cols, int w)-- Docstring: Seed consecutive column fronts with staggered delays. -
vga_fx_advance(function)headers/vga_fx.h:71static inline int vga_fx_advance(const vga_fx_config_t *cfg, int *cols, int w, int h)-- Docstring: Advance every column front one melt frame. * Returns 1 when every front reached the rect bottom, 0 otherwise. -
vga_fx_front(function)headers/vga_fx.h:97static inline int vga_fx_front(int col_y, int h)-- done = 0; } else if (cols[i] < h) { int dy = (cols[i] < 16) ? cols[i] + 1 : step; cols[i] += dy; if (cols[i] > h) {... -
vga_fx_clamp_rect(function)headers/vga_fx.h:109static inline int vga_fx_clamp_rect(int *x, int *y, int *w, int *h, int fb_w, int fb_h)-- /** Docstring: Rows [0, front) of one column already show the new frame. static inline int vga_fx_front(int col_y...
Imported by: headers/kernel.h, headers/sched.h, headers/spawn.h, kernel/spawn.c, tests/test_fault.c, tests/test_vma.c, tests/test_vma_bench.c, vma.c
-
vma_tree_init(function)headers/vma.h:64void vma_tree_init(void); -
vma_tree_insert(function)headers/vma.h:65vma_node_t *vma_tree_insert(vma_node_t **root, unsigned long base, unsigned long len); -
vma_tree_find(function)headers/vma.h:66vma_node_t *vma_tree_find(vma_node_t *root, unsigned long base); -
vma_tree_find_containing(function)headers/vma.h:67vma_node_t *vma_tree_find_containing(vma_node_t *root, unsigned long va); -
vma_tree_delete(function)headers/vma.h:68int vma_tree_delete(vma_node_t **root, unsigned long base); -
vma_ctx_init(function)headers/vma.h:69void vma_ctx_init(vma_ctx_t *c, vma_node_t *pool); -
vma_ctx_bind(function)headers/vma.h:70void vma_ctx_bind(vma_ctx_t *c); -
vma_ctx_save(function)headers/vma.h:71void vma_ctx_save(vma_ctx_t *c); -
vma_view_save(function)headers/vma.h:86void vma_view_save(vma_view_t *v); -
vma_view_load(function)headers/vma.h:87void vma_view_load(const vma_view_t *v); -
vma_ctx_alloc(function)headers/vma.h:90vma_ctx_t *vma_ctx_alloc(void);-- Heap-backed contexts live in sched.c (vma.c stays host-testable): * alloc returns a fresh context with a private... -
vma_ctx_free(function)headers/vma.h:91void vma_ctx_free(vma_ctx_t *c);
Depends on: headers/drivers/modifiers.h
Imported by: drivers/kbd.c, kernel/vga_fb.c, tests/test_wm.c
-
wm_is_click_edge(function)headers/wm_events.h:52static inline int wm_is_click_edge(const wm_event_config_t *cfg, int prev_buttons, int curr_buttons)-- int button; int wheel; } wm_event_t; /** Docstring: Centralized event translator configuration. typedef struct { int... -
wm_is_release_edge(function)headers/wm_events.h:59static inline int wm_is_release_edge(const wm_event_config_t *cfg, int prev_buttons, int curr_but...-- int wheel_step; } wm_event_config_t; /** Docstring: Default event configuration matching the PS/2 mouse path.... -
wm_translate_event(function)headers/wm_events.h:66static inline wm_event_t wm_translate_event(const wm_event_config_t *cfg, const wm_mouse_t *prev,...-- static inline int wm_is_click_edge(const wm_event_config_t *cfg, int prev_buttons, int curr_buttons) { int mask =... -
wm_event_suppresses_drag(function)headers/wm_events.h:104static inline int wm_event_suppresses_drag(const wm_event_t *evt)-- return evt; } if (curr->wheel != 0) { evt.type = WM_EVT_SCROLL; return evt; } if (curr->x != prev->x || curr->y !=... -
wm_combo_lookup(function)headers/wm_events.h:201static inline int wm_combo_lookup(int alt, int altgr, int sup, int e0, int sc, int path, int *zon...-- {1, 0, 1, WM_SC_HOME, WM_PATH_COOKED, WM_COMBO_SNAP, WM_SNAP_TOP_LEFT}, {1, 0, 1, WM_SC_END, WM_PATH_COOKED... -
wm_combo_lookup_mods(function)headers/wm_events.h:238static inline int wm_combo_lookup_mods(const modifier_state_t *st, int e0, int sc, int path, int ...-- continue; } if (!(WM_COMBOS[i].paths & path)) { continue; } if (zone_out != 0) { zone_out = WM_COMBOS[i].zone; }...
Depends on: headers/wm_window.h
Imported by: kernel/vga_fb.c, tests/test_wm.c
-
wm_focus_selectable(function)headers/wm_focus.h:23static inline int wm_focus_selectable(const wm_focus_state_t *st, int id)-- #ifndef WM_FOCUS_H #define WM_FOCUS_H #include "wm_window.h" /** Docstring: Focus state snapshot consumed by every... -
wm_focus_next(function)headers/wm_focus.h:38static inline int wm_focus_next(const wm_focus_state_t *st)-- { if (st == 0) { return 0; } if (id == WM_WINDOW_GFX_ID) { return st->gfx_active ? -
wm_focus_set(function)headers/wm_focus.h:55static inline int wm_focus_set(const wm_focus_state_t *st, int id)-- int i; if (st == 0) { return 0; } for (i = 0; i < 4; i++) { flat[i] = 0; } for (i = 0; i < st->nterms && i < 4; i++)...
Imported by: headers/wm_window.h, kernel/vga_fb.c, tests/test_wm.c
-
wm_rect_valid(function)headers/wm_geom.h:33static inline int wm_rect_valid(const wm_rect_t *r)-- } wm_geom_config_t; /** Docstring: Default geometry matching the kernel 8x8 font layout. #define... -
wm_rect_contains(function)headers/wm_geom.h:39static inline int wm_rect_contains(const wm_rect_t *r, int px, int py)-- typedef struct { int x; int y; int w; int h; } wm_rect_t; /** Docstring: True when the rectangle can contain any... -
wm_title_bar_rect(function)headers/wm_geom.h:48static inline wm_rect_t wm_title_bar_rect(const wm_geom_config_t *cfg, int px, int py, int w)-- { return r != 0 && r->w > 0 && r->h > 0; } /** Docstring: True when point px,py lies inside rectangle r. static... -
wm_content_rect(function)headers/wm_geom.h:59static inline wm_rect_t wm_content_rect(const wm_geom_config_t *cfg, int px, int py, int w, int h)-- } /** Docstring: Title bar strip for a window at px,py with total width w. static inline wm_rect_t... -
wm_scrollbar_rect(function)headers/wm_geom.h:71static inline wm_rect_t wm_scrollbar_rect(const wm_geom_config_t *cfg, int px, int py, int conten...-- /** Docstring: Text content area below the title bar. static inline wm_rect_t wm_content_rect(const wm_geom_config_t... -
wm_hit_title_bar(function)headers/wm_geom.h:84static inline int wm_hit_title_bar(const wm_geom_config_t *cfg, int wx, int wy, int w, int px, in...-- /** Docstring: Scrollbar strip at the right edge of the content area. static inline wm_rect_t... -
wm_clamp_point(function)headers/wm_geom.h:91static inline void wm_clamp_point(int *px, int *py, int fb_w, int fb_h)-- r.y = py + th; r.w = sw; r.h = content_h > 0 ? content_h : 0; return r; } /** Docstring: True when point px,py hits...
Next: API_p6.md
Generated offline by readmenator from commit cd87980b5eb5. 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