diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2010-08-28 20:14:36 +0200 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2010-11-14 22:05:45 +0100 |
commit | 7aa6c12a4424d00ea0add0a849f8a5b31a2de6a1 (patch) | |
tree | a7bd2aef0c2cccaa79ad6a99785fd4f1d606fcd7 /error.h | |
parent | 5682d3394204c788988b3cf67b3443a717704d2c (diff) | |
download | openvpn-7aa6c12a4424d00ea0add0a849f8a5b31a2de6a1.tar.gz openvpn-7aa6c12a4424d00ea0add0a849f8a5b31a2de6a1.tar.xz openvpn-7aa6c12a4424d00ea0add0a849f8a5b31a2de6a1.zip |
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 <dazo@users.sourceforge.net>
Acked-by: James Yonan <james@openvpn.net>
Diffstat (limited to 'error.h')
-rw-r--r-- | error.h | 17 |
1 files changed, 0 insertions, 17 deletions
@@ -26,7 +26,6 @@ #define ERROR_H #include "basic.h" -#include "thread.h" /* #define ABORT_ON_ERROR */ @@ -282,34 +281,18 @@ set_check_status_error_delay (unsigned int milliseconds) extern const char *x_msg_prefix; -#ifdef USE_PTHREAD -extern pthread_key_t x_msg_prefix_key; -#endif - void msg_thread_init (void); void msg_thread_uninit (void); static inline void msg_set_prefix (const char *prefix) { -#ifdef USE_PTHREAD - if (openvpn_thread_enabled ()) - { - ASSERT (!pthread_setspecific (x_msg_prefix_key, prefix)); - } - else -#endif x_msg_prefix = prefix; } static inline const char * msg_get_prefix (void) { -#ifdef USE_PTHREAD - if (openvpn_thread_enabled ()) - return (const char *) pthread_getspecific (x_msg_prefix_key); - else -#endif return x_msg_prefix; } |