[Cryptech-Commits] [sw/stm32] 03/04: Add a short delay to osMailAlloc, since we're no longer calling it in an ISR.
git at cryptech.is
git at cryptech.is
Mon Apr 17 20:38:06 UTC 2017
This is an automated email from the git hooks/post-receive script.
paul at psgd.org pushed a commit to branch ksng
in repository sw/stm32.
commit dc0ec1a3e0afe5d3d46c9eafd15a87e7de016acb
Author: Paul Selkirk <paul at psgd.org>
AuthorDate: Mon Apr 17 16:12:16 2017 -0400
Add a short delay to osMailAlloc, since we're no longer calling it in an ISR.
---
projects/hsm/hsm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/projects/hsm/hsm.c b/projects/hsm/hsm.c
index c5af86d..f71e2c2 100644
--- a/projects/hsm/hsm.c
+++ b/projects/hsm/hsm.c
@@ -151,13 +151,13 @@ void uart_rx_thread(void const *args)
*/
for ( ; ; osDelay(1)) {
if (ibuf == NULL) {
- if ((ibuf = (rpc_buffer_t *)osMailAlloc(ibuf_queue, 0)) == NULL)
+ if ((ibuf = (rpc_buffer_t *)osMailAlloc(ibuf_queue, 1)) == NULL)
/* This could happen if all dispatch threads are busy, and
* there are NUM_RPC_TASK requests already queued. We could
* send a "server busy" error, or we could just try again on
* the next tick.
*/
- continue;
+ Error_Handler();
ibuf->len = 0;
}
More information about the Commits
mailing list