refactor some of the message parsing code to use fifo to reduce threading contention

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15142 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2009-10-12 22:23:55 +00:00
parent 4d8ab0d980
commit 59b94dfacc
16 changed files with 131 additions and 120 deletions
+9 -1
View File
@@ -59,6 +59,7 @@ struct switch_app_log {
struct switch_app_log *next;
};
#define MESSAGE_STRING_ARG_MAX 10
/*! \brief A message object designed to allow unlike technologies to exchange data */
struct switch_core_session_message {
/*! uuid of the sender (for replies) */
@@ -92,7 +93,7 @@ struct switch_core_session_message {
const char *_file;
const char *_func;
int _line;
const char *string_array_arg[10];
const char *string_array_arg[MESSAGE_STRING_ARG_MAX];
};
/*! \brief A generic object to pass as a thread's session object to allow mutiple arguements and a pool */
@@ -634,6 +635,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_thread_launch(_In_ switch_co
/*!
\brief Signal a session's state machine thread that a state change has occured
*/
SWITCH_DECLARE(void) switch_core_session_wake_session_thread(_In_ switch_core_session_t *session);
SWITCH_DECLARE(void) switch_core_session_signal_state_change(_In_ switch_core_session_t *session);
/*!
@@ -653,6 +655,10 @@ SWITCH_DECLARE(char *) switch_core_get_uuid(void);
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_perform_locate(const char *uuid_str, const char *file, const char *func, int line);
#endif
#ifdef SWITCH_DEBUG_RWLOCKS
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_perform_force_locate(const char *uuid_str, const char *file, const char *func, int line);
#endif
/*!
\brief Locate a session based on it's uuid
\param uuid_str the unique id of the session you want to find
@@ -737,6 +743,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_message_send(_In_z_ const ch
*/
SWITCH_DECLARE(switch_status_t) switch_core_session_queue_message(_In_ switch_core_session_t *session, _In_ switch_core_session_message_t *message);
SWITCH_DECLARE(void) switch_core_session_free_message(switch_core_session_message_t **message);
/*!
\brief pass an indication message on a session
\param session the session to pass the message across
+1
View File
@@ -102,6 +102,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_event(_In_ switch_core_session_
*/
SWITCH_DECLARE(switch_status_t) switch_ivr_parse_all_events(switch_core_session_t *session);
SWITCH_DECLARE(switch_status_t) switch_ivr_parse_next_event(switch_core_session_t *session);
SWITCH_DECLARE(switch_status_t) switch_ivr_parse_all_messages(switch_core_session_t *session);
/*!
\brief Wait for time to pass for a specified number of milliseconds