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

📄 synclib.h

📁 自已写的一个嵌入式实时多任务抢占式操作系统。花了几个礼拜
💻 H
字号:
/*	Definition module : synclib.h

	Copyright 1995 Diab Data AB, Sweden

	Description :
	Real-time Operating System stubs.

	History :
	When	Who	What
	951116  fb	initial
	991029	kc	new file name: synclib.h
*/

/**************	Exported data, types and macros	*********/

/**************	Exported functions **********************/

#ifdef	__cplusplus
extern "C" {
#endif

typedef unsigned long _lib_atomic_level;
typedef struct _lib_mutex_struct *_lib_mutex;
typedef struct _lib_semaphore_struct *_lib_semaphore;

extern _lib_atomic_level _lib_atomic_enter(void);
extern void _lib_atomic_restore(_lib_atomic_level);

extern _lib_mutex _lib_alloc_mutex(void);
extern void _lib_free_mutex(_lib_mutex);
extern void _lib_lock_mutex(_lib_mutex);
extern int _lib_trylock_mutex(_lib_mutex);
extern void _lib_unlock_mutex(_lib_mutex);

extern _lib_semaphore _lib_alloc_semaphore(void);
extern void _lib_free_semaphore(_lib_semaphore);
extern void _lib_lock_semaphore(_lib_semaphore);
extern int _lib_trylock_semaphore(_lib_semaphore);
extern void _lib_unlock_semaphore(_lib_semaphore);

#ifdef	__cplusplus
}
#endif

⌨️ 快捷键说明

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