diff options
author | cbdev <cb@cbcdn.com> | 2017-06-05 18:53:41 +0200 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2017-06-05 18:53:41 +0200 |
commit | 40e123db7713b188162cd94d935f7a395405567a (patch) | |
tree | f745b15d41af6a38b675bdbe2de6473657c7e212 /midimonster.h | |
parent | ed55916e772264dc8278fc8c96d4139aec31e89e (diff) | |
download | midimonster-40e123db7713b188162cd94d935f7a395405567a.tar.gz midimonster-40e123db7713b188162cd94d935f7a395405567a.tar.bz2 midimonster-40e123db7713b188162cd94d935f7a395405567a.zip |
Core select loop
Diffstat (limited to 'midimonster.h')
-rw-r--r-- | midimonster.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/midimonster.h b/midimonster.h index b2af7a3..181f1da 100644 --- a/midimonster.h +++ b/midimonster.h @@ -3,6 +3,7 @@ #include <stdio.h> #include <stdlib.h> #include <stdint.h> +#define max(a,b) (((a) > (b)) ? (a) : (b)) #define DEFAULT_CFG "monster.cfg" @@ -54,6 +55,7 @@ typedef struct _backend_channel { } channel; //FIXME might be replaced by struct pollfd +//FIXME who frees impl typedef struct /*_mm_managed_fd*/ { int fd; backend* backend; @@ -97,6 +99,12 @@ instance* mm_instance(); * will receive a call to its channel_free function. */ channel* mm_channel(instance* i, uint64_t ident); +/* + * Register a file descriptor to be selected on. The backend + * will be notified via the mmbackend_process_fd call. + * This function may only be called from within the + * mmbackend_start procedure. + */ int mm_manage_fd(int fd, char* backend, int manage, void* impl); int mm_channel_event(channel* c, channel_value v); /* |