void semSmShowInit (void) { if (semLibInit () == OK) { /* * Initialize info and show routine pointer to allow semShow and * semInfo to handle shared semaphores ids. */ semSmShowRtn = (FUNCPTR) semSmShow; semSmInfoRtn = (FUNCPTR) semSmInfo; } }
STATUS semOLibInit (void) { if (!semOLibInstalled) { semGiveTbl [SEM_TYPE_OLD] = (FUNCPTR) semBGive; semTakeTbl [SEM_TYPE_OLD] = (FUNCPTR) semOTake; semFlushTbl [SEM_TYPE_OLD] = (FUNCPTR) semQFlush; semGiveDeferTbl [SEM_TYPE_OLD] = (FUNCPTR) semBGiveDefer; semFlushDeferTbl [SEM_TYPE_OLD] = (FUNCPTR) semQFlushDefer; if (semLibInit () == OK) semOLibInstalled = TRUE; } return ((semOLibInstalled) ? OK : ERROR); }
STATUS semBLibInit() { if(!semBLibInstalled) { semGiveTbl[SEM_TYPE_BINARY] = (FUNCTION)semBGive; semTakeTbl[SEM_TYPE_BINARY] = (FUNCTION)semBTake; semFlushTbl[SEM_TYPE_BINARY] = (FUNCTION)semQFlush; semGiveDeferTbl[SEM_TYPE_BINARY] = (FUNCTION)semBGiveDefer; semFlushDeferTbl[SEM_TYPE_BINARY] = (FUNCTION)semQFlushDefer; } if(OK == semLibInit()) { semBLibInstalled = TRUE; } return (semBLibInstalled ? OK : ERROR); }
void usrInit (int startType) { sysStart (startType); /* clear BSS and set up the vector table base address. */ cacheLibInit (USER_I_CACHE_MODE, USER_D_CACHE_MODE); /* include cache support */ excVecInit (); /* exception handling */ sysHwInit (); /* call the BSPs sysHwInit routine during system startup */ usrCacheEnable (); /* optionally enable caches */ objOwnershipInit (); /* object management ownership */ objInfoInit (); /* object management routines that requires lookup in a list of objects, such as the objNameToId() routine. */ objLibInit ((FUNCPTR)FUNCPTR_OBJ_MEMALLOC_RTN, FUNCPTR_OBJ_MEMFREE_RTN, OBJ_MEM_POOL_ID, OBJ_LIBRARY_OPTIONS); /* object management */ vxMemProbeInit (); /* Initialize vxMemProbe exception handler support */ wvLibInit (); /* low-level kernel instrumentation needed by System Viewer */ classListLibInit (); /* object class list management */ semLibInit (); /* semaphore support infrastructure */ /* mutex semaphores */ /* mutex semaphore creation routine */ classLibInit (); /* object class management */ kernelBaseInit (); /* required component DO NOT REMOVE. */ /* __thread variables support */ usrKernelInit (VX_GLOBAL_NO_STACK_FILL); /* context switch and interrupt handling (DO NOT REMOVE). */ }