int semget (key_t key, int nsems, int semflg);
IPC_PRIVATE - private key value
IPC_CREAT - object with key can be created
IPC_EXCL - object with key must not exist
int semop (int semid, struct sembuf *sops, unsigned nsops); int semtimedop (int semid, struct sembuf *sops, unsigned nsops, struct timespec *timeout);
positive - add value to semaphore
zero - wait for zero value of semaphore
negative - subtract value from semaphore or wait
key_t ftok (const char *pathname, int proj_id);