!63 【轻量级 PR】:修复pthread_key_create core问题
Merge pull request !63 from yewk/N/A
This commit is contained in:
commit
a707be0317
@ -104,14 +104,9 @@ typedef struct ErrBufCtx_ {
|
||||
static pthread_key_t g_key;
|
||||
static pthread_once_t g_keyOnce = PTHREAD_ONCE_INIT;
|
||||
|
||||
void KeyDestructor(void *errCtx)
|
||||
{
|
||||
free(errCtx);
|
||||
}
|
||||
|
||||
void MakeKey(void)
|
||||
{
|
||||
(void)pthread_key_create(&g_key, KeyDestructor);
|
||||
(void)pthread_key_create(&g_key, free);
|
||||
}
|
||||
|
||||
static ErrBufCtx *GetErrBufCtx()
|
||||
|
Loading…
x
Reference in New Issue
Block a user