Commit 700f18ee authored by Eric Wong's avatar Eric Wong Committed by Max Kellermann

main_notify: define main_task so we can use it for assertions

It'll be easier to keep track of what code runs in what task/thread this way.
parent 19a4803b
......@@ -27,7 +27,7 @@
static struct ioOps main_notify_IO;
static int main_pipe[2];
static pthread_t main_task;
pthread_t main_task;
static Notify main_notify;
static pthread_mutex_t select_mutex = PTHREAD_MUTEX_INITIALIZER;
......@@ -60,6 +60,7 @@ static int ioops_consume(int fd_count, fd_set * rfds,
void init_main_notify(void)
{
main_task = pthread_self();
init_async_pipe(main_pipe);
main_notify_IO.fdset = ioops_fdset;
main_notify_IO.consume = ioops_consume;
......
......@@ -21,6 +21,10 @@
#ifndef MAIN_NOTIFY_H
#define MAIN_NOTIFY_H
#include <pthread.h>
extern pthread_t main_task;
void init_main_notify(void);
void deinit_main_notify(void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment