mtx_plain枚举常量
概要:
#include <threads.h> enum { mtx_plain = value, //value值由实现定义。 mtx_recursive = value, //value值由实现定义。 mtx_timed = value //value值由实现定义。 };
描述:
该枚举常量用作mtx_init函数的参数,用于创建简单的、非递归的互斥对象,该互斥对象不支持超时。
在Pelles C编译器<threads.h>头文件中,互斥类型定义如下:
enum {
mtx_plain = 0x01,
mtx_timed = 0x02,
mtx_recursive = 0x10
};
范例:
|
|
输出:
number: 90000
相关内容:
| mtx_recursive | 表示递归互斥的枚举常量。 |
| mtx_timed | 表示支持超时、非递归互斥的枚举常量。 |
主要参考资料: