Sun Java System Web Proxy Server 4.0.11 NSAPI Developer's Guide

sem_grab

The sem_grab function requests exclusive access to a specified semaphore. If exclusive access is unavailable, the caller blocks execution until exclusive access becomes available. Use this function to ensure that only one server processor thread performs an action at a time.

Syntax

#include <base/sem.h>
int sem_grab(SEMAPHORE id);

Returns

Parameters

SEMAPHORE id is the unique identification number of the requested semaphore.

See Also

sem_init, sem_release, sem_terminate, sem_tgrab