0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-14 23:28:43 +00:00
bird/sysdep/unix/io-loop.h

40 lines
634 B
C
Raw Normal View History

/*
* BIRD -- I/O and event loop
*
* Can be freely distributed and used under the terms of the GNU GPL.
*/
2013-09-10 10:09:36 +00:00
#ifndef _BIRD_SYSDEP_UNIX_IO_LOOP_H_
#define _BIRD_SYSDEP_UNIX_IO_LOOP_H_
2013-09-10 10:09:36 +00:00
struct birdloop
{
pool *pool;
struct timeloop time;
event_list event_list;
list sock_list;
uint sock_num;
BUFFER(sock *) poll_sk;
BUFFER(struct pollfd) poll_fd;
u8 poll_changed;
u8 close_scheduled;
2013-09-10 10:09:36 +00:00
uint ping_pending;
_Atomic u32 ping_sent;
int wakeup_fds[2];
2013-09-10 10:09:36 +00:00
pthread_t thread_id;
pthread_attr_t thread_attr;
uint links;
void (*stopped)(void *data);
void *stop_data;
struct birdloop *prev_loop;
};
2013-09-10 10:09:36 +00:00
#endif