Changes between Version 106 and Version 107 of processus_thread
- Timestamp:
- Aug 22, 2018, 6:08:12 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
processus_thread
v106 v107 144 144 === 5.2) Thread running in ATTACHED mode === 145 145 146 The thread destruction is more complex if the target thread T is running in ATTACHED mode, because another joining thread J, executing the ''pthread_join()'' system call, must be informed of the termination of thread T. As the ''thread_kill()'' function (executed by the killer thread K) and the ''sys_thread_join()'' (executed by the joining thread J) can be executed in any order, this requires a "rendez-vous": The first arrived thread blocks and deschedules. It will be unblocked by the other thread.146 The thread destruction is more complex if the target thread T is running in ATTACHED mode, because another joining thread J, executing the [https://www-soc.lip6.fr/trac/almos-mkh/browser/trunk/kernel/syscalls/sys_thread_join.c pthread_join()] syscall, must be informed of the termination of thread T. As the ''thread_delete()'' function (executed by the killer thread K) and the ''sys_thread_join()'' (executed by the joining thread J) can be executed in any order, this requires a "rendez-vous": The first arrived thread blocks and deschedules. It will be unblocked by the other thread. 147 147 148 148 This destruction mechanism can involve three threads: the target thread T, the killer thread K, and the joining thread J: