This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
developersguide:kernelapi [2016/07/08 13:13] antoineleca Enforce alphabetic order |
developersguide:kernelapi [2016/07/08 13:35] antoineleca Add stubs for missing calls |
||
---|---|---|---|
Line 27: | Line 27: | ||
|[[#sys_fork|SYS_FORK]] |Fork a process; copy parent process | | |[[#sys_fork|SYS_FORK]] |Fork a process; copy parent process | | ||
|[[#sys_exec|SYS_EXEC]] |Execute a process; initialize registers | | |[[#sys_exec|SYS_EXEC]] |Execute a process; initialize registers | | ||
- | |[[#sys_exit|SYS_EXIT]] |Exit a user process; clear process slot | | + | |[[#sys_clear|SYS_CLEAR]] |Exit a user process; clear process slot | |
- | |[[#sys_nice|SYS_NICE]] |Change priority of a user process | | + | |[[#sys_exit|SYS_EXIT]] |Exit a system process | |
+ | |[[#sys_update|SYS_UPDATE]] |Update state of a system process | | ||
+ | |[[#sys_schedule|SYS_SCHEDULE]] |Scheduler | | ||
+ | |[[#sys_schedctl|SYS_SCHEDCTL]] |Change scheduler control | | ||
|[[#sys_privctl|SYS_PRIVCTL]] |Change system process privileges | | |[[#sys_privctl|SYS_PRIVCTL]] |Change system process privileges | | ||
|[[#sys_trace|SYS_TRACE]] |Trace or control process execution | | |[[#sys_trace|SYS_TRACE]] |Trace or control process execution | | ||
|[[#sys_setgrant|SYS_SETGRANT]] |Tell kernel about grant table | | |[[#sys_setgrant|SYS_SETGRANT]] |Tell kernel about grant table | | ||
|[[#sys_runctl|SYS_RUNCTL]] |Set/clear stop flag of a process | | |[[#sys_runctl|SYS_RUNCTL]] |Set/clear stop flag of a process | | ||
+ | |[[#sys_getmcontext|SYS_GETMCONTEXT]] |Get context of a process | | ||
+ | |[[#sys_setmcontext|SYS_SETMCONTEXT]] |Get context of a process | | ||
||//SIGNAL HANDLING// | | ||//SIGNAL HANDLING// | | ||
|[[#sys_kill|SYS_KILL]] |Send a signal to a process | | |[[#sys_kill|SYS_KILL]] |Send a signal to a process | | ||
Line 43: | Line 48: | ||
|[[#sys_memset|SYS_MEMSET]] |Fill a physical memory area with a constant pattern byte | | |[[#sys_memset|SYS_MEMSET]] |Fill a physical memory area with a constant pattern byte | | ||
|[[#sys_vmctl|SYS_VMCTL]] |//(to be documented)// | | |[[#sys_vmctl|SYS_VMCTL]] |//(to be documented)// | | ||
+ | |[[#sys_padconf|SYS_PADCONF]] |//(to be documented)// | | ||
||//COPYING DATA// | | ||//COPYING DATA// | | ||
|[[#sys_umap|SYS_UMAP]] |Map virtual to physical address | | |[[#sys_umap|SYS_UMAP]] |Map virtual to physical address | | ||
+ | |[[#sys_umap_remote|SYS_UMAP_REMOTE]] |Map virtual to physical address | | ||
|[[#sys_vumap|SYS_VUMAP]] |Batch map virtual to physical addresses | | |[[#sys_vumap|SYS_VUMAP]] |Batch map virtual to physical addresses | | ||
|[[#sys_vircopy|SYS_VIRCOPY]] |Copy data using virtual addressing | | |[[#sys_vircopy|SYS_VIRCOPY]] |Copy data using virtual addressing | | ||
Line 62: | Line 69: | ||
|[[#sys_abort|SYS_ABORT]] |Abort MINIX: shutdown the system | | |[[#sys_abort|SYS_ABORT]] |Abort MINIX: shutdown the system | | ||
|[[#sys_getinfo|SYS_GETINFO]] |Get a copy system info or kernel data | | |[[#sys_getinfo|SYS_GETINFO]] |Get a copy system info or kernel data | | ||
- | |[[#sys_sysctl|SYS_SYSCTL]] |//(to be documented)// | | + | |[[#sys_diagctl|SYS_DIAGCTL]] |//(to be documented)// | |
||//CLOCK FUNCTIONALITY// | | ||//CLOCK FUNCTIONALITY// | | ||
|[[#sys_setalarm|SYS_SETALARM]] |Set or reset a synchronous alarm timer | | |[[#sys_setalarm|SYS_SETALARM]] |Set or reset a synchronous alarm timer | | ||
|[[#sys_times|SYS_TIMES]] |Get process times, boot time and uptime | | |[[#sys_times|SYS_TIMES]] |Get process times, boot time and uptime | | ||
|[[#sys_stime|SYS_STIME]] |Set boot time | | |[[#sys_stime|SYS_STIME]] |Set boot time | | ||
+ | |[[#sys_settime|SYS_SETTIME]] |Update time | | ||
|[[#sys_vtimer|SYS_VTIMER]] |Set or retrieve a process virtual timer | | |[[#sys_vtimer|SYS_VTIMER]] |Set or retrieve a process virtual timer | | ||
||//PROFILING// | | ||//PROFILING// | | ||
Line 100: | Line 108: | ||
**library functions**\\ int sys_abort(int shutdown_status, ...); | **library functions**\\ int sys_abort(int shutdown_status, ...); | ||
+ | |||
+ | ==== SYS_CLEAR ==== | ||
+ | **request parameters**\\ //(to be documented)// | ||
+ | |||
+ | **response parameters**\\ //(to be documented)// | ||
+ | |||
+ | **return value**\\ //(to be documented)// | ||
+ | |||
+ | **library functions**\\ //(to be documented)// | ||
==== SYS_CPROF ==== | ==== SYS_CPROF ==== | ||
Line 128: | Line 145: | ||
**library functions**\\ int sys_in(port_t port, unsigned long value, int io_type);\\ int sys_inb(port_t port, u8_t *byte);\\ int sys_inw(port_t port, u16_t *word);\\ int sys_inl(port_t port, u32_t *long);\\ int sys_out(port_t port, unsigned long value, int io_type);\\ int sys_outb(port_t port, u8_t byte);\\ int sys_outw(port_t port, u16_t word);\\ int sys_outl(port_t port, u32t long);\\ | **library functions**\\ int sys_in(port_t port, unsigned long value, int io_type);\\ int sys_inb(port_t port, u8_t *byte);\\ int sys_inw(port_t port, u16_t *word);\\ int sys_inl(port_t port, u32_t *long);\\ int sys_out(port_t port, unsigned long value, int io_type);\\ int sys_outb(port_t port, u8_t byte);\\ int sys_outw(port_t port, u16_t word);\\ int sys_outl(port_t port, u32t long);\\ | ||
+ | |||
+ | ==== SYS_DIAGCTL ==== | ||
+ | **request parameters**\\ //(to be documented)// | ||
+ | |||
+ | **response parameters**\\ //(to be documented)// | ||
+ | |||
+ | **return value**\\ //(to be documented)// | ||
+ | |||
+ | **library functions**\\ //(to be documented)// | ||
==== SYS_ENDKSIG ==== | ==== SYS_ENDKSIG ==== | ||
Line 208: | Line 234: | ||
**library functions**\\ int sys_getksig(endpoint_t *proc_nr, sigset_t *sig_map); | **library functions**\\ int sys_getksig(endpoint_t *proc_nr, sigset_t *sig_map); | ||
+ | |||
+ | ==== SYS_GETMCONTEXT ==== | ||
+ | **request parameters**\\ //(to be documented)// | ||
+ | |||
+ | **response parameters**\\ //(to be documented)// | ||
+ | |||
+ | **return value**\\ //(to be documented)// | ||
+ | |||
+ | **library functions**\\ //(to be documented)// | ||
+ | |||
+ | ==== SYS_INT86 ==== | ||
+ | **request parameters**\\ //(to be documented)// | ||
+ | |||
+ | **response parameters**\\ //(to be documented)// | ||
+ | |||
+ | **return value**\\ //(to be documented)// | ||
+ | |||
+ | **library functions**\\ //(to be documented)// | ||
==== SYS_IOPENABLE ==== | ==== SYS_IOPENABLE ==== | ||
Line 244: | Line 288: | ||
**library functions**\\ int sys_kill(endpoint_t proc_nr, int sig_nr); | **library functions**\\ int sys_kill(endpoint_t proc_nr, int sig_nr); | ||
- | |||
Line 261: | Line 304: | ||
**Notes**: \\ | **Notes**: \\ | ||
This function is used, for example, to zero the BSS segment on an exec() POSIX-call. The kernel is asked to do the work for performance reasons. | This function is used, for example, to zero the BSS segment on an exec() POSIX-call. The kernel is asked to do the work for performance reasons. | ||
- | |||
Line 281: | Line 323: | ||
**library functions**\\ int sys_nice(endpoint_t proc_nr, int priority); | **library functions**\\ int sys_nice(endpoint_t proc_nr, int priority); | ||
+ | |||
+ | ==== SYS_PADCONF ==== | ||
+ | **request parameters**\\ //(to be documented)// | ||
+ | |||
+ | **response parameters**\\ //(to be documented)// | ||
+ | |||
+ | **return value**\\ //(to be documented)// | ||
+ | |||
+ | **library functions**\\ //(to be documented)// | ||
==== SYS_PHYSCOPY ==== | ==== SYS_PHYSCOPY ==== | ||
Line 378: | Line 429: | ||
**Notes:** \\ | **Notes:** \\ | ||
The memory driver uses this function for reads of /dev/zero to set a requestor's buffer to all '\0'. | The memory driver uses this function for reads of /dev/zero to set a requestor's buffer to all '\0'. | ||
+ | |||
+ | ==== SYS_SCHEDCTL ==== | ||
+ | **request parameters**\\ //(to be documented)// | ||
+ | |||
+ | **response parameters**\\ //(to be documented)// | ||
+ | |||
+ | **return value**\\ //(to be documented)// | ||
+ | |||
+ | **library functions**\\ //(to be documented)// | ||
+ | |||
+ | ==== SYS_SCHEDULE ==== | ||
+ | **request parameters**\\ //(to be documented)// | ||
+ | |||
+ | **response parameters**\\ //(to be documented)// | ||
+ | |||
+ | **return value**\\ //(to be documented)// | ||
+ | |||
+ | **library functions**\\ //(to be documented)// | ||
==== SYS_SDEVIO ==== | ==== SYS_SDEVIO ==== | ||
Line 415: | Line 484: | ||
**library functions**\\ int sys_setgrant(cp_grant_t *grants, int ngrants); | **library functions**\\ int sys_setgrant(cp_grant_t *grants, int ngrants); | ||
+ | |||
+ | ==== SYS_SETMCONTEXT ==== | ||
+ | **request parameters**\\ //(to be documented)// | ||
+ | |||
+ | **response parameters**\\ //(to be documented)// | ||
+ | |||
+ | **return value**\\ //(to be documented)// | ||
+ | |||
+ | **library functions**\\ //(to be documented)// | ||
+ | |||
+ | ==== SYS_SETTIME ==== | ||
+ | **request parameters**\\ //(to be documented)// | ||
+ | |||
+ | **response parameters**\\ //(to be documented)// | ||
+ | |||
+ | **return value**\\ //(to be documented)// | ||
+ | |||
+ | **library functions**\\ //(to be documented)// | ||
==== SYS_SIGRETURN ==== | ==== SYS_SIGRETURN ==== | ||
Line 435: | Line 522: | ||
==== SYS_SPROF ==== | ==== SYS_SPROF ==== | ||
+ | **request parameters**\\ //(to be documented)// | ||
+ | |||
+ | **response parameters**\\ //(to be documented)// | ||
+ | |||
+ | **return value**\\ //(to be documented)// | ||
+ | |||
+ | **library functions**\\ //(to be documented)// | ||
+ | |||
+ | ==== SYS_STATECTL ==== | ||
**request parameters**\\ //(to be documented)// | **request parameters**\\ //(to be documented)// | ||
Line 509: | Line 605: | ||
**library functions**\\ int sys_umap(endpoint_t proc_nr, int seg, vir_bytes vir_addr, vir_bytes count, phys_bytes *phys_addr); | **library functions**\\ int sys_umap(endpoint_t proc_nr, int seg, vir_bytes vir_addr, vir_bytes count, phys_bytes *phys_addr); | ||
+ | |||
+ | ==== SYS_UMAP_REMOTE ==== | ||
+ | **request parameters**\\ //(to be documented)// | ||
+ | |||
+ | **response parameters**\\ //(to be documented)// | ||
+ | |||
+ | **return value**\\ //(to be documented)// | ||
+ | |||
+ | **library functions**\\ //(to be documented)// | ||
+ | |||
+ | ==== SYS_UPDATE ==== | ||
+ | **request parameters**\\ //(to be documented)// | ||
+ | |||
+ | **response parameters**\\ //(to be documented)// | ||
+ | |||
+ | **return value**\\ //(to be documented)// | ||
+ | |||
+ | **library functions**\\ //(to be documented)// | ||
==== SYS_VDEVIO ==== | ==== SYS_VDEVIO ==== |