summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/fa.c
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2018-10-05 10:24:02 +0200
committerDimitri Staessens <dimitri.staessens@ugent.be>2018-10-05 10:36:05 +0200
commit8bd27921e6cd46cdcc191c9d98a7f93bb7fe5360 (patch)
tree6c047b44608d31f54728f0e203ba2820c97f50b9 /src/ipcpd/normal/fa.c
parent5d11a6ad590133c92925c6162eb47b4401f16bef (diff)
downloadouroboros-8bd27921e6cd46cdcc191c9d98a7f93bb7fe5360.tar.gz
ouroboros-8bd27921e6cd46cdcc191c9d98a7f93bb7fe5360.zip
ipcpd: Shorten packet_scheduler to psched
This shortens packet_scheduler to psched, which results in more readable code. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Diffstat (limited to 'src/ipcpd/normal/fa.c')
-rw-r--r--src/ipcpd/normal/fa.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ipcpd/normal/fa.c b/src/ipcpd/normal/fa.c
index d67ba61e..027223b7 100644
--- a/src/ipcpd/normal/fa.c
+++ b/src/ipcpd/normal/fa.c
@@ -39,7 +39,7 @@
#include "dir.h"
#include "fa.h"
-#include "packet_sched.h"
+#include "psched.h"
#include "ipcp.h"
#include "dt.h"
@@ -74,7 +74,7 @@ struct {
uint64_t r_addr[PROG_MAX_FLOWS];
int fd;
- struct packet_sched * packet_sched;
+ struct psched * psched;
} fa;
static void packet_handler(int fd,
@@ -192,7 +192,7 @@ static void fa_post_packet(void * comp,
if (msg->response < 0)
destroy_conn(ntoh32(msg->r_eid));
else
- packet_sched_add(fa.packet_sched, ntoh32(msg->r_eid));
+ psched_add(fa.psched, ntoh32(msg->r_eid));
pthread_rwlock_unlock(&fa.flows_lock);
@@ -227,8 +227,8 @@ void fa_fini(void)
int fa_start(void)
{
- fa.packet_sched = packet_sched_create(packet_handler);
- if (fa.packet_sched == NULL) {
+ fa.psched = psched_create(packet_handler);
+ if (fa.psched == NULL) {
log_err("Failed to create packet scheduler.");
return -1;
}
@@ -238,7 +238,7 @@ int fa_start(void)
void fa_stop(void)
{
- packet_sched_destroy(fa.packet_sched);
+ psched_destroy(fa.psched);
}
int fa_alloc(int fd,
@@ -335,7 +335,7 @@ int fa_alloc_resp(int fd,
destroy_conn(fd);
ipcp_sdb_release(sdb);
} else {
- packet_sched_add(fa.packet_sched, fd);
+ psched_add(fa.psched, fd);
}
ipcp_flow_get_qoscube(fd, &qc);
@@ -360,7 +360,7 @@ int fa_dealloc(int fd)
pthread_rwlock_wrlock(&fa.flows_lock);
- packet_sched_del(fa.packet_sched, fd);
+ psched_del(fa.psched, fd);
destroy_conn(fd);