📄 usrkernel.c
字号:
/* usrKernel.c - wind kernel initialization *//* Copyright 1992-1996 Wind River Systems, Inc. *//*modification history--------------------01h,12feb98,pr added trgShowInit routine 01g,27jan98,cth changed INCLUDE_INSTRUMENTATION to INCLUDE_WINDVIEW, removed include of wvLib.h01f,25jan98,pr added triggering support01e,18sep95,ism imported conditional include of wvLib.h from bootConfig.c01d,28mar95,kkk moved kernel defines to configAll.h01c,07dec93,smb configuration change for windview01b,10nov92,jcf configuration change for MicroWorks.01a,18sep92,jcf written.*//*DESCRIPTIONThis file is used to configure and initialize the Wind kernel. This file isincluded by usrConfig.c.NOMANUAL*/#ifndef __INCusrKernelc#define __INCusrKernelc /* global variables */#ifdef INCLUDE_CONSTANT_RDY_QBMAP_LIST readyQBMap; /* bit mapped ready queue list array */#endif /* INCLUDE_CONSTANT_RDY_Q *//********************************************************************************* usrKernelInit - configure kernel data structures** NOMANUAL*/void usrKernelInit (void) {#ifdef INCLUDE_WINDVIEW wvLibInit (); /* initialize windview first, really */#endif /* INCLUDE_WINDVIEW */ classLibInit (); /* initialize class (must be first) */ taskLibInit (); /* initialize task object */#ifdef INCLUDE_TASK_HOOKS taskHookInit (); /* initialize task hook package */#ifdef INCLUDE_SHOW_ROUTINES taskHookShowInit (); /* task hook show routine */#endif /* INCLUDE_SHOW_ROUTINES */#endif /* INCLUDE_TASK_HOOKS */#ifdef INCLUDE_SEM_BINARY semBLibInit (); /* initialize binary semaphore */#endif /* INCLUDE_SEM_BINARY */#ifdef INCLUDE_SEM_MUTEX semMLibInit (); /* initialize mutex semaphore */#endif /* INCLUDE_SEM_MUTEX */#ifdef INCLUDE_SEM_COUNTING semCLibInit (); /* initialize counting semaphore */#endif /* INCLUDE_SEM_COUNTING */#ifdef INCLUDE_SEM_OLD semOLibInit (); /* initialize VxWorks 4.0 semaphores */#endif /* INCLUDE_SEM_OLD */#ifdef INCLUDE_WATCHDOGS wdLibInit (); /* initialize watchdog */#ifdef INCLUDE_SHOW_ROUTINES wdShowInit (); /* watchdog object show routine */#endif /* INCLUDE_SHOW_ROUTINES */#endif /* INCLUDE_WATCHDOGS */#ifdef INCLUDE_MSG_Q msgQLibInit (); /* initialize message queues */#ifdef INCLUDE_SHOW_ROUTINES msgQShowInit (); /* message queue object show routine */#endif /* INCLUDE_SHOW_ROUTINES */#endif /* INCLUDE_MSG_Q */#ifdef INCLUDE_SHOW_ROUTINES classShowInit (); /* class object show routine */ taskShowInit (); /* task object show routine */ semShowInit (); /* semaphore object show routine */#endif /* INCLUDE_SHOW_ROUTINES */ /* configure the kernel queues */#ifdef INCLUDE_CONSTANT_RDY_Q qInit (&readyQHead, Q_PRI_BMAP, (int)&readyQBMap, 256); /* fixed ready q */#else qInit (&readyQHead, Q_PRI_LIST); /* simple priority ready q */#endif /* !INCLUDE_CONSTANT_RDY_Q */ qInit (&activeQHead, Q_FIFO); /* FIFO queue for active q */ qInit (&tickQHead, Q_PRI_LIST); /* simple priority semaphore q*/ workQInit (); /* queue for deferred work */#ifdef INCLUDE_TRIGGERING /* initialize event triggering library */ trgLibInit ();#ifdef INCLUDE_SHOW_ROUTINES trgShowInit (); /* semaphore object show routine */#endif /* INCLUDE_SHOW_ROUTINES */#endif /* INCLUDE_TRIGGERING */ }#endif /* __INCusrKernelc */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -