Changes between Version 147 and Version 148 of library_stdio


Ignore:
Timestamp:
Mar 3, 2016, 1:24:29 PM (9 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • library_stdio

    v147 v148  
    3737This functions activates one thread that will execute the C function defined by the <function> argument.
    3838All thread activated by this system call must have been defined in the application mapping.
    39 The <attr> argument (pthread attributes) is not supported, and should be set to NULL: The stack size must be defined in the mapping, and the pthread is activated in ''attached'' mode. In the current implementation, the <arg> argument (argument to be passed to the function) is not supported, and should be set to NULL.
    40 The thread identifier stored in the <trdid> argument by the kernel is unique in a given space: It is actually build from the 4 following informations : [x,y,p,ltid] where x,y,p are the processor coordinates, and ltid is the thread index in the scheduler.   
    41  * '''trdid''' : pointer on a buffer that will contain the activated thread identifier.
    42  * '''attr''' :  not supported in the current implementation / must be set to NULL.
    43  * '''function''' : pointer on function
    44  * '''arg''' : not supported in the current implementation / must be set to NULL.
     39The <attr> argument (pthread attributes) is not supported, and should be set to NULL : The stack size must be defined in the mapping, and the pthread is activated in ''attached'' mode. The <arg> argument is a pointer on an user-defined structure containing the arguments to be passed to the called function. It can be set to NULL if the function has no arguments.
     40The thread identifier stored in the <trdid> argument by the kernel is unique in a given vspace: It is actually build from the 4 following informations : [x,y,p,ltid] where x,y,p are the processor coordinates, and ltid is the thread index in the scheduler.   
     41
    4542Return 0 if success.
    4643Return -1  if no matching thread.
    47 Return -2  if attr or arg not NULL.
     44Return -2  if attr not NULL.
    4845
    4946 === 2) void '''giet_pthread_exit'''( void* string ) ===
    50 This function send a KILL signal to the calling thread, that is immediately desactivated, and goes to the ''blocked'' state. All resources dynamically allocated to the thread, such as private peripheral channels are released. An user defined message is displayed on the kernel terminal TTY0.
    51  * '''string''': message on TTY0.
     47This function send a KILL signal to the calling thread, that is immediately desactivated, and goes to the ''blocked'' state. All resources dynamically allocated to the thread, such as private peripheral channels are released. The user defined <string> message is displayed on the kernel terminal TTY0.
    5248
    5349 === 3) int '''giet_pthread_join'''( pthread_t  trdid , void* ptr ) ===
     
    5551It returns only when the thread identified by the <trdid> argument is desactivated.
    5652The <ptr> argument is not supported, and should be set to NULL.
    57  * '''trdid''' : unique thread identifier in vspace.
    58  * '''ptr''' : not supported.
     53
    5954Return 0 if success.
    6055Return -1  if no matching thread.
     
    6560If the <signal> argument has a non zero value, the target thread will be deactivated at the next context switch.
    6661If the <signal> argument is zero, the thread existence is checked, but the KILL signal it is not sent.
    67  * '''trdid''' : thread identifier in vspace.
    68  * '''signal''' : deactivation if non zero.
     62
    6963Return 0 if success.
    7064Return -1 if no matching thread.
     
    7872This function is an extension to the POSIX standard. It send a KILL signal and deactivates immediately the calling thread (as does the giet_pthread_exit() function), with a  message on
    7973the kernel TTY0,  if the <condition> argument has a zero value. The message is defined by the <string> argument.
    80  * '''condition''' : thread exit if condition value is 0.
    81  * '''string''' : message displayed on TTY0.
    8274
    8375 === 7) void '''giet_pthread_control'''( unsigned int command , char* vspace , char* thread ) ===
    8476This function is an extension to the POSIX standard. It execute the command defined by the<command> argument for  the thread identified by the <vspace> and <thread> arguments.
    85  * '''command''' : command type.
    86  * '''vspace''' : vspace name.
    87  * '''thread''' : thread name in mapping.
     77 
    8878The supported command types are:
    8979 * '''THREAD_CMD_PAUSE''' : The target thread is deactivated. It goes immediately to the ''blocked'' state, and will not be scheduled until the thread is reactivated. The thread context (including the resources dynamically allocated to the thread) is not modified.