Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
#include <stdio.h>
#include <stdlib.h>
-void sigintP()
+static void sigintP()
{
printf("pid=%d\n", getpid());
signal(SIGINT, sigintP);
}
-void sigalrm()
+static void sigalrm()
{
exit(1);
}
-void sigintF()
+static void sigintF()
{
signal(SIGINT, SIG_IGN);
signal(SIGALRM, sigalrm);
alarm(5);
}
-void sigchld()
+static void sigchld()
{
int status;
wait(&status);
sem_t mutex;
sem_t semPhil[N];
-void test(int i)
+static void test(int i)
{
if (phiState[i] == faim && phiState[G] != manger
&& phiState[D] != manger) {
}
}
-void *philosophe(void *num)
+static void *philosophe(void *num)
{
int i = *(int *)num, nb = 2;
while (nb) {
sem_t mutex;
-void *philosophe(void *num)
+static void *philosophe(void *num)
{
int i = *(int *)num, nb = 2;
while (nb) {