summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Daniel <cd@maintech.de>2012-06-05 20:50:38 +0200
committerChristian Daniel <cd@maintech.de>2012-06-05 20:50:38 +0200
commitbf8d8292013fa6a175aae1a3768ceece200ecde9 (patch)
treec46da7e54aa111f8b614b8ff83727e1efde7f1f2
parent26bea49a7e75063f7b5581aff0cccffb8cf41f0f (diff)
req queue: resize buffers and fix irq enable/disable
-rw-r--r--firmware/src/req_ctx.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/firmware/src/req_ctx.c b/firmware/src/req_ctx.c
index 9f22edc..775b88d 100644
--- a/firmware/src/req_ctx.c
+++ b/firmware/src/req_ctx.c
@@ -28,11 +28,11 @@
#include "req_ctx.h"
-#define local_irq_save(x) __disable_fault_irq()
-#define local_irq_restore(x) __enable_fault_irq()
+#define local_irq_save(x) do { __disable_fault_irq(); __disable_irq(); } while(0)
+#define local_irq_restore(x) do { __enable_fault_irq(); __enable_irq(); } while(0)
-#define NUM_RCTX_SMALL 16
-#define NUM_RCTX_LARGE 2
+#define NUM_RCTX_SMALL 20
+#define NUM_RCTX_LARGE 0
#define NUM_REQ_CTX (NUM_RCTX_SMALL+NUM_RCTX_LARGE)
@@ -99,6 +99,7 @@ void req_ctx_init(void)
for (i = 0; i < NUM_RCTX_LARGE; i++) {
req_ctx[NUM_RCTX_SMALL+i].size = RCTX_SIZE_LARGE;
req_ctx[NUM_RCTX_SMALL+i].data = rctx_data_large[i];
+ req_ctx[NUM_RCTX_SMALL+i].state = RCTX_STATE_FREE;
}
}