clkmgr.h

来自「T-kernel 的extension源代码」· C头文件 代码 · 共 62 行

H
62
字号
/* *---------------------------------------------------------------------- *    T-Kernel / Standard Extension * *    Copyright (C) 2006 by Ken Sakamura. All rights reserved. *    T-Kernel / Standard Extension is distributed  *      under the T-License for T-Kernel / Standard Extension. *---------------------------------------------------------------------- * *    Version:   1.00.00 *    Released by T-Engine Forum(http://www.t-engine.org) at 2006/8/11. * *---------------------------------------------------------------------- *//* *	clkmgr.h (clock) * *	Time management */#ifndef _CM_CLKMGR_H_#define _CM_CLKMGR_H_#define	DEBUG_MODULE	"(clock)"#include <basic.h>#include <tk/tkernel.h>#include <tk/util.h>#include <extension/extension.h>#include <extension/datetime.h>#include <device/clk.h>#include <sys/util.h>#include <extension/sys/svc/ifclk.h>#include <sys/debug.h>/* * Time management information */typedef struct {	FastLock	lk;		/* Lock for exclusive access */	TIMEZONE	tz;		/* Local time correction data */	W		clkupd;		/* ON/OFF of the time update notification */	ID		cycid;		/* Timer handler for time update notification */} ClkInfo;/* * Lock at the time management information (ClkInfo) access */#define	LockCM()	Lock(&clkInfo.lk)#define	UnlockCM()	Unlock(&clkInfo.lk)#define	LOCK_CM(exp)	{ LockCM(); { exp; } UnlockCM(); }/* * Error code-related */#define	EC_MASK			0xffff0000U#define	ED_MASK			0x0000ffffU#define	toERR(class,detail)	((ERR)(((UW)(class) << 16) | ((UW)(detail) & 0x0000ffffU)))#endif

⌨️ 快捷键说明

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