My Project
Chargement...
Recherche...
Aucune correspondance
noyau
semaphore.c
Aller à la documentation de ce fichier.
1
/*----------------------------------------------------------------------------*/
2
/* Implantation des opérations de manipulation des sémaphores. */
3
/* */
4
/* (C) Manu Chaput 2000 */
5
/*----------------------------------------------------------------------------*/
6
#include <
manux/semaphore.h
>
7
8
#include <
manux/scheduler.h
>
/* Pour réordonner lors de l'attente */
9
10
void
semInit
(
Semaphore
* sem,
int
val)
11
{
12
sem->
valeur
= val;
13
initialiserListeTache
(&sem->
tachesEnAttente
);
14
}
15
16
void
semObtenir
(
Semaphore
* sem)
17
{
18
/* Tant que l'on n'a pas la main sur le sémaphore ou qu'aucune
19
* ressource n'est disponible, on rend la main */
20
21
/* OK, on est les seuls ici, on peut donc modifier en toute tranquilité */
22
}
23
24
void
semRelacher
(
Semaphore
* sem)
25
{
26
27
}
initialiserListeTache
void initialiserListeTache(ListeTache *listeTache)
Definition
listetaches.c:11
scheduler.h
semInit
void semInit(Semaphore *sem, int val)
Definition
semaphore.c:10
semObtenir
void semObtenir(Semaphore *sem)
Definition
semaphore.c:16
semRelacher
void semRelacher(Semaphore *sem)
Definition
semaphore.c:24
semaphore.h
_Semaphore
Definition
semaphore.h:16
_Semaphore::tachesEnAttente
ListeTache tachesEnAttente
Definition
semaphore.h:19
_Semaphore::valeur
int valeur
Definition
semaphore.h:17
Généré par
1.9.8