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

📄 semaphore.cpp

📁 Jazmyn is a 32-bit, protected mode, multitasking OS which runs on i386 & above CPU`s. Its complete
💻 CPP
字号:
#include <sys\types.h>
#include <semaphore.h>

__semaphore::__semaphore(int cnt)
{
	__max_cnt = cnt;
}

__semaphore::~__semaphore()
{

}

void __semaphore::down()
{
	while(!__max_cnt);
	__max_cnt--;
}

void __semaphore::up()
{
	__max_cnt++;
}




⌨️ 快捷键说明

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