mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 04:11:08 +00:00
Modify headers and macros, according to Russell's suggestions on the -dev list
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@187599 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1335,6 +1335,7 @@ static inline int _ast_rwlock_wrlock(ast_rwlock_t *t, const char *name,
|
||||
if (lt->reentrancy) {
|
||||
ast_reentrancy_lock(lt);
|
||||
bt = <->backtrace[lt->reentrancy-1];
|
||||
ast_reentrancy_unlock(lt);
|
||||
} else {
|
||||
bt = NULL;
|
||||
}
|
||||
@@ -1353,7 +1354,7 @@ static inline int _ast_rwlock_wrlock(ast_rwlock_t *t, const char *name,
|
||||
return res;
|
||||
}
|
||||
|
||||
#define ast_rwlock_timedrdlock(a,b) \
|
||||
#define ast_rwlock_timedrdlock(a, b) \
|
||||
_ast_rwlock_timedrdlock(a, # a, b, __FILE__, __LINE__, __PRETTY_FUNCTION__)
|
||||
|
||||
static inline int _ast_rwlock_timedrdlock(ast_rwlock_t *t, const char *name,
|
||||
@@ -1413,6 +1414,7 @@ static inline int _ast_rwlock_timedrdlock(ast_rwlock_t *t, const char *name,
|
||||
if (lt->reentrancy) {
|
||||
ast_reentrancy_lock(lt);
|
||||
bt = <->backtrace[lt->reentrancy-1];
|
||||
ast_reentrancy_unlock(lt);
|
||||
} else {
|
||||
bt = NULL;
|
||||
}
|
||||
@@ -1431,7 +1433,7 @@ static inline int _ast_rwlock_timedrdlock(ast_rwlock_t *t, const char *name,
|
||||
return res;
|
||||
}
|
||||
|
||||
#define ast_rwlock_timedwrlock(a,b) \
|
||||
#define ast_rwlock_timedwrlock(a, b) \
|
||||
_ast_rwlock_timedwrlock(a, # a, b, __FILE__, __LINE__, __PRETTY_FUNCTION__)
|
||||
|
||||
static inline int _ast_rwlock_timedwrlock(ast_rwlock_t *t, const char *name,
|
||||
@@ -1491,6 +1493,7 @@ static inline int _ast_rwlock_timedwrlock(ast_rwlock_t *t, const char *name,
|
||||
if (lt->reentrancy) {
|
||||
ast_reentrancy_lock(lt);
|
||||
bt = <->backtrace[lt->reentrancy-1];
|
||||
ast_reentrancy_unlock(lt);
|
||||
} else {
|
||||
bt = NULL;
|
||||
}
|
||||
|
@@ -1104,7 +1104,7 @@ int ast_app_group_update(struct ast_channel *old, struct ast_channel *new)
|
||||
ast_free(gi);
|
||||
}
|
||||
}
|
||||
AST_RWLIST_TRAVERSE_SAFE_END
|
||||
AST_RWLIST_TRAVERSE_SAFE_END;
|
||||
AST_RWLIST_UNLOCK(&groups);
|
||||
|
||||
return 0;
|
||||
|
@@ -592,7 +592,7 @@ static struct ast_frame *audio_audiohook_write_list(struct ast_channel *chan, st
|
||||
ast_audiohook_write_frame(audiohook, direction, middle_frame);
|
||||
ast_audiohook_unlock(audiohook);
|
||||
}
|
||||
AST_LIST_TRAVERSE_SAFE_END
|
||||
AST_LIST_TRAVERSE_SAFE_END;
|
||||
|
||||
/* If this frame is being written out to the channel then we need to use whisper sources */
|
||||
if (direction == AST_AUDIOHOOK_DIRECTION_WRITE && !AST_LIST_EMPTY(&audiohook_list->whisper_list)) {
|
||||
@@ -615,7 +615,7 @@ static struct ast_frame *audio_audiohook_write_list(struct ast_channel *chan, st
|
||||
}
|
||||
ast_audiohook_unlock(audiohook);
|
||||
}
|
||||
AST_LIST_TRAVERSE_SAFE_END
|
||||
AST_LIST_TRAVERSE_SAFE_END;
|
||||
/* We take all of the combined whisper sources and combine them into the audio being written out */
|
||||
for (i = 0, data1 = middle_frame->data.ptr, data2 = combine_buf; i < samples; i++, data1++, data2++)
|
||||
ast_slinear_saturated_add(data1, data2);
|
||||
@@ -638,7 +638,7 @@ static struct ast_frame *audio_audiohook_write_list(struct ast_channel *chan, st
|
||||
audiohook->manipulate_callback(audiohook, chan, middle_frame, direction);
|
||||
ast_audiohook_unlock(audiohook);
|
||||
}
|
||||
AST_LIST_TRAVERSE_SAFE_END
|
||||
AST_LIST_TRAVERSE_SAFE_END;
|
||||
end_frame = middle_frame;
|
||||
}
|
||||
|
||||
|
@@ -108,7 +108,7 @@ int ast_bridge_technology_unregister(struct ast_bridge_technology *technology)
|
||||
break;
|
||||
}
|
||||
}
|
||||
AST_RWLIST_TRAVERSE_SAFE_END
|
||||
AST_RWLIST_TRAVERSE_SAFE_END;
|
||||
|
||||
AST_RWLIST_UNLOCK(&bridge_technologies);
|
||||
|
||||
|
@@ -2933,7 +2933,7 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
|
||||
AST_LIST_REMOVE_CURRENT(frame_list);
|
||||
break;
|
||||
}
|
||||
AST_LIST_TRAVERSE_SAFE_END
|
||||
AST_LIST_TRAVERSE_SAFE_END;
|
||||
|
||||
if (!f) {
|
||||
/* There were no acceptable frames on the readq. */
|
||||
|
@@ -3353,7 +3353,7 @@ static int park_exec_full(struct ast_channel *chan, void *data, struct ast_parki
|
||||
break;
|
||||
}
|
||||
}
|
||||
AST_LIST_TRAVERSE_SAFE_END
|
||||
AST_LIST_TRAVERSE_SAFE_END;
|
||||
AST_LIST_UNLOCK(&parkinglot->parkings);
|
||||
|
||||
if (pu) {
|
||||
|
@@ -399,7 +399,7 @@ void ast_http_uri_unlink_all_with_key(const char *key)
|
||||
ast_free(urih);
|
||||
}
|
||||
}
|
||||
AST_RWLIST_TRAVERSE_SAFE_END
|
||||
AST_RWLIST_TRAVERSE_SAFE_END;
|
||||
AST_RWLIST_UNLOCK(&uris);
|
||||
}
|
||||
|
||||
|
@@ -3381,7 +3381,7 @@ int ast_manager_unregister(char *action)
|
||||
break;
|
||||
}
|
||||
}
|
||||
AST_RWLIST_TRAVERSE_SAFE_END
|
||||
AST_RWLIST_TRAVERSE_SAFE_END;
|
||||
AST_RWLIST_UNLOCK(&actions);
|
||||
|
||||
return 0;
|
||||
|
@@ -3967,7 +3967,7 @@ int ast_extension_state_del(int id, ast_state_cb_type callback)
|
||||
break;
|
||||
}
|
||||
}
|
||||
AST_LIST_TRAVERSE_SAFE_END
|
||||
AST_LIST_TRAVERSE_SAFE_END;
|
||||
} else { /* callback with extension, find the callback based on ID */
|
||||
struct ast_hint *hint;
|
||||
AST_RWLIST_TRAVERSE(&hints, hint, list) {
|
||||
@@ -3977,7 +3977,7 @@ int ast_extension_state_del(int id, ast_state_cb_type callback)
|
||||
break;
|
||||
}
|
||||
}
|
||||
AST_LIST_TRAVERSE_SAFE_END
|
||||
AST_LIST_TRAVERSE_SAFE_END;
|
||||
|
||||
if (p_cur)
|
||||
break;
|
||||
@@ -8279,7 +8279,7 @@ void __ast_context_destroy(struct ast_context *list, struct ast_hashtab *context
|
||||
ast_free(sw);
|
||||
}
|
||||
}
|
||||
AST_LIST_TRAVERSE_SAFE_END
|
||||
AST_LIST_TRAVERSE_SAFE_END;
|
||||
|
||||
if (tmp->root_table) { /* it is entirely possible that the context is EMPTY */
|
||||
exten_iter = ast_hashtab_start_traversal(tmp->root_table);
|
||||
|
Reference in New Issue
Block a user