aboutsummaryrefslogtreecommitdiffstats
path: root/src/init.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2014-08-25 14:33:09 +0000
committerWerner Koch <[email protected]>2014-08-25 14:37:46 +0000
commitfc651665010056e6184e8514e5c5436427d7052d (patch)
tree08156e7155986a560c06812748090d64bc654017 /src/init.c
parentRemove GnuPG specific code. (diff)
downloadlibgpg-error-fc651665010056e6184e8514e5c5436427d7052d.tar.gz
libgpg-error-fc651665010056e6184e8514e5c5436427d7052d.zip
Replace locking code in estream functions.
* src/posix-lock.c: Add weak program for pthread_mutex_trylock. (_gpgrt_lock_trylock): New. * src/w32-lock.c (_gpgrt_lock_init): Add missing return statement. (_gpgrt_lock_trylock): New. * src/visibility.c (gpgrt_set_syscall_clamp): New. (gpgrt_lock_trylock): New. (gpgrt_vsnprintf): Fix symbol name. * src/init.c (DllMain): Mark unused arg. * src/estream.c: Replace npth mutexes by our own locks. Replace yeild macro by _gpgrt_yield. (pre_syscall_func, post_syscall_func): New. (do_deinit): Clear both new vars. (es_func_fd_read, es_func_fd_write): Call pre and post syscall functions instead of the former SYSCALL macros. (es_func_w32_read, es_func_w32_write): Ditto. (es_func_fd_seek, es_func_w32_seek, es_func_fp_read) (es_func_fp_write, es_func_fp_seek, es_func_fp_destroy): Bracket syscalls with the pre- and post-syscall fucntions. (do_npth_read, do_npth_write): Remove. (_gpgrt_es_init): Remove call to mutex init. It is now statically initialized. (_gpgrt_set_syscall_clamp): New. (es_create): Destroy stream lock on error. (do_close): Destroy stream lock.
Diffstat (limited to 'src/init.c')
-rw-r--r--src/init.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/init.c b/src/init.c
index b7cc2fd..c10285c 100644
--- a/src/init.c
+++ b/src/init.c
@@ -380,6 +380,7 @@ DllMain (HINSTANCE hinst, DWORD reason, LPVOID reserved)
{
struct tls_space_s *tls;
(void)reserved;
+ (void)hinst;
switch (reason)
{