mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-22 11:53:16 +00:00
swap rwlock and mutex
This commit is contained in:
parent
196f890a08
commit
f4320b58c8
@ -1826,8 +1826,8 @@ SWITCH_DECLARE(switch_status_t) switch_event_bind_removable(const char *id, swit
|
|||||||
|
|
||||||
if (event <= SWITCH_EVENT_ALL) {
|
if (event <= SWITCH_EVENT_ALL) {
|
||||||
switch_zmalloc(event_node, sizeof(*event_node));
|
switch_zmalloc(event_node, sizeof(*event_node));
|
||||||
switch_mutex_lock(BLOCK);
|
|
||||||
switch_thread_rwlock_wrlock(RWLOCK);
|
switch_thread_rwlock_wrlock(RWLOCK);
|
||||||
|
switch_mutex_lock(BLOCK);
|
||||||
/* <LOCKED> ----------------------------------------------- */
|
/* <LOCKED> ----------------------------------------------- */
|
||||||
event_node->id = DUP(id);
|
event_node->id = DUP(id);
|
||||||
event_node->event_id = event;
|
event_node->event_id = event;
|
||||||
@ -1842,8 +1842,8 @@ SWITCH_DECLARE(switch_status_t) switch_event_bind_removable(const char *id, swit
|
|||||||
}
|
}
|
||||||
|
|
||||||
EVENT_NODES[event] = event_node;
|
EVENT_NODES[event] = event_node;
|
||||||
switch_thread_rwlock_unlock(RWLOCK);
|
|
||||||
switch_mutex_unlock(BLOCK);
|
switch_mutex_unlock(BLOCK);
|
||||||
|
switch_thread_rwlock_unlock(RWLOCK);
|
||||||
/* </LOCKED> ----------------------------------------------- */
|
/* </LOCKED> ----------------------------------------------- */
|
||||||
|
|
||||||
if (node) {
|
if (node) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user