thrd_nomem枚举常量
概要:
enum {
thrd_success = value, //value值由实现定义。
thrd_nomem = value, //value值由实现定义。
thrd_timedout = value, //value值由实现定义。
thrd_busy = value, //value值由实现定义。
thrd_error = value //value值由实现定义。
};
描述:
该枚举常量由函数返回,表示由于不能分配内存而导致请求的操作失败。
在Pelles C编译器<threads.h>头文件中,此类返回代码定义如下:
enum {
thrd_success = 0,
thrd_error = 1,
thrd_busy = 2,
thrd_nomem = 3,
thrd_timedout = 4
};
范例:
|
|
输出:
The function created a new thread.
This is a new thread.
注:使用Pelles C编译。
相关内容:
| thrd_success | 表示操作成功的枚举常量。 |
| thrd_timedout | 表示超时的枚举常量。 |
| thrd_busy | 表示因请求资源已在使用而操作失败的枚举常量。 |
| thrd_error | 表示操作失败的枚举常量。 |