swap rwlock and mutex

This commit is contained in:
Anthony Minessale 2011-11-28 08:27:40 -06:00
parent 196f890a08
commit f4320b58c8
1 changed files with 2 additions and 2 deletions

View File

@ -1826,8 +1826,8 @@ SWITCH_DECLARE(switch_status_t) switch_event_bind_removable(const char *id, swit
if (event <= SWITCH_EVENT_ALL) {
switch_zmalloc(event_node, sizeof(*event_node));
switch_mutex_lock(BLOCK);
switch_thread_rwlock_wrlock(RWLOCK);
switch_mutex_lock(BLOCK);
/* <LOCKED> ----------------------------------------------- */
event_node->id = DUP(id);
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;
switch_thread_rwlock_unlock(RWLOCK);
switch_mutex_unlock(BLOCK);
switch_thread_rwlock_unlock(RWLOCK);
/* </LOCKED> ----------------------------------------------- */
if (node) {