diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-03-06 23:06:18 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-03-06 23:06:18 +0100 |
commit | f8a2fec8f399229d15d3481be0ce8567b2ed6851 (patch) | |
tree | c214fcb30a99791dabe3076ea8c449b3d6538c89 /src/queue.h | |
parent | 1d18f972554c8bad0f08b3ff6727c87586e97094 (diff) | |
download | fastd-f8a2fec8f399229d15d3481be0ce8567b2ed6851.tar fastd-f8a2fec8f399229d15d3481be0ce8567b2ed6851.zip |
Simplify queue functions
Diffstat (limited to 'src/queue.h')
-rw-r--r-- | src/queue.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/queue.h b/src/queue.h index 320df9f..60e7818 100644 --- a/src/queue.h +++ b/src/queue.h @@ -39,7 +39,6 @@ typedef struct _fastd_queue_entry fastd_queue_entry; struct _fastd_queue_entry { fastd_queue_entry *next; - void *data; struct timespec timeout; }; @@ -48,9 +47,9 @@ typedef struct _fastd_queue { } fastd_queue; -void fastd_queue_put(fastd_context *ctx, fastd_queue *queue, void *data, int timeout); -void* fastd_queue_get(fastd_context *ctx, fastd_queue *queue); +void fastd_queue_put(fastd_context *ctx, fastd_queue *queue, fastd_queue_entry *entry, int timeout); +fastd_queue_entry* fastd_queue_get(fastd_context *ctx, fastd_queue *queue); int fastd_queue_timeout(fastd_context *ctx, fastd_queue *queue); -void fastd_queue_filter(fastd_context *ctx, fastd_queue *queue, bool (*pred)(void*, void*), void *extra); +void fastd_queue_filter(fastd_context *ctx, fastd_queue *queue, bool (*pred)(fastd_queue_entry*, void*), void *extra); #endif /* _FASTD_QUEUE_H_ */ |