diff options
author | Dimitri Staessens <dimitri.staessens@ugent.be> | 2018-06-04 15:31:49 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2018-06-04 15:55:07 +0200 |
commit | 6bfe0080bf347a1f4baad32070913b2edfd27214 (patch) | |
tree | 786c53d17cce24e6a0047a212f4bbc9880fcefca /src/lib/rq.h | |
parent | 22b3bdbe0e82b3a58d963a344e9227aa7c35e05a (diff) | |
download | ouroboros-6bfe0080bf347a1f4baad32070913b2edfd27214.tar.gz ouroboros-6bfe0080bf347a1f4baad32070913b2edfd27214.zip |
lib: Revise FRCT reordering
The reordering queue is replaced by a fixed ring buffer for speed and
simplicity.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Diffstat (limited to 'src/lib/rq.h')
-rw-r--r-- | src/lib/rq.h | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/lib/rq.h b/src/lib/rq.h deleted file mode 100644 index 25c193d6..00000000 --- a/src/lib/rq.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Ouroboros - Copyright (C) 2016 - 2018 - * - * Reordering queue - * - * Dimitri Staessens <dimitri.staessens@ugent.be> - * Sander Vrijders <sander.vrijders@ugent.be> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * version 2.1 as published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., http://www.fsf.org/about/contact/. - */ - -#ifndef OUROBOROS_LIB_RQ_H -#define OUROBOROS_LIB_RQ_H - -#include <stdint.h> -#include <stdlib.h> -#include <stdbool.h> - -struct rq * rq_create(int size); - -void rq_destroy(struct rq * rq); - -int rq_push(struct rq * rq, - uint64_t seqno, - size_t idx); - -uint64_t rq_peek(struct rq * rq); - -bool rq_is_empty(struct rq * rq); - -size_t rq_pop(struct rq * rq); - -bool rq_has(struct rq * rq, - uint64_t seqno); - -#endif /* OUROBOROS_LIB_RQ_H */ |