GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> FBS / V0-3-1 > fbs_rtos / rad750
#include <loadLib.h>
#include <ioLib.h>
#include <memDrv.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <CMX/CMX_asBuiltPub.h>
#include <PBS/INT.ih>
#include <MDB/MDB_pubdefs.h>
#include <FBS/FBS_pubrtos.h>
#include <FBS/FBS_msgs.h>
#include <ZLIB/zlib.h>
#include <FBS_mtx.ih>
Functions | |
static unsigned int | FILE_loadModule (unsigned int id, const char *nam, int sym, void **mod, unsigned int *dat) |
Load a code module (wrapper for VxWorks loadModule()). | |
unsigned int | FILE_loadModuleByID (unsigned int id, int sym, void **mod) |
Load a FSW code module by file ID. | |
unsigned int | FILE_loadModuleByName (const char *nam, int sym, void **mod) |
Load a FSW code module by file name. | |
unsigned int | FILE_loadModuleSecondary (unsigned int id, int sym, void **mod, unsigned int *dat) |
Load a FSW code module by file ID (special for secondary boot). | |
Variables | |
char | memDevice [] = { "/mem/loadModule" } |
Name for a memory device. | |
static FBS_mti | mti |
Instance of (storage for) mutex (only used in Unix). | |
static volatile FBS_mtx | mtx |
Mutex to enforce serial load operations with FILE_loadModulexxx. |
CVS $Id: FBS_load.c.vx-xxx-xxx,v 1.6 2011/03/24 21:24:42 apw Exp $
static unsigned int FILE_loadModule | ( | unsigned int | id, | |
const char * | nam, | |||
int | sym, | |||
void ** | mod, | |||
unsigned int * | dat | |||
) | [static] |
Load a code module (wrapper for VxWorks loadModule()).
id | (in) File ID | |
nam | (in) File name | |
sym | (in) Symbol loading flag (conventional VxWorks definition) | |
mod | (out) Module handle | |
dat | (out) Pointer to location to return additional error information |
FBS_CSBODY | Body checksum mismatch | |
FBS_IMEMALOC | Cannot allocate memory to read module | |
FBS_LOADFAIL | Load module failed | |
FBS_MEMDVCRE | Memory device create failed | |
FBS_MEMDVOPN | Memory device open failed | |
FBS_NOOPEN | Cannot open module | |
FBS_OMEMALOC | Cannot allocate memory to inflate module | |
FBS_SLURP | File length mismatch | |
FBS_SUCCESS | Success | |
FBS_ZLIBFAIL | Inflation failed | |
FBS_ZLIBINIT | Inflation initialization failed |
References FBS_mtx__create(), FBS_mtx__destroy(), FBS_mtx__lock(), FBS_mtx__unlock(), and FILE_decodePrimary().
Referenced by FILE_loadModuleByID(), FILE_loadModuleByName(), and FILE_loadModuleSecondary().
unsigned int FILE_loadModuleByID | ( | unsigned int | id, | |
int | sym, | |||
void ** | mod | |||
) |
Load a FSW code module by file ID.
id | (in) File ID | |
sym | (in) Symbol loading flag (conventional VxWorks definition) | |
mod | (out) Module handle (note 1) |
FBS_CSBODY | Body checksum mismatch | |
FBS_IMEMALOC | Cannot allocate memory to read module | |
FBS_LOADFAIL | Load module failed | |
FBS_MEMDVCRE | Memory device create failed | |
FBS_MEMDVOPN | Memory device open failed | |
FBS_NOOPEN | Cannot open module | |
FBS_NOTIMPL | Function not implemented (unix only) | |
FBS_OMEMALOC | Cannot allocate memory to inflate module | |
FBS_SLURP | File length mismatch | |
FBS_SUCCESS | Success | |
FBS_ZLIBFAIL | Inflation failed | |
FBS_ZLIBINIT | Inflation initialization failed |
References FILE_loadModule(), FILE_PATH_STR_SIZE_USR, and FILE_pathIdToPath().
unsigned int FILE_loadModuleByName | ( | const char * | nam, | |
int | sym, | |||
void ** | mod | |||
) |
Load a FSW code module by file name.
nam | (in) File name | |
sym | (in) Symbol loading flag (note 1) | |
mod | (out) Module handle (note 2) |
mode
flag to a dlopen()
call.FBS_CSBODY | Body checksum mismatch | |
FBS_IMEMALOC | Cannot allocate memory to read module | |
FBS_LOADFAIL | Load module failed | |
FBS_MEMDVCRE | Memory device create failed | |
FBS_MEMDVOPN | Memory device open failed | |
FBS_NAMENULL | Module name is NULL | |
FBS_NOOPEN | Cannot open module | |
FBS_NOTIMPL | Function not implemented (unix only) | |
FBS_OMEMALOC | Cannot allocate memory to inflate module | |
FBS_SLURP | File length mismatch | |
FBS_SUCCESS | Success | |
FBS_ZLIBFAIL | Inflation failed | |
FBS_ZLIBINIT | Inflation initialization failed |
References FILE_loadModule(), and FILE_pathPathToId().
unsigned int FILE_loadModuleSecondary | ( | unsigned int | id, | |
int | sym, | |||
void ** | mod, | |||
unsigned int * | dat | |||
) |
Load a FSW code module by file ID (special for secondary boot).
id | (in) File ID | |
sym | (in) Symbol loading flag (conventional VxWorks definition) | |
mod | (out) Module handle (note 1) | |
dat | (out) Return extra information on error (note 2) |
FBS_CSBODY | Body checksum mismatch | |
FBS_IMEMALOC | Cannot allocate memory to read module | |
FBS_LOADFAIL | Load module failed | |
FBS_MEMDVCRE | Memory device create failed | |
FBS_MEMDVOPN | Memory device open failed | |
FBS_NOOPEN | Cannot open module | |
FBS_NOTIMPL | Function not implemented (unix only) | |
FBS_OMEMALOC | Cannot allocate memory to inflate module | |
FBS_SLURP | File length mismatch | |
FBS_SUCCESS | Success | |
FBS_ZLIBFAIL | Inflation failed | |
FBS_ZLIBINIT | Inflation initialization failed |
References FILE_loadModule(), FILE_PATH_STR_SIZE_USR, and FILE_pathIdToPath().