tss_get函数
概要:
#include <threads.h> void *tss_get(tss_t key);
描述:
该函数返回当前线程由参数key标识的线程专属存储值。该函数只能在调用线程执行析构函数前,使用tss_create函数创建的key值作为其参数。
参数:
tss_t key
tss_t类型标识符。
返回值:
如果成功,函数返回当前线程由参数key标识的线程专属存储值;如果不成功,函数返回空指针(NULL)。
范例:
|
|
输出:
Be slow to promise and quick to perform.
Better an empty purse than an empty head.
Birds of a feather flock together.
注:使用Pelles C编译。
相关内容:
tss_set | 设置线程专属存储的函数。 |
tss_delete | 释放线程专属存储所用资源的函数。 |
tss_create | 创建线程专属存储指针的函数。 |