thrd_equal函数
概要:
#include <threads.h> int thrd_equal(thrd_t thr0, thrd_t thr1);
描述:
该函数确定参数thr0标识的线程与参数thr1标识的线程是否为同一线程。
参数:
thrd_t thr0
线程标识符。
thrd_t thr1
线程标识符。
返回值:
如果参数thr0标识的线程与参数thr1标识的线程是同一线程,函数返回非0值;如果不是同一线程,函数返回0。
范例:
|
|
输出:
The identifier of the current thread is not threadId.
注:使用Pelles C编译。
相关内容:
| thrd_current | 标识调用线程的函数。 |
| thrd_detach | 分离线程的函数。 |
| thrd_sleep | 暂停当前线程的函数。 |
| thrd_exit | 终止当前线程的函数。 |
| thrd_join | 连接线程的函数。 |
| thrd_create | 创建线程的函数。 |
| thrd_yield | 让其它线程运行的函数。 |