summaryrefslogtreecommitdiff
path: root/firmware/src/os/req_ctx.h
diff options
context:
space:
mode:
authorMin Xu <min.xu@min-info.net>2014-10-25 14:54:05 +0200
committerHarald Welte <laforge@gnumonks.org>2014-11-11 22:30:54 +0100
commitb6b2c7d4829aab75feb9f1114b825bbde0491444 (patch)
tree213aa01e7dc9a3a3f55c8e06f1f5a5c9967f1213 /firmware/src/os/req_ctx.h
parent40def0ab1a03243e6a6f7116fca30d67fd9e664f (diff)
req_ctx: avoid loop iterations by introducing per-state queues
In order to speed up the lookup of req_ctx, we keep per-state queues rather than iterating over all the request contexts that exist again and again.
Diffstat (limited to 'firmware/src/os/req_ctx.h')
-rw-r--r--firmware/src/os/req_ctx.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/firmware/src/os/req_ctx.h b/firmware/src/os/req_ctx.h
index edc48a3..1e53fa4 100644
--- a/firmware/src/os/req_ctx.h
+++ b/firmware/src/os/req_ctx.h
@@ -15,6 +15,7 @@
struct req_ctx {
volatile u_int32_t state;
+ volatile struct req_ctx *prev, *next;
u_int16_t size;
u_int16_t tot_len;
u_int8_t *data;
personal git repositories of Harald Welte. Your mileage may vary