diff options
author | Ben Pfaff <blp@nicira.com> | 2013-06-19 13:07:35 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2013-06-28 16:09:37 -0700 |
commit | 728a8b141ff670d0b98b61bd88a6bb7a9c719e26 (patch) | |
tree | 992f96dc5d314fccae032d15ede60e68c66fdefb /lib/process.c | |
parent | 1514b275558304c63bc3838c2da5c4be0c1cbef0 (diff) |
ovs-thread: Add support for various thread-related assertions.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
Diffstat (limited to 'lib/process.c')
-rw-r--r-- | lib/process.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/process.c b/lib/process.c index 03e00ce1..266c90b6 100644 --- a/lib/process.c +++ b/lib/process.c @@ -28,6 +28,7 @@ #include "dynamic-string.h" #include "fatal-signal.h" #include "list.h" +#include "ovs-thread.h" #include "poll-loop.h" #include "signals.h" #include "socket-util.h" @@ -71,6 +72,7 @@ process_init(void) static bool inited; struct sigaction sa; + assert_single_threaded(); if (inited) { return; } @@ -180,6 +182,8 @@ process_start(char **argv, struct process **pp) pid_t pid; int error; + assert_single_threaded(); + *pp = NULL; COVERAGE_INC(process_start); error = process_prestart(argv); |