📄 usrkernel.c
字号:
/* usrKernel.c - wind kernel initialization *//* Copyright 1992-1999 Wind River Systems, Inc. *//*modification history--------------------01f,20jan99,jpd added INITIAL_MEM_ALLOCATION.01e,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*/#ifdef INCLUDE_WDB#define FREE_MEM_START_ADRS (FREE_RAM_ADRS + WDB_POOL_SIZE)#else /* ! INCLUDE_WDB */#define FREE_MEM_START_ADRS FREE_RAM_ADRS#endif#ifdef INCLUDE_INITIAL_MEM_ALLOCATION#define MEM_POOL_START (char *) \ (ROUND_UP(FREE_MEM_START_ADRS, (INITIAL_MEM_ALIGNMENT)) + \ (INITIAL_MEM_SIZE))#else /* INCLUDE_INITIAL_MEM_ALLOCATION */#define MEM_POOL_START (char *) FREE_MEM_START_ADRS#endif /* INCLUDE_INITIAL_MEM_ALLOCATION *//* 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) { classLibInit (); /* initialize class (must be first) */ taskLibInit (); /* initialize task object */ /* 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 */ /* start the kernel specifying usrRoot as the root task */ kernelInit ((FUNCPTR) usrRoot, ROOT_STACK_SIZE, MEM_POOL_START, sysMemTop (), ISR_STACK_SIZE, INT_LOCK_LEVEL); }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -