summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/sdu_sched.c
diff options
context:
space:
mode:
authordimitri staessens <[email protected]>2017-08-29 13:11:43 +0000
committerSander Vrijders <[email protected]>2017-08-29 13:11:43 +0000
commitda754467efab5194084cd8eeab4a48f89d6b925e (patch)
treef6e8f9e732cc36f4f153e409b3f92cdd7c19dbae /src/ipcpd/normal/sdu_sched.c
parent00aeb6ee00efa98c7e2d6d9bebeb1c4799ba1705 (diff)
parentf6b898da88e06399aedbfec87296602aef5c09c2 (diff)
downloadouroboros-da754467efab5194084cd8eeab4a48f89d6b925e.tar.gz
ouroboros-da754467efab5194084cd8eeab4a48f89d6b925e.zip
Merged in dstaesse/ouroboros/be-fqueue (pull request #574)
dev: Revise fqueue API and add man pages
Diffstat (limited to 'src/ipcpd/normal/sdu_sched.c')
-rw-r--r--src/ipcpd/normal/sdu_sched.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ipcpd/normal/sdu_sched.c b/src/ipcpd/normal/sdu_sched.c
index 10b0f02f..c7e799e2 100644
--- a/src/ipcpd/normal/sdu_sched.c
+++ b/src/ipcpd/normal/sdu_sched.c
@@ -38,9 +38,9 @@
#define FD_UPDATE_TIMEOUT 10000 /* nanoseconds */
struct sdu_sched {
- flow_set_t * set[QOS_CUBE_MAX];
- next_sdu_t callback;
- pthread_t sdu_readers[IPCP_SCHED_THREADS];
+ fset_t * set[QOS_CUBE_MAX];
+ next_sdu_t callback;
+ pthread_t sdu_readers[IPCP_SCHED_THREADS];
};
static void cleanup_reader(void * o)
@@ -80,7 +80,7 @@ static void * sdu_reader(void * o)
/* FIXME: replace with scheduling policy call */
i = (i + 1) % QOS_CUBE_MAX;
- ret = flow_event_wait(sched->set[i], fqs[i], &timeout);
+ ret = fevent(sched->set[i], fqs[i], &timeout);
if (ret == -ETIMEDOUT)
continue;
@@ -122,10 +122,10 @@ struct sdu_sched * sdu_sched_create(next_sdu_t callback)
sdu_sched->callback = callback;
for (i = 0; i < QOS_CUBE_MAX; ++i) {
- sdu_sched->set[i] = flow_set_create();
+ sdu_sched->set[i] = fset_create();
if (sdu_sched->set[i] == NULL) {
for (j = 0; j < i; ++j)
- flow_set_destroy(sdu_sched->set[j]);
+ fset_destroy(sdu_sched->set[j]);
goto fail_flow_set;
}
}
@@ -162,7 +162,7 @@ void sdu_sched_destroy(struct sdu_sched * sdu_sched)
}
for (i = 0; i < QOS_CUBE_MAX; ++i)
- flow_set_destroy(sdu_sched->set[i]);
+ fset_destroy(sdu_sched->set[i]);
free(sdu_sched);
}
@@ -175,7 +175,7 @@ void sdu_sched_add(struct sdu_sched * sdu_sched,
assert(sdu_sched);
ipcp_flow_get_qoscube(fd, &qc);
- flow_set_add(sdu_sched->set[qc], fd);
+ fset_add(sdu_sched->set[qc], fd);
}
void sdu_sched_del(struct sdu_sched * sdu_sched,
@@ -186,5 +186,5 @@ void sdu_sched_del(struct sdu_sched * sdu_sched,
assert(sdu_sched);
ipcp_flow_get_qoscube(fd, &qc);
- flow_set_del(sdu_sched->set[qc], fd);
+ fset_del(sdu_sched->set[qc], fd);
}