82 | | === 7) int '''giet_pthread_pause'''( char* vspace , char* thread ) === |
83 | | This function is an extension to the POSIX standard. It deactivates the thread identified by the <vspace> and <thread> arguments. The target thread goes to the ''blocked'' state at the next context switch, and will not be scheduled until the thread is reactivated by the giet_pthread_resume() function. The thread context (including the resources dynamically allocated to the thread) is not modified. |
| 83 | === 7) void '''giet_pthread_control'''( unsigned int command , char* vspace , char* thread ) === |
| 84 | This 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 | | Return 0 if success. |
87 | | Return -1 if vspace name not found. |
88 | | Return -2 if thread name not found. |
89 | | |
90 | | === 8) int '''giet_pthread_resume'''( char* vspace , char* thread ) === |
91 | | This function is an extension to the POSIX standard. It reactivates a thread identified by the <vspace> and <thread> arguments, that was descheduled by the giet_pthread_pause() function. The target thread goes to the ''runable'' state, and can be rescheduled at the next context switch to resume execution. |
92 | | * '''vspace''' : vspace name. |
93 | | * '''thread''' : thread name in mapping. |
94 | | Return 0 if success. |
95 | | Return -1 if vspace name not found. |
96 | | Return -2 if thread name not found. |
| 88 | The supported command types are: |
| 89 | * '''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. |
| 90 | * '''THREAD_CMD_RESUME''' : The target thread is reactivated. It goes immediately to the ''runable'' state, and can be rescheduled at the next context switch to resume execution. |
| 91 | * '''THREAD_CMD_CONTEXT''' : Display the context of the target thread on the TTY allocated to the calling thread. |