*/
#define PTHREAD_MUTEX_LOCK(_x)
#define PTHREAD_MUTEX_UNLOCK(_x)
-#define thread_addrequest radius_handle_request
#endif
#define INSERT_EVENT(_function, _ctx) if (!lrad_event_insert(el, _function, _ctx, &((_ctx)->when), &((_ctx)->ev))) { _rad_panic(__FILE__, __LINE__, "Failed to insert event"); }
* FIXME: Put this somewhere else, where it isn't called
* all of the time...
*/
-#ifndef HAVE_PTHREAD_H
+#if !defined(HAVE_PTHREAD_H) && defined(WNOHANG)
/*
* If there are no child threads, then there may
* be child processes. In that case, wait for
* FIXME: Put this somewhere else, where it isn't called
* all of the time...
*/
-#ifndef HAVE_PTHREAD_H
+#if !defined(HAVE_PTHREAD_H) && defined(WNOHANG)
/*
* If there are no child threads, then there may
* be child processes. In that case, wait for
}
#endif
+#ifndef __MINGW32__
/*
* Child threads need a pipe to signal us, as do the
* signal handlers.
radlog(L_ERR, "Failed creating handler for signals");
exit(1);
}
-
+#else
+ self_pipe[0] = self_pipe[1] = -1;
+#endif
/*
* Mark the proxy Fd's as unused.
{
pthread_mutex_unlock(&thread_pool.queue_mutex);
}
+#else
+int thread_pool_addrequest(REQUEST *request, RAD_REQUEST_FUNP fun)
+{
+ radius_handle_request(request, fun);
+ return 1;
+}
#endif /* HAVE_PTHREAD_H */