Changes between Version 105 and Version 106 of library_stdio


Ignore:
Timestamp:
Sep 15, 2015, 11:14:29 AM (9 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • library_stdio

    v105 v106  
    66
    77All these functions use a ''syscall'' instruction to enter the system.
    8 In  case of system call failure (illegal arguments), the calling thread
     8For most system calls, in case of failure (illegal arguments), the calling thread
    99is killed with a ''giet_pthread_exit()''.
    10 
    11 Therefore, for most of these system calls, there is no return value.
    1210
    1311 == __Processor related system calls__ ==
     
    5250This function desactivates the calling thread.
    5351The 'string' argument is a (user defined) log message displayed on the kernel TTY.
    54 
    55  === 3) unsigned int '''giet_pthread_join'''( pthread_t  trdid , void** ptr ) ===
     52No error possible.
     53
     54 === 3) int '''giet_pthread_join'''( pthread_t  trdid , void** ptr ) ===
    5655This blocking function can be used to detect completion of a thread activated by a giet_pthread_create().
    5756It returns only when the thread identified by the ''traded'' argument is desactivated.
     
    6362Return -2  if ptr not NULL
    6463
    65 No error possible.
    66 
    67  === 3) unsigned int '''giet_thread_id'''() ===
    68 This functions returns (from the calling task context) the thread index, identiying the task in a given vspace.
    69 No error possible.
    70 
    71  === 4) void '''giet_exit'''( char* string ) ===
    72 This function stops execution of the calling task with a TTY0 message explaining the cause.
    73 The user task is descheduled and becomes not runable: it does not consume processor cycles anymore.
     64 === 4) int '''giet_thread_kill'''( pthread_id trdid , int signal ) ===
     65This function deactivates the thread identified by the ''trdid'' argument when the ''signal'' argument is non zero.
     66If the ''signal'' argument is zero, the thread existence is checked, but it is not deactivated.
     67 * trdid : unique thread identifier in vspace.
     68 * signal : deactivation if non zero.
     69Return 0 if success.
     70Return -1 if no matching thread.
    7471
    7572 === 5) void '''giet_assert'''( unsigned int condition, char* string ) ===
    7673This function stops execution of the calling with a TTY0 message if the condition is false.
     74No error possible.
    7775
    7876 === 6) void '''giet_context_switch'''() ===
    79 The user task calling this function is descheduled and the processor is allocated to another task. ===
    80 
     77The thread calling this function is descheduled and the processor is allocated to another thread.
     78No error possible.
    8179
    8280 == __Application related system calls__ ==