Changes between Version 43 and Version 44 of kernel_syscalls
- Timestamp:
- Sep 17, 2015, 9:08:15 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
kernel_syscalls
v43 v44 60 60 61 61 === 1) int '''_sys_tty_alloc'''( unsigned int shared ) === 62 This function allocates a private TTY terminal to the calling thread, and registers the TTY terminal index (called channel) in the thread context. If the <shared> argument is non-zero, the same TTY channel is registered in the context of all others threads in the same vspace, resulting in one single TTY terminal shared by all threads in the vspace. The number of users is registered in the _tty_channel[channel] array. 62 This function allocates a private TTY terminal to the calling thread, and registers the TTY terminal index (called channel) in the thread context. If the <shared> argument is non-zero, the same TTY channel is registered in the context of all others threads in the same vspace, resulting in one single TTY terminal shared by all threads in the vspace. The number of users is registered in the _tty_users[channel] array. An external IRQ (WTI) is dynamically allocated to the processor running the calling thread. 63 The processor coordinates[x,y,p] and the WTI index are registered in the _tty_wti[channel] array. 63 64 64 65 Returns 0 if success. … … 66 67 67 68 === 2) int '''_sys_tty_release'''( ) === 68 This function release the TTY channel allocated to the calling thread. The corresponding thread context slot is reset (0xFFFFFFFF value), and the _tty_ channel[channel] entry is decremented. The corresponding channel keep busy until69 the value stored in _tty_ channel[channel] is non-zero.69 This function release the TTY channel allocated to the calling thread. The corresponding thread context slot is reset (0xFFFFFFFF value), and the _tty_users[channel] entry is decremented. The corresponding channel keep busy until 70 the value stored in _tty_users[channel] is non-zero. 70 71 71 72 Returns 0 if success. … … 84 85 85 86 86 == TIM retated syscall handlers ==87 == TIMER retated syscall handlers == 87 88 88 89 === 1) int '''_sys_tim_alloc'''() === 89 This function allocates a private timer to the calling task, and register the timer index in the task context. 90 Return -1 if no timer available. 91 90 This function allocates a private timer to the calling thread, and register the timer index (called channel) in the thread context. 91 The timer is not shared: a 1 value is registered in the _tim_users[channel] array. An external IRQ (WTI) is dynamically allocated to the processor running the calling thread. The processor coordinates[x,y,p] and the WTI index are registered in the _tty_wti[channel] array. 92 93 Returns 0 if success. 94 Return -1 if no timer available, or timer already allocated. 95 96 === 2) int '''_sys_tim_release'''() === 97 This function release the TIMER channel allocated to the calling thread. The corresponding thread context slot is reset (0xFFFFFFFF value), and the _tty_users[channel] entry is reset to 0. 92 98 === 2) int '''_sys_tim_start'''( unsigned int period ) === 93 99 This function starts the user timer channel allocated to the calling task. 94 Returns 0 if success. Returns -1 if no allocated timer. 95 96 === 3) int '''_sys_tim_stop'''() === 100 101 Returns 0 if success. 102 Returns -1 if timer already released. 103 104 ===3) int '''_sys_tim_start'''( unsigned int period ) === 105 This function activates the timer allocated to the calling thread. The <period> argument defines the IRQ period. 106 107 Returns 0 if success. 108 Returns -1 if no allocated timer. 109 110 === 4) int '''_sys_tim_stop'''() === 97 111 This function stops the user timer channel allocated to the calling task. 98 Returns 0 if success. Returns -1 if no allocated timer. 112 113 Returns 0 if success. 114 Returns -1 if no allocated timer. 99 115 100 116