GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> PBS / dev > pbs / rhel5-32
#include <PBS/MBA.h>
#include <PBS/impl/PBS.h.px-xxx-xxx>
Classes | |
struct | _PBS_crashCtx |
Defines the application context parameters of a crash. More... | |
Defines | |
#define | PBS_CRASH_HANDLER_DEFAULT (PBS_crashHandler)(-1) |
Specifies to PBS_crashHandlerSet that the default crash handler is requested. | |
#define | PBS_V_CRASH_OPTION_VX_REBOOT 28 |
Starting bit of the VxWorks reboot field in the options. This is a 3 bit wide field passed directly to 'reboot'. | |
Typedefs | |
typedef struct _PBS_crashCtx | PBS_crashCtx |
Typedef for struct _PBS_crashCtx. | |
typedef int(* | PBS_crashHandler )(PBS_crashType type, const PBS_crashCtx *ctx, unsigned int options, const char *string) |
User callback routine to handle a crash. | |
typedef enum _PBS_crashOptions | PBS_crashOptions |
Typedef for. | |
Enumerations | |
enum | _PBS_crashOptions { PBS_M_CRASH_OPTION_CRASH_NO = (1<<31), PBS_M_CRASH_OPTION_VX_REBOOT_QUICK = (1<< 30), PBS_M_CRASH_OPTION_VX_REBOOT_CLEAR = (1<< 29), PBS_M_CRASH_OPTION_VX_REBOOT_NOAUTO = (1<< 28) } |
Enumerates those bits of the options argument that PBS uses. More... | |
Functions | |
void | PBS_fast_clear (void *ptr, unsigned int nbytes) |
Clears (Zeroes) the specified memory. | |
int | PBS_configure (void) |
One-time PBS library initialization routine via a configuration file. | |
int | PBS_initialize (int wut_tmr_cnt, int keepalive_period) |
One-time PBS library initialization routine. | |
int | PBS_initialize2 (int wut_tmr_cnt, int keepalive_period, MBA_create_cb mba_create, void *mba_prm) |
One-time PBS library initialization routine. | |
int | PBS_shutdown (void) |
Shuts down the PBS facility. | |
void | PBS_crash (PBS_crashType type, const PBS_crashCtx *ctx, unsigned int options, const char *string) |
General purposes reboot routine. | |
void | PBS_panic (unsigned int reason, unsigned int parameter, void *pc, unsigned int options, const char *string) |
Routine to initiate a panic reboot. | |
void | PBS_reboot (unsigned int reason, unsigned int parameter, void *pc, unsigned int options, const char *string) |
Routine to initiate a commanded reboot. | |
PBS_crashHandler | PBS_crashHandlerSet (PBS_crashHandler crashHandler) |
Installs a new user crash handler. | |
int | PBS_crashPrint (PBS_crashType type, const PBS_crashCtx *ctx, unsigned int options, const char *string) |
Very simple default PBS crash handler. |
CVS $Id: PBS.h,v 1.9 2011/03/24 23:05:42 apw Exp $
Typedef for struct _PBS_crashCtx.
This data structure contains the application specific context parameters of the crash. The intent is to provide enough information that the reason of the crash can be diagnosed.
This block is limited to 8 32-bit values and, if the OS supports it, is committed to the area of memory saved across boots.
unsigned int(* PBS_crashHandler)(PBS_crashType type, const PBS_crashCtx ctx, unsigned int options, const char *string) |
User callback routine to handle a crash.
type | The crash type, i.e. one of |
ctx | The crash context block | |
options | The crash options (OS dependent) | |
string | An arbitrary user string |
PBS_crashPrint () has been provided.
Typedef for.
PBS_panic and
PBS_reboot, is a series of bit flags shared between the PBS layer and the underlying OS reboot layer.
Some of the PBS options are generic, i.e. they have the same meaning on all platforms, while others only have meaning on certain platforms.
In the former category is
enum _PBS_crashOptions |
Enumerates those bits of the options argument that PBS uses.
int PBS_configure | ( | void | ) |
One-time PBS library initialization routine via a configuration file.
0,Success | ||
1,PBS | already initialized | |
-1,Error |
References PBS_initialize(), and PBS_initialize2().
void PBS_crash | ( | PBS_crashType | type, | |
const PBS_crashCtx * | ctx, | |||
unsigned int | options, | |||
const char * | string | |||
) |
General purposes reboot routine.
type | The type of reboot being requested, i.e. one of |
ctx | A filled in |
options | A set options. See |
string | An arbitrary user string. This is used iff there is an active PBS crash handler, in which case it is merely passed through to it. |
References PBS_LOCK.
PBS_crashHandler PBS_crashHandlerSet | ( | PBS_crashHandler | crashHandler | ) |
Installs a new user crash handler.
crashHandler | The new crash handler routine. If this may be NULL or PBS_CRASH_HANDLER_DEFAULT |
References PBS_CRASH_HANDLER_DEFAULT, and PBS_crashPrint().
Referenced by PBS_initialize2().
int PBS_crashPrint | ( | PBS_crashType | type, | |
const PBS_crashCtx * | ctx, | |||
unsigned int | options, | |||
const char * | string | |||
) |
Very simple default PBS crash handler.
type | The type of reboot being requested, i.e. one of |
ctx | Pointer to a completed PBS_crashCtx block. | |
options | A set options. See |
string | An arbitrary user string. It is just printed as the first line of the output. |
References _PBS_crashCtx::msr, _PBS_crashCtx::parameter, _PBS_crashCtx::pc, _PBS_crashCtx::reason, _PBS_crashCtx::sp, _PBS_crashCtx::tid, and _PBS_crashCtx::tim.
Referenced by PBS_crashHandlerSet().
void PBS_fast_clear | ( | void * | ptr, | |
unsigned int | nbytes | |||
) |
Clears (Zeroes) the specified memory.
ptr | Pointer to the memory to zero | |
nbytes | The number of bytes to zero |
int PBS_initialize | ( | int | wut_tmr_cnt, | |
int | keepalive_period | |||
) |
One-time PBS library initialization routine.
wut_tmr_cnt | The number of WUT timers to keep in the system pool. If specified as 0, a default value of 256 will be used. | |
keepalive_period | The period (in nanoseconds) of the periodic keepalive timer. If specified as 0, a default value of 20,000,000, corresponding to 50Hz will be used. |
References PBS_initialize2().
Referenced by PBS_configure().
int PBS_initialize2 | ( | int | wut_tmr_cnt, | |
int | keepalive_period, | |||
MBA_create_cb | mba_create, | |||
void * | mba_prm | |||
) |
One-time PBS library initialization routine.
wut_tmr_cnt | The number of WUT timers to keep in the system pool. If specified as 0, a default value of 256 will be used. | |
keepalive_period | The period (in nanoseconds) of the periodic keepalive timer. If specified as 0, a default value of 20,000,000, corresponding to 50Hz will be used. | |
mba_create | Alternate MBA partition creation routine. If specified as NULL, a default creation routine will be used and prm will be interpretted as a list of bad blocks, i.e. of type MBA_badBlockList. | |
mba_prm | Arbitrary parameter passed to the MBA partition creation routine. |
References MBA_initialize(), PBS_CRASH_HANDLER_DEFAULT, PBS_crashHandlerSet(), PbsInitialized, PTS_frequency(), PTS_GETS, PTS_initialize(), TASK_sys_init(), TAU_initialize, TBD_initialize(), WCT_K_NSECS_IN_A_SEC, WCT_set(), WUT_sys_connect(), and WUT_sys_init().
Referenced by PBS_configure(), and PBS_initialize().
void PBS_panic | ( | unsigned int | reason, | |
unsigned int | parameter, | |||
void * | pc, | |||
unsigned int | options, | |||
const char * | string | |||
) |
Routine to initiate a panic reboot.
reason | An application specific reason for the reboot. For example, this may identify the reason why the software is in a panic. | |
parameter | An additional opaque user application parameter | |
pc | The PC of where the reboot panic originated. Typically one would use PBS_PC() to get fill this value. | |
options | A set options. Set |
string | An arbitrary user string. This is used iff there is an active PBS crash handler, in which case it is merely passed through to it. |
This routine will
References PBS_CRASH_TYPE_PANIC, and PBS_LOCK.
Referenced by BUG_check().
void PBS_reboot | ( | unsigned int | reason, | |
unsigned int | parameter, | |||
void * | pc, | |||
unsigned int | options, | |||
const char * | string | |||
) |
Routine to initiate a commanded reboot.
string | An arbitrary user string. This is used iff there is an active PBS crash handler, in which case it is merely passed through to it. | |
reason | An command specific reason for the reboot. For example this may identify the source of the reboot command | |
parameter | An additional opaque user parameter | |
pc | The PC of where the reboot command originated. Typically one would use PBS_PC() to get fill this value. | |
options | A set options. See |
This routine will
References PBS_CRASH_TYPE_COMMAND, and PBS_LOCK.
int PBS_shutdown | ( | void | ) |
Shuts down the PBS facility.
References PbsInitialized, TASK_sys_shutdown(), TAU_shutdown, TBD_destroy(), and WUT_sys_shutdown().