summaryrefslogtreecommitdiff
path: root/lib/windows-tls.c
Commit message (Collapse)AuthorAgeFilesLines
* Put LGPLv2+ notices in source files where appropriate.Bruno Haible2021-06-041-7/+7
| | | | | * lib/**.{h,c,gperf}: Use LGPLv2+ notice whenever the module description says so.
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* Include <stdlib.h> when needed.Bruno Haible2019-06-301-0/+1
| | | | | | | | | | | * lib/cnd.c: Include <stdlib.h>, needed for abort(). * lib/fcntl.c: Likewise. * lib/mbscasestr.c: Likewise. * lib/mbssep.c: Likewise. * lib/mbsstr.c: Likewise. * lib/openat.c: Include <stdlib.h>, needed for free(). * lib/windows-tls.c: Include <stdlib.h>, needed for malloc(), free(), abort().
* windows-tls: Implement TLS key destructors for native Windows.Bruno Haible2019-06-261-10/+291
| | | | | | | | | | | | | | | | | | | | | | | | | * lib/windows-tls.h (glwthread_tls_process_destructors): New declaration. (GLWTHREAD_DESTRUCTOR_ITERATIONS): New macro. * lib/windows-tls.c: Include <limits.h>, windows-once.h. (dtor_table_init_once, dtor_table_lock: New variables. (struct dtor): New type. (dtor_table, dtors_count, dtors_used, dtors_allocated, dtor_processing_threads): New variables. (dtor_table_initialize, dtor_table_ensure_initialized, dtor_table_shrink_used, glwthread_tls_process_destructors): New functions. (glwthread_tls_key_create, glwthread_tls_key_delete): Rewritten to handle non-NULL destructors. * modules/windows-tls (Depends-on): Add windows-once. * lib/glthread/tls.h (glthread_tls_key_init, glthread_tls_key_destroy): Use the functions declared in windows-tls.h. * lib/threads.in.h (TSS_DTOR_ITERATIONS): Define using GLWTHREAD_DESTRUCTOR_ITERATIONS. * lib/windows-thread.c: Include windows-tls.h. (wrapper_func, glwthread_thread_exit): Invoke glwthread_tls_process_destructors. * modules/windows-thread (Depends-on): Add windows-tls.
* windows-thread, windows-tls: Fix compilation error on 32-bit mingw.Bruno Haible2019-06-211-0/+2
| | | | | * lib/windows-thread.c: Include <errno.h>. * lib/windows-tls.c: Likewise.
* windows-tls: New module.Bruno Haible2019-06-201-0/+55
* lib/windows-tls.h: New file, based on lib/glthread/tls.h. * lib/windows-tls.c: New file, based on lib/glthread/tls.h. * lib/glthread/tls.h: Include windows-tls.h. (gl_tls_key_t): Define using glwthread_tls_key_t. * modules/windows-tls: New file. * modules/tls (Depends-on): Add windows-tls.