From 1ce41d567c2cfaa4122cdbce66059e4ad0fdbc24 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 28 Apr 2015 16:51:55 +0800 Subject: [PATCH] runtime/mailbox: fix mailbox_acknowledged for first message --- soc/runtime/mailbox.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/soc/runtime/mailbox.c b/soc/runtime/mailbox.c index 1ed0f4c33..2f0786893 100644 --- a/soc/runtime/mailbox.c +++ b/soc/runtime/mailbox.c @@ -51,7 +51,10 @@ void mailbox_send(void *ptr) int mailbox_acknowledged(void) { - return KERNELCPU_MAILBOX != last_transmission; + unsigned int m; + + m = KERNELCPU_MAILBOX; + return !m || (m != last_transmission); } void mailbox_send_and_wait(void *ptr)