mirror of
https://github.com/git/git
synced 2024-08-25 10:45:59 +00:00
compat/win32/pthread.h: Add an pthread_key_delete() implementation
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
25a7850a10
commit
9ba604a9e4
|
@ -86,6 +86,11 @@ static inline int pthread_key_create(pthread_key_t *keyp, void (*destructor)(voi
|
|||
return (*keyp = TlsAlloc()) == TLS_OUT_OF_INDEXES ? EAGAIN : 0;
|
||||
}
|
||||
|
||||
static inline int pthread_key_delete(pthread_key_t key)
|
||||
{
|
||||
return TlsFree(key) ? 0 : EINVAL;
|
||||
}
|
||||
|
||||
static inline int pthread_setspecific(pthread_key_t key, const void *value)
|
||||
{
|
||||
return TlsSetValue(key, (void *)value) ? 0 : EINVAL;
|
||||
|
|
Loading…
Reference in a new issue