From 7aa6c12a4424d00ea0add0a849f8a5b31a2de6a1 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Sat, 28 Aug 2010 20:14:36 +0200 Subject: Clean-up: Remove pthread and mutex locking code This code was not activated at all, and hard coded as disabled in syshead.h with this code snippet: /* * Pthread support is currently experimental (and quite unfinished). */ #if 1 /* JYFIXME -- if defined, disable pthread */ #undef USE_PTHREAD #endif So no matter if --enable-pthread when running ./configure or not, this feature was never enabled in reality. Further, by removing the blocker code above made OpenVPN uncompilable in the current state. As the threading part needs to be completely rewritten and pthreading will not be supported in OpenVPN 2.x, removing this code seems most reasonable. In addition, a lot of mutex locking code was also removed, as they were practically NOP functions, due to pthreading being forcefully disabled Signed-off-by: David Sommerseth Acked-by: James Yonan --- buffer.c | 1 - 1 file changed, 1 deletion(-) (limited to 'buffer.c') diff --git a/buffer.c b/buffer.c index d448e5d..e9ae21a 100644 --- a/buffer.c +++ b/buffer.c @@ -28,7 +28,6 @@ #include "buffer.h" #include "error.h" #include "mtu.h" -#include "thread.h" #include "memdbg.h" -- cgit v1.2.3 From cc88a2695f4a54e27143efeae62de24fec8e26a1 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Sat, 28 Aug 2010 20:44:07 +0200 Subject: Clean-up: Remove more dead and inactive code paths These code paths was practically not needed with no locking mechanisms enabled and was just bloating the source code. Signed-off-by: David Sommerseth Acked-by: James Yonan --- buffer.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'buffer.c') diff --git a/buffer.c b/buffer.c index e9ae21a..729495c 100644 --- a/buffer.c +++ b/buffer.c @@ -298,10 +298,8 @@ gc_malloc (size_t size, bool clear, struct gc_arena *a) #endif check_malloc_return (e); ret = (char *) e + sizeof (struct gc_entry); - /*mutex_lock_static (L_GC_MALLOC);*/ e->next = a->list; a->list = e; - /*mutex_unlock_static (L_GC_MALLOC);*/ } else { @@ -323,10 +321,8 @@ void x_gc_free (struct gc_arena *a) { struct gc_entry *e; - /*mutex_lock_static (L_GC_MALLOC);*/ e = a->list; a->list = NULL; - /*mutex_unlock_static (L_GC_MALLOC);*/ while (e != NULL) { -- cgit v1.2.3