summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAlex AUVOLAT <alexis211@gmail.com>2012-05-04 21:02:43 +0200
committerAlex AUVOLAT <alexis211@gmail.com>2012-05-04 21:02:43 +0200
commit68940415ee0932a68e2c3fb4fe0dc8b711e67d7c (patch)
tree6b5aadd621bd4cd4a00850247d35757709d83893 /doc
parenta9bb8d1be024730fc4687aab78a8e5cb54b4f05e (diff)
downloadTCE-68940415ee0932a68e2c3fb4fe0dc8b711e67d7c.tar.gz
TCE-68940415ee0932a68e2c3fb4fe0dc8b711e67d7c.zip
Preparations.
Diffstat (limited to 'doc')
-rw-r--r--doc/syscalls.txt34
1 files changed, 17 insertions, 17 deletions
diff --git a/doc/syscalls.txt b/doc/syscalls.txt
index c94db19..5df2cf6 100644
--- a/doc/syscalls.txt
+++ b/doc/syscalls.txt
@@ -1,25 +1,25 @@
-Syscalls pass by int64. The identifier of the called function is in eax, parameters
-are in ebx, ecx, edx, esi, edi.
+Syscalls pass by int64. The identifier of the called function is in ebx, with
+eax = 0, parameters are in 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
+id=ebx Name Parameters Description
+ 1 thread_exit none Signal kernel that current thread has finished
+ 2 schedule none Switch to next thread (might be the current one)
+ 3 thread_sleep ecx: time (int) msecs Tell kernel to put current thread to sleep
+ 4 process_exit ecx: return value (int) Tell kernel to end current process, cleaning up everything
+ 5 printk ecx: addr of a string Print a message to screen
+ 6 thread_new ecx: entry point Creates a new thread
+ edx: data pointer
+ esi: stack pointer
+ 7 irq_wait ecx: irq number Waits for an IRQ (requires privilege PL_DRIVER)
+ 8 proc_priv none Returns current process privilege level
- 8 sbrk ebx: size Allocates some memory
- 9 brk ebx: new_end Allocates/frees some memory
+ 9 sbrk ecx: size Allocates some memory
+ 10 brk ecx: new_end Allocates/frees some memory
- 10 mmap (see linux specs)
- 11 munmap (see linux specs)
+ 11 mmap (see linux specs)
+ 12 munmap (see linux specs)
If a processes wishes to exit with an error code, it HAS to use process_exit. thread_exit will do nothing.