⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 priority.c

📁 嵌入式系统基础课件
💻 C
字号:
#include "priority.h"

extern void ChangePriority(int thread, int priority) ;

/* ---------------------------------------------------- */
/* Use the #defines in the above header file and the	*/
/* externally-defined functions to modify one or more	*/
/* of the four functions defined in this file in order	*/
/* to implement:					*/
/* 							*/
/* (1) The Priority Ceiling Protocol, and		*/
/* (2) The Priority Inheritance Protocol.		*/
/* ---------------------------------------------------- */

void LoPriThreadPend(void)
	{
	SemaphorePend(TSK_LOW) ;
	}

void LoPriThreadPost(void)
	{
	SemaphorePost(TSK_LOW) ;
	}

void HiPriThreadPend(void)
	{
	SemaphorePend(TSK_HI) ;
	}

void HiPriThreadPost(void)
	{
	SemaphorePost(TSK_HI) ;
	}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -