GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> PBS / V2-12-1 > pbs / sun-gcc
#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>
Classes | |
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... | |
struct | _WCB |
WakeUp Control Block. More... | |
Defines | |
#define | WUT_K_TASK_PRIORITY TASK_K_PRIORITY_LIMITS_MAX - 2 |
Priority of the WUT handler task. | |
Typedefs | |
typedef struct _WCB_qlt | WCB_qlt |
Typedef for struct _WCB_qlt. | |
typedef struct _WCB_specific | WCB_specific |
Typedef for struct _WCB_specific. | |
Functions | |
static __inline void | wut_period_set (unsigned int period) |
Noop on host systems. | |
STATIC void | wut_spc_init (WCB *wcb) |
Initializes the processor specific portion of the control block. | |
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. |
CVS $Id: WUT.c.px-xxx-xxx,v 1.13 2011/03/24 23:05:47 apw Exp $
The POSIX implementation of the WakeUp Timers (WUT) facility.
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.
Seeds the timer interrupt to handle expire a tov.
wcb | The WUT control block | |
tov | The expiration timeout value |
References BUG_check(), _WCB_qlt::cv, _WCB_specific::qlt, and _WCB::spc.
Referenced by add_wut().
Seeds the timer interrupt to handle expire at the timeout associated with the specified WUT timer entry.
wcb | The WUT control block | |
wut | The WUT timer entry. |
References BUG_check(), _WCB_qlt::cv, _WCB_specific::qlt, and _WCB::spc.
Referenced by WUT_cancel().
Platform implementation dependent routine to compare to timeout values.
tov_a | The first of the two timeout values to compare | |
tov_b | The second of the two timeout values to compare |
References _TOV_u::tov, and _TOV_u::ts.
Referenced by add_wut(), find(), and WUT_sys_handler().
STATIC int lock_que | ( | WCB * | wcb | ) | [inline] |
Platform implementation dependent routine to lock the WUT timer que.
wcb | Pointer to the WUT control block |
References BUG_check(), _WCB_qlt::mutex, _WCB_specific::qlt, and _WCB::spc.
Referenced by add_wut(), WUT_cancel(), and wut_sys_kill().
STATIC void unlock_que | ( | WCB * | wcb, | |
int | key | |||
) | [inline] |
Platform implementation dependent routine to unlock the WUT timer que.
wcb | Pointer to the WUT control block | |
key | The key used to unlock the que (returned from lock_que() |
References BUG_check(), _WCB_qlt::mutex, _WCB_specific::qlt, and _WCB::spc.
Referenced by add_wut(), WUT_cancel(), and wut_sys_kill().
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.
keepalive | The keepalive control structure. | |
wut | The WUT timer entry |
WUT_K_STATE_CHANGE_YES |
References _WUT_keepalive_ctx::period, remove_key(), _WUT_tmr::tov, TOV_add_nsecx(), WUT_K_STATE_CHANGE_YES, and WUT_restart().
Referenced by WUT_sys_connect(), and WUT_sys_reset().
static __inline void wut_period_set | ( | unsigned int | period | ) | [static] |
STATIC void wut_spc_init | ( | WCB * | wcb | ) |
Initializes the processor specific portion of the control block.
wcb | The WUT control block |
Referenced by WUT_sys_init().
STATIC int wut_sys_connect | ( | WCB * | wcb | ) |
Platform dependent part of the WUT system connection process.
wcb | The WUT control block |
References _WCB_qlt::cv, _WCB_qlt::mutex, _WCB_specific::qlt, _WCB::spc, TASK_attr_init(), TASK_attr_priority_set(), TASK_spawn(), _WCB_specific::tcb, WUT_K_TASK_PRIORITY, and WUT_sys_handler().
Referenced by WUT_sys_connect().
STATIC void WUT_sys_handler | ( | WCB * | wcb | ) |
The timer interrupt/task handler.
wcb | The WUT control block |
References add_key(), BUG_check(), _WUT_tmr::cb, cmp_lt_tov(), _WCB::com, _WCB_qlt::cv, _Q_node::flnk, get_wut(), _WCB_qlt::mutex, _WUT_tmr::node, _Q_head::node, _WUT_tmr::prm, Q__unlink(), _WCB_specific::qlt, _WCB_common::que, _WCB::spc, _WUT_tmr::state, _WUT_tmr::tov, _TOV_u::tov, _TOV_u::ts, WUT_K_ACTIVE, WUT_K_CANCELLED, WUT_K_EXPIRED, WUT_K_QUEUED, and WUT_K_STATE_CHANGE_NO.
Referenced by wut_sys_connect().
void wut_sys_kill | ( | void * | prm, | |
WUT_tmr * | wut | |||
) |
Kills off the WUT task handler.
prm | Unused | |
wut | The wut timer used to stop the task |
References BUG_check(), _WUT_tmr::cb, _WCB::com, _WCB_qlt::cv, get_wut(), _WCB_common::keepalive, lock_que(), _WCB_qlt::mutex, _WUT_tmr::prm, Q__remove(), _WCB_specific::qlt, _WCB_common::que, _WCB::spc, _WUT_tmr::state, TASK_exit(), _WCB_common::terminator, _WUT_keepalive::tmr, unlock_que(), WUT_K_ACTIVE, WUT_K_CANCELLED, and WUT_K_EXPIRED.
Referenced by wut_sys_shutdown().
STATIC int wut_sys_shutdown | ( | WCB * | wcb | ) |
Platform dependent shutdown of the WUT system.
wcb | The WUT control block |
References _WCB::spc, TASK_join(), _WCB_specific::tcb, TOV_from_nsecs(), WUT_INIT, WUT_start(), and wut_sys_kill().
Referenced by WUT_sys_shutdown().