vrtx.cc

来自「VRTX 商用嵌入式实时操作系统」· CC 代码 · 共 80 行

CC
80
字号
/***************************************************************************
*
*		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:		vrtx.cc
*
*	Identification:		@(#) 1.4 vrtx.cc
*
*	Date:			4/26/93  17:15:31
*
****************************************************************************
*/

#include "vrtx.h"

void
vrtx::lock ()
{
  sc_lock();
}

void
vrtx::unlock ()
{
  sc_unlock();
}

unsigned long
vrtx::time ()
{
  return sc_gtime();
}

void
vrtx::set_time (unsigned long time)
{
  sc_stime(time);
}

void
vrtx::clock (struct timespec &clock)
{
  int err;
  struct timespec current;
  unsigned long ns_per_tick;
  sc_gclock(&current, &ns_per_tick, &err);
  clock = current;
}

void
vrtx::set_clock (struct timespec &clock)
{
  int err;
  unsigned long ns_per_tick;
  struct timespec old_clock;
  sc_gclock(&old_clock, &ns_per_tick, &err);
  sc_sclock(clock, ns_per_tick, &err);
}

void
vrtx::set_timeslice (unsigned timeslice)
{
  sc_tslice(timeslice);
}

int
vrtx::version()
{
  return sc_gversion();
}

⌨️ 快捷键说明

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