GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > PBS / V2-10-8
Constituent: pbs     Tag: linux-gcc
#include "PBS/TOC_comdefs.h"
#include "PBS/RW_comdefs.h"
Include dependency graph for RW_protos.h:
This graph shows which files directly or indirectly include this file:
Functions | |
int | RW_disable (RW_ctl *rw) |
Disables wakeup calls. | |
int | RW_enable (RW_ctl *rw) |
Enables wakeup calls. | |
int | RW_enabled (const RW_ctl *rw) |
Returns the state of the enabled flag. | |
int | RW_init (RW_ctl *rw, RW_type type) |
Initializes the RW control structure. | |
int | RW_destroy (RW_ctl *rw) |
Destroys the data structures associate with an RW handle. | |
RW_key | RW_lock (RW_ctl *rw) |
Locks a resource so it can be manipulated in an interlocked fashion. | |
RW_keys | RW_lock2 (RW_ctl *rw_0, RW_ctl *rw_1) |
Locks two resource so they can be manipulated in an interlocked fashion. | |
int | RW_unlock (RW_ctl *rw, RW_key key) |
This routine unlocks a previously locked resource. | |
int | RW_unlock2 (RW_ctl *rw_0, RW_ctl *rw_1, RW_keys keys) |
This routine unlocks a previously locked resource. | |
RW_key | RW_wait (RW_ctl *rw, RW_key key) |
Blocks a task/thread until there is a reasonable chance that a resource is available. | |
RW_key | RW_wake (RW_ctl *rw, RW_key key) |
This provides the signaling mechanism to wake up a thread of code which is waiting for a resource. | |
int | RW_free (RW_ctl *rw, RW_free_cb free, void *ctx, void *resource, void *amount) |
Frees a resource, potentially waking up a task pending on an RW_get(). | |
void * | RW_get (RW_ctl *rw, RW_get_cb get, void *ctx, void *amount) |
Attempts to allocate a resource using the provided get routine. Whether the resource is available or not, this routine returns immediately with the return value of the get routine. See RW_getW() and RW_getW_toc() for versions that implement waiting. If the resource is disabled, the routine returns NULL. | |
void * | RW_getW (RW_ctl *rw, RW_get_cb get, void *ctx, void *amount) |
Attempts to allocate a resource using the provided get routine. This routine blocks until the get routine returns a non-NULL value. If nowaiting is desired, see RW_get(). If a waiting with a timeout is desired, see RW_getW_toc(). | |
void * | RW_getW_toc (RW_ctl *rw, RW_get_cb get, void *ctx, void *amount, const TOC *toc) |
Attempts to allocate a resource using the provided get routine. This routine blocks until the get routine returns a non-NULL value or until the timeout period expires. If nowaiting is desired, see RW_get(). If a waiting with no timeout is desired, see RW_getW_toc(). | |
RW_state | RW_tmr_init (RW_tmr *tmr, RW_ctl *rw, const TOC *toc) |
Initializes a Resource Wait timer based on the toc. If TOC is TOC_NOWAIT or TOV_FOREVER, no timer is initialized. | |
RW_state | RW_tmr_lock (RW_tmr *tmr, RW_state state) |
Locks the resource. | |
RW_state | RW_tmr_wait (RW_tmr *tmr, RW_state state) |
Waits until the timer expires or another task calls RW__tmr_wake indicating that another attempt be made to allocate the resource. | |
RW_state | RW_tmr_unlock (RW_tmr *tmr, RW_state state) |
Unlocks the resource. | |
RW_state | RW_tmr_destroy (RW_tmr *tmr, RW_state state) |
Destroys the tmr RW handle. This should be called before exiting the routine doing the allocation, since it will cleanup any outstanding timers among other things. |
CVS $Id: RW_protos.h,v 1.3 2004/10/20 14:36:52 russell Exp $
|
Destroys the data structures associate with an RW handle.
|
|
Disables wakeup calls.
|
|
Enables wakeup calls.
|
|
Returns the state of the enabled flag.
|
|
Frees a resource, potentially waking up a task pending on an RW_get().
(*free)(void *ctx, void *resource, void *amount); where typically ctx provides context to the free routine, the resource is a pointer to the resource being freed, and amount is the amount of the resource being freed.
|
|
Attempts to allocate a resource using the provided get routine. Whether the resource is available or not, this routine returns immediately with the return value of the get routine. See RW_getW() and RW_getW_toc() for versions that implement waiting. If the resource is disabled, the routine returns NULL.
void *resource = (*get)(void *ctx, void *amount);
While the names of the two parameters to the get routine are suggestive, they are, in fact, just two void *'s, so the get routine may make any use of them it pleases. |
|
Attempts to allocate a resource using the provided get routine. This routine blocks until the get routine returns a non-NULL value. If nowaiting is desired, see RW_get(). If a waiting with a timeout is desired, see RW_getW_toc().
void *resource = (*get)(void *ctx, void *amount);
While the names of the two parameters to the get routine are suggestive, they are, in fact, just two void *'s, so the get routine may make any use of them it pleases. |
|
Attempts to allocate a resource using the provided get routine. This routine blocks until the get routine returns a non-NULL value or until the timeout period expires. If nowaiting is desired, see RW_get(). If a waiting with no timeout is desired, see RW_getW_toc().
void *resource = (*get)(void *ctx, void *amount);
While the names of the two parameters to the get routine are suggestive, they are, in fact, just two void *'s, so the get routine may make any use of them it pleases.
|
|
Initializes the RW control structure.
|
|
Locks a resource so it can be manipulated in an interlocked fashion.
|
|
Locks two resource so they can be manipulated in an interlocked fashion.
|
|
Destroys the tmr RW handle. This should be called before exiting the routine doing the allocation, since it will cleanup any outstanding timers among other things.
|
|
Initializes a Resource Wait timer based on the toc. If TOC is TOC_NOWAIT or TOV_FOREVER, no timer is initialized.
|
|
Locks the resource.
|
|
Unlocks the resource.
|
|
Waits until the timer expires or another task calls RW__tmr_wake indicating that another attempt be made to allocate the resource.
|
|
This routine unlocks a previously locked resource.
|
|
This routine unlocks a previously locked resource.
|
|
Blocks a task/thread until there is a reasonable chance that a resource is available.
|
|
This provides the signaling mechanism to wake up a thread of code which is waiting for a resource.
|