GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> PBS / dev > pbs / rhel6-64
#include <pthread.h>
#include <errno.h>
Defines | |
#define | RW_TMR_PINIT(rw_tmr) |
Initializes the platform specific piece of the RW_tmr structure. | |
Functions | |
void | RW__tmr_dummy (RW_tmr *tmr) |
Dummy initialization call. This is really only needed on rhel6 platforms. | |
RW__EXP_FNC RW_state | RW__tmr_lock (RW_tmr *tmr, RW_state state) |
Locks the resource. | |
RW__EXP_FNC 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__EXP_FNC RW_state | RW__tmr_unlock (RW_tmr *tmr, RW_state state) |
Unlocks the resource. | |
RW__EXP_FNC 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_tmr.ih.px-xxx-xxx,v 1.5 2011/08/06 01:27:44 russell Exp $
#define RW_TMR_PINIT | ( | rw_tmr | ) |
Value:
rw_tmr->tov = 0; \ rw_tmr->toc = TOC_NOWAIT
rw_tmr | Pointer to the RW_tmr structure to initialize |
Referenced by RW__tmr_dummy(), and RW__tmr_init().
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.
tmr | The RW timer handle | |
state | The current state |
Referenced by rng_allocate(), and RW_getW_toc().
void RW__tmr_dummy | ( | RW_tmr * | tmr | ) |
Dummy initialization call. This is really only needed on rhel6 platforms.
tmr | The Resource Wait Timer to initialize |
References _RW_tmr::rw, and RW_TMR_PINIT.
Referenced by rng_allocate().
Locks the resource.
tmr | The RW timer handle | |
state | The current RW state |
References _RW_ctl::mutex, and _RW_tmr::rw.
Referenced by rng__wait(), and RW_getW_toc().
Unlocks the resource.
tmr | The RW timer handle | |
state | The current RW state |
References _RW_ctl::mutex, and _RW_tmr::rw.
Referenced by rng__wait(), and RW_getW_toc().
Waits until the timer expires or another task calls RW__tmr_wake indicating that another attempt be made to allocate the resource.
tmr | A previously initialized timer resource handle | |
state | The current RW state |
References _RW_waitctl_u::bf, _RW_ctl::cond, _RW_ctl::mutex, _RW_tmr::rw, RW_M_ERROR, RW_M_INCWAITING, RW_M_TIMEDOUT, RW_M_TMRSTART, RW_M_TOVCOMPUTE, RW_M_TRYAGAIN, _RW_tmr::toc, TOC_compute(), _RW_tmr::tov, TOV_K_FOREVER, TOV_K_NOWAIT, and _RW_ctl::waiting.
Referenced by rng__wait(), and RW_getW_toc().