Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

semaphores.c File Reference

Wrappers around the sem* functions. More...

#include "config.h"
#include "defines.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/sem.h>
#include <unistd.h>
#include <errno.h>
#include "semaphores.h"

Go to the source code of this file.

Functions

int cf_sem_pv (int id, int operation, int semnum)
 This function performs semaphore operations.

int cf_sem_getval (int id, int semnum, int num, unsigned short *val)


Detailed Description

Wrappers around the sem* functions.

Author:
Christian Kruse, <cjk@wwwtech.de>
This module provides some wrapper functions for the semaphore functions provided by POSIX. These functions make the handling of semaphores much easier

Definition in file semaphores.c.


Function Documentation

int cf_sem_getval int  id,
int  semnum,
int  num,
unsigned short *  val
 

This function returns the value of the selected semaphore

Parameters:
id The semaphore ide
semnum The semaphore index in the set
num The number of semaphores in the set
val Reference to a integer variable where to store the value
Returns:
0 on success, -1 on failure

Definition at line 55 of file semaphores.c.

int cf_sem_pv int  id,
int  operation,
int  semnum
 

This function performs semaphore operations.

Parameters:
id The semaphore id
operation The size to increase or decrease the value of the semaphore.
semnum The index of the semaphore in the set.
Returns:
0 on success, -1 on failure

Definition at line 46 of file semaphores.c.


Generated on Sun Apr 25 16:37:39 2004 for Classic Forum by doxygen 1.3.5