Rev 1264 | Rev 1293 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1264 | Rev 1278 | ||
|---|---|---|---|
| Line 54... | Line 54... | ||
| 54 | putchar(((char *) buf)[i]); |
54 | putchar(((char *) buf)[i]); |
| 55 | 55 | ||
| 56 | return count; |
56 | return count; |
| 57 | } |
57 | } |
| 58 | 58 | ||
| 59 | static __native sys_int_control(int enable) |
59 | static __native sys_preempt_control(int enable) |
| 60 | { |
60 | { |
| - | 61 | if (! cap_get(TASK) & CAP_PREEMPT_CONTROL) |
|
| - | 62 | return EPERM; |
|
| - | 63 | if (enable) |
|
| 61 | panic("Not implemented."); |
64 | preemption_enable(); |
| - | 65 | else |
|
| - | 66 | preemption_disable(); |
|
| - | 67 | return 0; |
|
| 62 | } |
68 | } |
| 63 | 69 | ||
| 64 | /** Dispatch system call */ |
70 | /** Dispatch system call */ |
| 65 | __native syscall_handler(__native a1, __native a2, __native a3, |
71 | __native syscall_handler(__native a1, __native a2, __native a3, |
| 66 | __native a4, __native id) |
72 | __native a4, __native id) |
| Line 72... | Line 78... | ||
| 72 | } |
78 | } |
| 73 | 79 | ||
| 74 | syshandler_t syscall_table[SYSCALL_END] = { |
80 | syshandler_t syscall_table[SYSCALL_END] = { |
| 75 | sys_io, |
81 | sys_io, |
| 76 | sys_tls_set, |
82 | sys_tls_set, |
| 77 | sys_int_control, |
83 | sys_preempt_control, |
| 78 | 84 | ||
| 79 | /* Thread and task related syscalls. */ |
85 | /* Thread and task related syscalls. */ |
| 80 | sys_thread_create, |
86 | sys_thread_create, |
| 81 | sys_thread_exit, |
87 | sys_thread_exit, |
| 82 | sys_task_get_id, |
88 | sys_task_get_id, |