提交 f4320b58 authored 作者: Anthony Minessale's avatar Anthony Minessale

swap rwlock and mutex

上级 196f890a
......@@ -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) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论