X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fovs-thread.h;h=9c8023e561de8d47124d201751e71a4c6619e32e;hb=728a8b141ff670d0b98b61bd88a6bb7a9c719e26;hp=05461e2016f4d7798e53c9c1b9489feb50b934a5;hpb=1514b275558304c63bc3838c2da5c4be0c1cbef0;p=sliver-openvswitch.git diff --git a/lib/ovs-thread.h b/lib/ovs-thread.h index 05461e201..9c8023e56 100644 --- a/lib/ovs-thread.h +++ b/lib/ovs-thread.h @@ -18,6 +18,8 @@ #define OVS_THREAD_H 1 #include +#include +#include #include "ovs-atomic.h" #include "util.h" @@ -365,5 +367,14 @@ ovsthread_once_start(struct ovsthread_once *once) #define ovsthread_once_start(ONCE) \ ((ONCE)->done ? false : ({ OVS_ACQUIRE(ONCE); true; })) #endif + +void assert_single_threaded(const char *where); +#define assert_single_threaded() assert_single_threaded(SOURCE_LOCATOR) + +pid_t xfork(const char *where); +#define xfork() xfork(SOURCE_LOCATOR) + +void forbid_forking(const char *reason); +bool may_fork(void); #endif /* ovs-thread.h */