📄 rzkschedulerglobals.c
字号:
/*
* File : RZKSchedulerGlobals.c
*
*
* Description : This file contains declarations for global variables and
* constants required by Scheduler.
*
*
* Copyright 2004 ZiLOG Inc. ALL RIGHTS RESERVED.
*
* This file contains unpublished confidential and proprietary information
* of ZiLOG, Inc.
* NO PART OF THIS WORK MAY BE DUPLICATED, STORED, PUBLISHED OR DISCLOSED
* IN ANY FORM WITHOUT THE PRIOR WRITTEN CONSENT OF ZiLOG, INC.
* This is not a license and no use of any kind of this work is authorized
* in the absence of a written license granted by ZiLOG, Inc. in ZiLOG's
* sole discretion
*/
#include "ZSysgen.h"
#include "ZTypes.h"
#include "ZThread.h"
#include "ZQueue.h"
#include "ZScheduler.h"
#include "ZInterrupt.h"
#define pThread ((RZK_TCB_t *) hThread)
#define pCurrentThread ((RZK_TCB_t *) hCurrentThread)
extern RZK_THREAD_CB_t nInterruptThread[1];
/* Lookup table to identify the high priority thread */
const UINT8 BitMap[256]={
0,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,5,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,
6,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,5,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,
7,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,5,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,
6,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,5,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,
8,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,5,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,
6,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,5,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,
7,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,5,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,
6,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,5,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1
} ;
/** global variables */
TICK_t uDefaultTimeSlice;
#ifdef RZK_STATISTIC
TICK_t lPreviousSwitch;
#endif
UINT8 bTaskChangeFlag;
UINT8 uNestedISRCount;
RZK_THREADHANDLE_t hCurrentThread = &nInterruptThread[0];
UINT8 uRegBankBusyBitMap = 0xfc; /* Bank 0 for Memory Thread, while 1 for Interrupt Thread */
volatile UINT32 DQPriorityBitMap = 0x01; /* Startup Code runs as Interrupt Thread */
const UINT32 pMap[32]=
{
0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x100,0x200,0x400,
0x800,0x1000,0x2000,0x4000,0x8000,0x10000,0x20000,0x40000,
0x80000,0x100000,0x200000,0x400000,0x800000,0x1000000,0x2000000,
0x4000000,0x8000000,0x10000000,0x20000000,0x40000000,0x80000000
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -