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

📄 mutex.cc

📁 VRTX 商用嵌入式实时操作系统
💻 CC
字号:
/***************************************************************************
*
*		Copyright (c) 1993 READY SYSTEMS CORPORATION.
*
*	All rights reserved. READY SYSTEMS' source code is an unpublished
*	work and the use of a copyright notice does not imply otherwise.
*	This source code contains confidential, trade secret material of
*	READY SYSTEMS. Any attempt or participation in deciphering, decoding,
*	reverse engineering or in any way altering the source code is
*	strictly prohibited, unless the prior written consent of
*	READY SYSTEMS is obtained.
*
*
*	Module Name:		mutex.cc
*
*	Identification:		@(#) 1.4 mutex.cc
*
*	Date:			4/26/93  17:15:26
*
****************************************************************************
*/

#include "mutex.h"

Mutex::Mutex (int pend_order)
{
  int err;
  mid = sc_mcreate (pend_order, &err);
}

Mutex::~Mutex ()
{
  int err;
  sc_mdelete (mid, 1, &err);
}

void
Mutex::pend ()
{
  int err;
  sc_mpend (mid, 0, &err);
}

void
Mutex::post ()
{
  int err;
  sc_mpost (mid, &err);
}

int
Mutex::inquiry ()
{
  int err;
  return sc_minquiry (mid, &err);
}

⌨️ 快捷键说明

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