Définitions des types | |
| typedef void *(* | PhilRunnable )(void *) |
| Le type d'une procédure exécutable par un thread. | |
| typedef PhilThreadDesc * | PhilThread |
| L'identité d'un thread est un pointeur sur son descripteur. | |
Fonctions | |
| PhilThread | PhilThreadCreate (int type, int priority, int stacksize, PhilRunnable start_routine, void *arg) |
| Création d'un thread. | |
| int | PhilThreadJoin (PhilThread th, void **return_val) |
| Joindre un thread. | |
| void | PhilThreadExit (void *return_val) |
| Terminer le thread courant. | |
| PhilThread | PhilThreadCurrent () |
| Obtenir l'identité du thread courant. | |
| void | PhilThreadYield () |
| Passer la main à un autre thread. | |
|
||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
Le passage de main ne peut se faire qu'au sein de threads de même priorité ou de priorités supérieures au thread courant. |
1.2.17