summaryrefslogtreecommitdiff
path: root/doc/syscalls.txt
blob: 89a1003ecd34bf926f8900238224c900b002d883 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Syscalls pass by int64. The identifier of the called function is in eax, parameters
are in ebx, ecx, edx, esi, edi.

Syscall list :

id=eax	Name			Parameters				Description
  0		thread_exit		none					Signal kernel that current thread has finished
  1		schedule		none					Switch to next thread (might be the current one)
  2		thread_sleep	ebx: time (int) msecs	Tell kernel to put current thread to sleep
  3		process_exit	ebx: return value (int)	Tell kernel to end current process, cleaning up everything
  4		printk			ebx: addr of a string	Print a message to screen
  5		thread_new		ebx: entry point		Creates a new thread
						ecx: data pointer
						edx: stack pointer
  6		irq_wait		ebx: irq number			Waits for an IRQ (requires privilege PL_DRIVER)
  7		proc_priv		none					Returns current process privilege level
  8		proc_setheap

If a processes wishes to exit with an error code, it HAS to use process_exit. thread_exit will do nothing.