#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/ipc.h> #include <sys/sem.h> int init (int key, int what); void P (int s, pid_t pid); void V (int s, pid_t pid); int sem_val (int s); int sem_ile (int s);