rtosstub.h

来自「自已写的一个嵌入式实时多任务抢占式操作系统。花了几个礼拜」· C头文件 代码 · 共 43 行

H
43
字号
/*	Definition module : rtosstub.h

	Copyright 1995 Diab Data AB, Sweden

	Description :
	Real-time Operating System stubs.

	History :
	When	Who	What
	951116  fb	initial
*/

/**************	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 + =
减小字号Ctrl + -
显示快捷键?