diff options
author | Ole Troan <ot@cisco.com> | 2019-04-10 19:32:02 +0200 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2019-04-16 07:02:28 +0000 |
commit | c560789ca85b2325072ef1a209d4b1012dfe07bd (patch) | |
tree | 335400088e75959d05967442cb4ed42d05a2c815 /src/vlibmemory/memory_client.c | |
parent | cf18ca92b86cc589cd482e951cba8a0a5eb5e0d5 (diff) |
API: Handle pthread cond signal case where signal is missed.
Especially on a single core setup the RX thread could signal the main thread
that it was done, before main thread listened to the signal.
Change-Id: Ib70337b21bcf77787ce4ee0aa9cf80c6da2215af
Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vlibmemory/memory_client.c')
-rw-r--r-- | src/vlibmemory/memory_client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vlibmemory/memory_client.c b/src/vlibmemory/memory_client.c index 383d7428b72..d002845a00c 100644 --- a/src/vlibmemory/memory_client.c +++ b/src/vlibmemory/memory_client.c @@ -100,8 +100,8 @@ static void vl_api_rx_thread_exit_t_handler (vl_api_rx_thread_exit_t * mp) { memory_client_main_t *mm = &memory_client_main; - vl_msg_api_free (mp); - longjmp (mm->rx_thread_jmpbuf, 1); + if (mm->rx_thread_jmpbuf_valid) + longjmp (mm->rx_thread_jmpbuf, 1); } static void |