aboutsummaryrefslogtreecommitdiff
path: root/runloop.h
blob: ae0639b2f085d5edb46861f46b8a95c185c5411d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#pragma once

#include "global.h"


// Return true to remove fd from runloop
typedef bool runloop_callback(int fd);

void runloop_set_timeout(i64 usecs,runloop_callback *timeout_callback);

void runloop_add_fd(int fd,runloop_callback *func,bool use_timeout);
void runloop_run(void);  // Returns when empty