GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > PBS / V2-10-6

Constituent: pbs     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

WUT.c.px-xxx-xxx File Reference

WakeUp Timer facility. More...

#include <errno.h>
#include <stdio.h>
#include <sys/time.h>
#include "PBS/BUG.h"
#include "PBS/TASK.h"
#include "PBS/TASK.ih"
#include "TASK_pvtdefs.h"
#include "impl/TOV_pvtdefs.h.px-xxx-xxx"
#include "PBI/Alias.h"

Include dependency graph for WUT.c.px-xxx-xxx:

Include dependency graph

Data Structures

struct  _WCB
 WakeUp Control Block. More...

struct  _WCB_qlt
 WakeUp Control Block Que Locking and Timeout Control. More...

struct  _WCB_specific
 The platform specific piece of the WUT control structure. More...


Defines

#define WUT_K_TASK_PRIORITY   TASK_K_PRIORITY_LIMITS_MAX - 2
 Priority of the WUT handler task.


Typedefs

typedef _WCB_qlt WCB_qlt
 Typedef for struct _WCB_qlt.

typedef _WCB_specific WCB_specific
 Typedef for struct _WCB_specific.


Functions

__inline void wut_period_set (unsigned int period)
 Noop on host systems.

STATIC void WUT_sys_handler (WCB *wcb)
 The timer interrupt/task handler.

STATIC int cmp_lt_tov (TOV tov_a, TOV tov_b)
 Platform implementation dependent routine to compare to timeout values.

STATIC int lock_que (WCB *wcb)
 Platform implementation dependent routine to lock the WUT timer que.

STATIC void unlock_que (WCB *wcb, int key)
 Platform implementation dependent routine to unlock the WUT timer que.

STATIC void arm_handler (WCB *wcb, TOV tov)
 Seeds the timer interrupt to handle expire a tov.

STATIC void arm_handler_nxt_wut (WCB *wcb, const WUT_tmr *wut)
 Seeds the timer interrupt to handle expire at the timeout associated with the specified WUT timer entry.

STATIC void wut_sys_kill (void *prm, WUT_tmr *wut)
 Kills off the WUT task handler.

STATIC int wut_sys_connect (WCB *wcb)
 Platform dependent part of the WUT system connection process.

STATIC int wut_sys_shutdown (WCB *wcb)
 Platform dependent shutdown of the WUT system.

WUT_cb_status WUT_keepalive_rtn (WUT_keepalive_ctx *keepalive, WUT_tmr *wut)
 Simple WUT timer callback routine used to drive the VxWorks system clock.

int WUT_dec_get ()
 Gets the current time left till the next timer expiration.


Variables

WCB Wcb
 Statically allocate control block as a facilty private structure.


Detailed Description

WakeUp Timer facility.

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id: WUT.c.px-xxx-xxx,v 1.10 2005/10/01 01:00:14 russell Exp $
  

The POSIX implementation of the WakeUp Timers (WUT) facility.


Typedef Documentation

WCB_qlt
 

Typedef for struct _WCB_qlt.

This structure contains all the control variables for the WakeUp Timer facility used to control the locking timeouts. It is a private platform dependent structure.


Function Documentation

STATIC void arm_handler WCB wcb,
TOV  tov
[inline]
 

Seeds the timer interrupt to handle expire a tov.

Parameters:
wcb The WUT control block
tov The expiration timeout value

Here is the call graph for this function:

STATIC void arm_handler_nxt_wut WCB wcb,
const WUT_tmr wut
[inline]
 

Seeds the timer interrupt to handle expire at the timeout associated with the specified WUT timer entry.

Parameters:
wcb The WUT control block
wut The WUT timer entry.

Here is the call graph for this function:

STATIC int cmp_lt_tov TOV  tov_a,
TOV  tov_b
[inline]
 

Platform implementation dependent routine to compare to timeout values.

Parameters:
tov_a The first of the two timeout values to compare
tov_b The second of the two timeout values to compare
Returns:
non-zero if tov_a < tov_b, else 0

STATIC int lock_que WCB wcb  )  [inline]
 

Platform implementation dependent routine to lock the WUT timer que.

Parameters:
wcb Pointer to the WUT control block
Returns:
A key to be used to unlock the que.

Here is the call graph for this function:

STATIC void unlock_que WCB wcb,
int  key
[inline]
 

Platform implementation dependent routine to unlock the WUT timer que.

Parameters:
wcb Pointer to the WUT control block
key The key used to unlock the que (returned from lock_que()

Here is the call graph for this function:

int WUT_dec_get void   ) 
 

Gets the current time left till the next timer expiration.

This primarily used as a debugging aid.

WUT_cb_status WUT_keepalive_rtn WUT_keepalive_ctx keepalive,
WUT_tmr wut
 

Simple WUT timer callback routine used to drive the VxWorks system clock.

Parameters:
keepalive The keepalive control structure.
wut The WUT timer entry
Return values:
WUT_K_STATE_CHANGE_YES 
VXWORKS Implementation Note
On the PowerPC platform, this routine is used to keep the decrement counter within its limited range, ensuring that no timer entry attempts to seed it with a value beyond it's limits. It is also used to update the VxWork's system clock by calling tickAnnounce().
Return Value
The return value reflects the fact the timer entries state has been changed by the callback routine (its been restarted).

Here is the call graph for this function:

static __inline void wut_period_set unsigned int  period  )  [static]
 

Noop on host systems.

Parameters:
period Ignored

STATIC int wut_sys_connect WCB wcb  ) 
 

Platform dependent part of the WUT system connection process.

Parameters:
wcb The WUT control block
Returns:
Status

Here is the call graph for this function:

STATIC void WUT_sys_handler WCB wcb  ) 
 

The timer interrupt/task handler.

Parameters:
wcb The WUT control block
Warning:
This is not a user callable routine

Here is the call graph for this function:

void wut_sys_kill void *  prm,
WUT_tmr wut
 

Kills off the WUT task handler.

Returns:
Doesn't
Parameters:
prm Unused
wut The wut timer used to stop the task

Here is the call graph for this function:

STATIC int wut_sys_shutdown WCB wcb  ) 
 

Platform dependent shutdown of the WUT system.

Parameters:
wcb The WUT control block
Returns:
Status

Here is the call graph for this function:


Generated on Fri Sep 30 22:54:41 2005 by doxygen 1.3.3