temp
来自「这是一个介绍 linux 编程知识的文章。」· 代码 · 共 20 行
TXT
20 行
static pthread_key_t con_key;
/* Once-only initialisation of the key */
static pthread_once_t con_key_once = PTHREAD_ONCE_INIT;
static pthread_once_t sig_handler_once = PTHREAD_ONCE_INIT;
/* Allocate the key */
static void con_key_alloc()
{
pthread_key_create (&con_key, NULL);
}
/* Set console info */
void set_coninfo (void* data)
{
pthread_once (&con_key_once, con_key_alloc);
pthread_setspecific (con_key, data);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?