summaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2019-11-25 17:01:59 +0100
committerUros Majstorovic <majstor@majstor.org>2019-11-25 17:01:59 +0100
commit45e12774e2a1d334b13684399e156b1a83d55777 (patch)
tree4a73e0a68a266966678b5c0d842039a9b1c6aaaf /code
parent47fda276ca6f1e824646245a2c75ac6d60710fc9 (diff)
event busy in loop removed
Diffstat (limited to 'code')
-rw-r--r--code/fe310/eos/event.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/code/fe310/eos/event.c b/code/fe310/eos/event.c
index 3c3ceb9..cc9c5de 100644
--- a/code/fe310/eos/event.c
+++ b/code/fe310/eos/event.c
@@ -16,8 +16,6 @@ static eos_evt_fptr_t evt_handler[EOS_EVT_MAX_EVT];
static uint16_t evt_handler_wrapper_acq[EOS_EVT_MAX_EVT];
static uint16_t evt_handler_flags_buf_acq[EOS_EVT_MAX_EVT];
-static volatile char evt_busy = 0;
-
void eos_evtq_init(void) {
int i;
@@ -88,10 +86,6 @@ void eos_evtq_set_flags(unsigned char type, uint8_t flags) {
if ((idx < EOS_EVT_MAX_EVT) && (flags & EOS_EVT_FLAG_NET_BUF_ACQ)) evt_handler_flags_buf_acq[idx] |= flag;
}
-void eos_evtq_set_busy(char busy) {
- evt_busy = busy;
-}
-
void eos_evtq_get(unsigned char type, unsigned char *selector, uint16_t sel_len, unsigned char **buffer, uint16_t *len) {
int rv = 0;
@@ -130,7 +124,7 @@ void eos_evtq_loop(void) {
set_csr(mstatus, MSTATUS_MIE);
evtq_handler(type, buffer, len);
} else {
- if (!evt_busy) asm volatile ("wfi");
+ asm volatile ("wfi");
set_csr(mstatus, MSTATUS_MIE);
}
}