diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-11-09 15:01:49 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-11-09 15:01:49 -0500 |
commit | bf4f55a13da783083b0c76decd6ebf475a63ebd0 (patch) | |
tree | 15ebd3463fc900d52cd3065b6c83cf83a364e3e7 /src/lib/thread/compat_threads.c | |
parent | 5d73f87cedaf58fd6e7a53a230b311f5e8b51b73 (diff) | |
parent | 60d10812368458cb88aa9f9d628c49766d4bb490 (diff) | |
download | tor-bf4f55a13da783083b0c76decd6ebf475a63ebd0.tar.gz tor-bf4f55a13da783083b0c76decd6ebf475a63ebd0.zip |
Merge branch 'subsystems'
Diffstat (limited to 'src/lib/thread/compat_threads.c')
-rw-r--r-- | src/lib/thread/compat_threads.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/thread/compat_threads.c b/src/lib/thread/compat_threads.c index 7f1970af45..0b466da212 100644 --- a/src/lib/thread/compat_threads.c +++ b/src/lib/thread/compat_threads.c @@ -14,9 +14,11 @@ #include "orconfig.h" #include <stdlib.h> #include "lib/thread/threads.h" +#include "lib/thread/thread_sys.h" #include "lib/log/log.h" #include "lib/log/util_bug.h" +#include "lib/subsys/subsys.h" #include <string.h> @@ -109,3 +111,17 @@ atomic_counter_exchange(atomic_counter_t *counter, size_t newval) return oldval; } #endif /* !defined(HAVE_WORKING_STDATOMIC) */ + +static int +subsys_threads_initialize(void) +{ + tor_threads_init(); + return 0; +} + +const subsys_fns_t sys_threads = { + .name = "threads", + .supported = true, + .level = -95, + .initialize = subsys_threads_initialize, +}; |