Changes between Version 105 and Version 106 of library_stdio
- Timestamp:
- Sep 15, 2015, 11:14:29 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
library_stdio
v105 v106 6 6 7 7 All these functions use a ''syscall'' instruction to enter the system. 8 In case of system callfailure (illegal arguments), the calling thread8 For most system calls, in case of failure (illegal arguments), the calling thread 9 9 is killed with a ''giet_pthread_exit()''. 10 11 Therefore, for most of these system calls, there is no return value.12 10 13 11 == __Processor related system calls__ == … … 52 50 This function desactivates the calling thread. 53 51 The '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 ) === 52 No error possible. 53 54 === 3) int '''giet_pthread_join'''( pthread_t trdid , void** ptr ) === 56 55 This blocking function can be used to detect completion of a thread activated by a giet_pthread_create(). 57 56 It returns only when the thread identified by the ''traded'' argument is desactivated. … … 63 62 Return -2 if ptr not NULL 64 63 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 ) === 65 This function deactivates the thread identified by the ''trdid'' argument when the ''signal'' argument is non zero. 66 If 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. 69 Return 0 if success. 70 Return -1 if no matching thread. 74 71 75 72 === 5) void '''giet_assert'''( unsigned int condition, char* string ) === 76 73 This function stops execution of the calling with a TTY0 message if the condition is false. 74 No error possible. 77 75 78 76 === 6) void '''giet_context_switch'''() === 79 The user task calling this function is descheduled and the processor is allocated to another task. ===80 77 The thread calling this function is descheduled and the processor is allocated to another thread. 78 No error possible. 81 79 82 80 == __Application related system calls__ ==