Software API for an easy use of the *nix IPC system. More...
#include "sr_communications/ipc/semaphores.h"
Go to the source code of this file.
Functions | |
int | createKey (key_t *semKey, char *semFile) |
int | freeSem (int semID) |
Frees a taken semaphore. | |
int | getSemID (key_t semKey, int *semID) |
Gets a semaphore identification. | |
int | rmSem (int semID) |
Removes a semaphore set. | |
int | waitSem (int semID) |
waits for a semaphore until its resources are free |
Software API for an easy use of the *nix IPC system.
This program is free software: you can redistribute it and/or modify it under the terms of the Licencia Educativa UC3M as published by the University Carlos III of Madrid, either version 1.0, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. See the Licencia Educativa UC3M version 1.0 or any later version for more details.
A copy of the Licencia Educativa UC3M is in the LICENSE file.
Definition in file semaphores.c.
int createKey | ( | key_t * | semKey, |
char * | semFile | ||
) |
Definition at line 30 of file semaphores.c.
int freeSem | ( | int | semID | ) |
Frees a taken semaphore.
semID | is the identifier of the semaphore |
Definition at line 102 of file semaphores.c.
int getSemID | ( | key_t | , |
int * | semID | ||
) |
Gets a semaphore identification.
semKey | |
semID | is where the semaphore identificator is stored |
Definition at line 50 of file semaphores.c.
int rmSem | ( | int | semID | ) |
Removes a semaphore set.
semID | an integer with semaphore identification. |
Definition at line 68 of file semaphores.c.
int waitSem | ( | int | semID | ) |
waits for a semaphore until its resources are free
semID | an integer which identifies the semaphore |
Definition at line 84 of file semaphores.c.