GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> PBS / dev > pbs / rad750


Interface   Data Structures   File List   Data Fields   Globals  

RW_tmr.ih.vx-xxx-xxx File Reference

Defines the VxWorks platform dependent inline Resource Wait timer (RW_tmr) routines. More...

#include <types/vxArch.h>
#include <semLib.h>
#include <PBS/RW.h>
#include <PBS/INT.ih>
#include <RW_tmr.h>

Defines

#define RW_TMR_PINIT(rw_tmr)   rw_tmr->wut.state = WUT_K_ALLOCATED;
 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.


Detailed Description

Defines the VxWorks platform dependent inline Resource Wait timer (RW_tmr) routines.

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id: RW_tmr.ih.vx-xxx-xxx,v 1.5 2011/08/06 01:27:44 russell Exp $
  

Define Documentation

#define RW_TMR_PINIT ( rw_tmr   )     rw_tmr->wut.state = WUT_K_ALLOCATED;

Initializes the platform specific piece of the RW_tmr structure.

Parameters:
rw_tmr Pointer to the RW_tmr structure to initialize

Referenced by RW__tmr_init().


Function Documentation

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.

Parameters:
tmr The RW timer handle
state The current state
Returns:
The updated state.
Warning:
Failure to call this routine if a timer is still on the WUT que is fatal.

References RW_M_TIMEDOUT, RW_M_TMRSTARTED, _RW_tmr::wut, and WUT_cancel().

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.

Parameters:
tmr The Resource Wait Timer to initialize

Referenced by rng_allocate().

RW_state RW__tmr_lock ( RW_tmr tmr,
RW_state  state 
)

Locks the resource.

Parameters:
tmr The RW timer handle
state The current RW state
Returns:
The update RW state.

References INT__lock().

Referenced by rng__wait(), and RW_getW_toc().

RW_state RW__tmr_unlock ( RW_tmr tmr,
RW_state  state 
)

Unlocks the resource.

Parameters:
tmr The RW timer handle
state The current RW state
Returns:
The update RW state.

References INT__unlock(), and RW_M_KEY.

Referenced by rng__wait(), RW__tmr_wait(), and RW_getW_toc().

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.

Parameters:
tmr A previously initialized timer resource handle
state The current RW state
Returns:
The updated RW state.

References _RW_waitctl_u::bf, INT__lock(), _RW_tmr::rw, RW__tmr_unlock(), RW_M_ERROR, RW_M_TIMEDOUT, RW_M_TMRSTARTED, RW_M_TOVCOMPUTE, RW_M_TRYAGAIN, rw_tmr_handler(), _RW_ctl::semaphore, _RW_tmr::toc, TOC__compute(), TOV_K_FOREVER, TOV_K_NOWAIT, _RW_ctl::waiting, _RW_tmr::wut, WUT_K_EXPIRED, WUT_start(), and WUT_state_get().

Referenced by rng__wait(), and RW_getW_toc().


Generated on Fri Aug 5 18:41:07 2011 by  doxygen 1.5.8