summaryrefslogtreecommitdiffstats
path: root/src/queue.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-12-18 21:00:44 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-12-18 21:00:44 +0100
commit224ea7b0815187d2a638808e8a50fb29fda832f6 (patch)
treeaabc417ce70e0d83258b8b51439e8f2ccc4b8ffe /src/queue.c
parent766a0c145dad84b9af35b2bebc032be71509b3df (diff)
downloadfastd-224ea7b0815187d2a638808e8a50fb29fda832f6.tar
fastd-224ea7b0815187d2a638808e8a50fb29fda832f6.zip
Convert type names to _t convention
Diffstat (limited to 'src/queue.c')
-rw-r--r--src/queue.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/queue.c b/src/queue.c
index 70ee54b..fa864d5 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -30,7 +30,7 @@
#include <stdint.h>
-void fastd_queue_put(fastd_context *ctx, fastd_queue *queue, fastd_queue_entry *entry, int timeout) {
+void fastd_queue_put(fastd_context_t *ctx, fastd_queue_t *queue, fastd_queue_entry_t *entry, int timeout) {
entry->timeout = ctx->now;
if (timeout) {
@@ -43,7 +43,7 @@ void fastd_queue_put(fastd_context *ctx, fastd_queue *queue, fastd_queue_entry *
}
}
- fastd_queue_entry **current;
+ fastd_queue_entry_t **current;
for (current = &queue->head;; current = &(*current)->next) {
if (!(*current) || timespec_after(&(*current)->timeout, &entry->timeout)) {
entry->next = *current;
@@ -53,17 +53,17 @@ void fastd_queue_put(fastd_context *ctx, fastd_queue *queue, fastd_queue_entry *
}
}
-fastd_queue_entry* fastd_queue_get(fastd_context *ctx, fastd_queue *queue) {
+fastd_queue_entry_t* fastd_queue_get(fastd_context_t *ctx, fastd_queue_t *queue) {
if (!queue->head || fastd_queue_timeout(ctx, queue) > 0)
return NULL;
- fastd_queue_entry *entry = queue->head;
+ fastd_queue_entry_t *entry = queue->head;
queue->head = entry->next;
return entry;
}
-int fastd_queue_timeout(fastd_context *ctx, fastd_queue *queue) {
+int fastd_queue_timeout(fastd_context_t *ctx, fastd_queue_t *queue) {
if (!queue->head)
return -1;
@@ -74,8 +74,8 @@ int fastd_queue_timeout(fastd_context *ctx, fastd_queue *queue) {
return diff_msec;
}
-void fastd_queue_filter(fastd_context *ctx, fastd_queue *queue, bool (*pred)(fastd_queue_entry*, void*), void *extra) {
- fastd_queue_entry **entry, *next;
+void fastd_queue_filter(fastd_context_t *ctx, fastd_queue_t *queue, bool (*pred)(fastd_queue_entry_t*, void*), void *extra) {
+ fastd_queue_entry_t **entry, *next;
for (entry = &queue->head; *entry;) {
next = (*entry)->next;
@@ -86,8 +86,8 @@ void fastd_queue_filter(fastd_context *ctx, fastd_queue *queue, bool (*pred)(fas
}
}
-bool fastd_queue_has_entry(fastd_context *ctx, fastd_queue *queue, bool (*pred)(fastd_queue_entry*, void*), void *extra) {
- fastd_queue_entry *entry;
+bool fastd_queue_has_entry(fastd_context_t *ctx, fastd_queue_t *queue, bool (*pred)(fastd_queue_entry_t*, void*), void *extra) {
+ fastd_queue_entry_t *entry;
for (entry = queue->head; entry; entry = entry->next) {
if (pred(entry, extra))
return true;