aboutsummaryrefslogtreecommitdiffhomepage
path: root/iothread.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-27 18:43:24 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-27 18:43:24 -0800
commitfdfa5c06028d3473f57cea497a6682a8e550352f (patch)
treef822ccc211dd331c2b0d99949d0e4288fded0eef /iothread.cpp
parent50ee5d28cdc5b521f2d2feda264ec798e8f3ab8e (diff)
Some initial work towards resolving nasty fork/pthread issues, and to having a per-parser job list
Diffstat (limited to 'iothread.cpp')
-rw-r--r--iothread.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/iothread.cpp b/iothread.cpp
index ee122369..b98dd8f2 100644
--- a/iothread.cpp
+++ b/iothread.cpp
@@ -1,4 +1,6 @@
+#include "config.h"
#include "iothread.h"
+#include "common.h"
#include <pthread.h>
#include <assert.h>
#include <errno.h>
@@ -139,6 +141,8 @@ static void iothread_spawn_if_needed(void) {
}
int iothread_perform_base(int (*handler)(void *), void (*completionCallback)(void *, int), void *context) {
+ ASSERT_IS_MAIN_THREAD();
+ ASSERT_IS_NOT_FORKED_CHILD();
iothread_init();
/* Create and initialize a request. */