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


Interface   Data Structures   File List   Data Fields   Globals  

RW.ih.vx-xxx-xxx File Reference

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

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

Functions

RW__EXP_FNC RW_key RW__lock (RW_ctl *rw)
 Locks a resource so it can be manipulated in an interlocked fashion.
RW__EXP_FNC RW_keys RW__lock2 (RW_ctl *rw_0, RW_ctl *rw_1)
 Locks two resource so they can be manipulated in an interlocked fashion.
RW__EXP_FNC int RW__unlock (RW_ctl *rw, RW_key key)
 This routine unlocks a previously locked resource.
RW__EXP_FNC int RW__unlock2 (RW_ctl *rw_0, RW_ctl *rw_1, RW_keys keys)
 This routine unlocks a previously locked resource.
RW__EXP_FNC 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__EXP_FNC int 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.


Detailed Description

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

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: RW.ih.vx-xxx-xxx,v 1.4 2011/03/24 23:05:45 apw Exp $

Function Documentation

RW__EXP_FNC RW_key RW__lock ( RW_ctl rw  ) 

Locks a resource so it can be manipulated in an interlocked fashion.

Returns:
A key to be passed to the RW__unlock routine.
Parameters:
rw The RW handle

References INT__lock().

Referenced by FORK_disable(), FORK_enable(), FPA_free(), FPA_get(), LI__insert(), LI__jam(), LI__remove(), PL__insert(), PL__jam(), PL__remove(), PL__wake(), QI__insert(), QI__jam(), QI__remove(), RNG_free(), RW__disable(), RW__enable(), RW_free(), RW_get(), and RW_getW().

RW__EXP_FNC RW_keys RW__lock2 ( RW_ctl rw_0,
RW_ctl rw_1 
)

Locks two resource so they can be manipulated in an interlocked fashion.

Returns:
A set of keys to be passed to the RW__unlock2 routine
Parameters:
rw_0 The RW handle of the first resource to be locked
rw_1 The RW handle of the second resource to be locked

References INT__lock().

Referenced by LI__append(), LI__prepend(), QI__append(), and QI__prepend().

RW__EXP_FNC int RW__unlock ( RW_ctl rw,
RW_key  key 
)

This routine unlocks a previously locked resource.

Parameters:
rw The RW handle
key The key used to lock the resource, returned from RW__lock

References INT__unlock().

Referenced by FORK_disable(), FORK_enable(), FPA_free(), FPA_get(), LI__insert(), LI__jam(), LI__remove(), PL__insert(), PL__jam(), PL__remove(), PL__wake(), QI__insert(), QI__jam(), QI__remove(), RNG_free(), RW__disable(), RW__enable(), RW_free(), and RW_getW().

RW__EXP_FNC int RW__unlock2 ( RW_ctl rw_0,
RW_ctl rw_1,
RW_keys  keys 
)

This routine unlocks a previously locked resource.

Parameters:
rw_0 The RW handle of the first resource to be unlocked
rw_1 The RW handle of the second resource to be unlocked
keys The keys used to lock the resources, returned from RW_lock2

References INT__unlock().

Referenced by LI__append(), LI__prepend(), QI__append(), and QI__prepend().

RW__EXP_FNC 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.

Parameters:
rw The RW handle
key The key used to unlock the interrupts
Returns:
Status

References _RW_waitctl_u::bf, INT__lock(), INT__unlock(), _RW_ctl::semaphore, and _RW_ctl::waiting.

Referenced by RW_getW().

RW__EXP_FNC int 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.

Parameters:
rw The RW handle
key The key used to unlock the resource.
Return values:
Status This routine checks if any thread is waiting for a resource, and if so wakes that thread. The resource should be locked on entry to this routine. This routine always exits with the resource still locked.

References _RW_waitctl_u::bf, _RW_ctl::semaphore, _RW_waitctl_u::si, and _RW_ctl::waiting.

Referenced by FPA_free(), LI__insert(), LI__jam(), PL__insert(), PL__jam(), PL__wake(), QI__insert(), QI__jam(), RNG_free(), RW__enable(), and RW_free().


Generated on Fri Aug 5 18:37:54 2011 by  doxygen 1.5.8