Changes between Version 43 and Version 44 of kernel_syscalls


Ignore:
Timestamp:
Sep 17, 2015, 9:08:15 AM (9 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • kernel_syscalls

    v43 v44  
    6060
    6161=== 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.
     62This 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.
     63The processor coordinates[x,y,p] and the WTI index are registered in the _tty_wti[channel] array.
    6364
    6465Returns 0 if success.
     
    6667
    6768=== 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 until
    69 the value stored in _tty_channel[channel] is non-zero.
     69This 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
     70the value stored in _tty_users[channel] is non-zero.
    7071
    7172Returns 0 if success.
     
    8485
    8586
    86 == TIM retated syscall handlers ==
     87== TIMER retated syscall handlers ==
    8788
    8889=== 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 
     90This function allocates a private timer to the calling thread, and register the timer index (called channel) in the thread context.
     91The 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
     93Returns 0 if success.
     94Return -1 if no timer available, or timer already allocated.
     95
     96=== 2) int '''_sys_tim_release'''() ===
     97This 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.
    9298=== 2) int '''_sys_tim_start'''( unsigned int period ) ===
    9399This 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
     101Returns 0 if success.
     102Returns -1 if  timer already released.
     103
     104===3) int '''_sys_tim_start'''( unsigned int period ) ===
     105This function activates the timer allocated to the calling thread. The <period> argument defines the IRQ period.
     106
     107Returns 0 if success.
     108Returns -1 if no allocated timer.
     109 
     110=== 4) int '''_sys_tim_stop'''() ===
    97111This function stops the user timer channel allocated to the calling task.
    98 Returns 0 if success. Returns -1 if no allocated timer.
     112
     113Returns 0 if success.
     114Returns -1 if no allocated timer.
    99115
    100116