1
0
mirror of https://github.com/bluekitchen/btstack.git synced 2025-03-25 07:43:38 +00:00

24 lines
714 B
C
Raw Normal View History

2009-06-06 17:43:50 +00:00
/*
* run_loop.h
*
* Created by Matthias Ringwald on 6/6/09.
*/
#pragma once
#include "linked_list.h"
2009-06-06 17:43:50 +00:00
typedef struct data_source {
linked_item_t item;
2009-06-06 17:43:50 +00:00
int fd; // <-- file descriptors to watch or 0
int (*process)(struct data_source *ds, int ready); // <-- do processing, @return: more to do
} data_source_t;
typedef struct timer_source {
struct timer_source *next;
} timer_source_t;
void run_loop_add(data_source_t *dataSource); // <-- add DataSource to RunLoop
int run_loop_remove(data_source_t *dataSource); // <-- remove DataSource from RunLoop
void run_loop_execute(); // <-- execute configured RunLoop