Cygwin: POSIX mq: avoid double calls to ipc_mutex_unlock

_mq_send as well as _mq_receive call ipc_mutex_unlock twice in case
of success, after having introduced __try/__except blocks.

Fixes: 3f3bd10104 ("* Throughout, use __try/__except/__endtry blocks, rather than myfault handler.")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2021-04-30 10:30:21 +02:00
parent 4f89f24fbe
commit 548a4c3ca4
1 changed files with 0 additions and 3 deletions

View File

@ -886,7 +886,6 @@ _mq_send (mqd_t mqd, const char *ptr, size_t len, unsigned int prio,
ipc_cond_signal (mqinfo->mqi_waitrecv);
attr->mq_curmsgs++;
ipc_mutex_unlock (mqinfo->mqi_lock);
ret = 0;
}
__except (EBADF) {}
@ -986,8 +985,6 @@ _mq_receive (mqd_t mqd, char *ptr, size_t maxlen, unsigned int *priop,
if (attr->mq_curmsgs == attr->mq_maxmsg)
ipc_cond_signal (mqinfo->mqi_waitsend);
attr->mq_curmsgs--;
ipc_mutex_unlock (mqinfo->mqi_lock);
}
__except (EBADF) {}
__endtry