aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ci_queue.c6
-rw-r--r--src/ci_queue.h6
-rw-r--r--src/server.c6
3 files changed, 9 insertions, 9 deletions
diff --git a/src/ci_queue.c b/src/ci_queue.c
index 6429580..848ab95 100644
--- a/src/ci_queue.c
+++ b/src/ci_queue.c
@@ -97,17 +97,17 @@ int ci_queue_is_empty(const struct ci_queue *queue)
return STAILQ_EMPTY(queue);
}
-void ci_queue_push(struct ci_queue *queue, struct ci_queue_entry *entry)
+void ci_queue_add_last(struct ci_queue *queue, struct ci_queue_entry *entry)
{
STAILQ_INSERT_TAIL(queue, entry, entries);
}
-void ci_queue_push_head(struct ci_queue *queue, struct ci_queue_entry *entry)
+void ci_queue_add_first(struct ci_queue *queue, struct ci_queue_entry *entry)
{
STAILQ_INSERT_HEAD(queue, entry, entries);
}
-struct ci_queue_entry *ci_queue_pop(struct ci_queue *queue)
+struct ci_queue_entry *ci_queue_remove_first(struct ci_queue *queue)
{
struct ci_queue_entry *entry;
diff --git a/src/ci_queue.h b/src/ci_queue.h
index 7f3702b..a0e8ce5 100644
--- a/src/ci_queue.h
+++ b/src/ci_queue.h
@@ -25,9 +25,9 @@ void ci_queue_destroy(struct ci_queue *);
int ci_queue_is_empty(const struct ci_queue *);
-void ci_queue_push(struct ci_queue *, struct ci_queue_entry *);
-void ci_queue_push_head(struct ci_queue *, struct ci_queue_entry *);
+void ci_queue_add_first(struct ci_queue *, struct ci_queue_entry *);
+void ci_queue_add_last(struct ci_queue *, struct ci_queue_entry *);
-struct ci_queue_entry *ci_queue_pop(struct ci_queue *);
+struct ci_queue_entry *ci_queue_remove_first(struct ci_queue *);
#endif
diff --git a/src/server.c b/src/server.c
index 51ee27f..22a9a86 100644
--- a/src/server.c
+++ b/src/server.c
@@ -163,7 +163,7 @@ static int worker_dequeue_run(struct server *server, struct ci_queue_entry **ci_
goto unlock;
}
- *ci_run = ci_queue_pop(&server->ci_queue);
+ *ci_run = ci_queue_remove_first(&server->ci_queue);
log("Removed a CI run for repository %s from the queue\n", ci_queue_entry_get_url(*ci_run));
goto unlock;
@@ -183,7 +183,7 @@ static int worker_requeue_run(struct server *server, struct ci_queue_entry *ci_r
return ret;
}
- ci_queue_push_head(&server->ci_queue, ci_run);
+ ci_queue_add_first(&server->ci_queue, ci_run);
log("Requeued a CI run for repository %s\n", ci_queue_entry_get_url(ci_run));
ret = pthread_cond_signal(&server->server_cv);
@@ -260,7 +260,7 @@ static int msg_ci_run_queue(struct server *server, const char *url, const char *
if (ret < 0)
goto unlock;
- ci_queue_push(&server->ci_queue, entry);
+ ci_queue_add_last(&server->ci_queue, entry);
log("Added a new CI run for repository %s to the queue\n", url);
ret = pthread_cond_signal(&server->server_cv);