Commit df177680 authored by Cedric Roux's avatar Cedric Roux

- Put itti writes to file in another thread to avoid locks when flushing the file

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4522 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 508a1df2
......@@ -601,6 +601,9 @@ void itti_mark_task_ready(task_id_t task_id) {
DevCheck(thread_id < itti_desc.thread_max, thread_id, itti_desc.thread_max, 0);
/* Register the thread in itti dump */
itti_dump_thread_use_ring_buffer();
#if !defined(ENABLE_EVENT_FD)
// Lock the mutex to get exclusive access to the list
pthread_mutex_lock (&itti_desc.tasks[task_id].message_queue_mutex);
......@@ -638,6 +641,9 @@ int itti_init(task_id_t task_max, thread_id_t thread_max, MessagesIds messages_i
ITTI_DEBUG("Init: %d tasks, %d threads, %d messages\n", task_max, thread_max, messages_id_max);
#if !defined(RTAI)
/* SR: disable signals module for RTAI (need to harmonize management
* between softmodem and oaisim).
*/
CHECK_INIT_RETURN(signal_init());
#endif
......
......@@ -42,4 +42,6 @@ int itti_dump_init(const char * const messages_definition_xml, const char * cons
void itti_dump_exit(void);
void itti_dump_thread_use_ring_buffer(void);
#endif /* INTERTASK_INTERFACE_DUMP_H_ */
......@@ -45,7 +45,7 @@
#define ITTI_PORT (10007)
/* This is the queue size for signal dumper */
#define ITTI_QUEUE_SIZE_MAX (1 * 1024 * 1024) /* 1 MBytes */
#define ITTI_QUEUE_MAX_ELEMENTS (200 * 1024)
#define ITTI_DUMP_MAX_CON (5) /* Max connections in parallel */
#endif /* INTERTASK_INTERFACE_CONF_H_ */
......@@ -45,7 +45,7 @@
#define ITTI_PORT (10006)
/* This is the queue size for signal dumper */
#define ITTI_QUEUE_SIZE_MAX (1 * 1024 * 1024) /* 1 MBytes */
#define ITTI_QUEUE_MAX_ELEMENTS (200 * 1000)
#define ITTI_DUMP_MAX_CON (5) /* Max connections in parallel */
#endif /* INTERTASK_INTERFACE_CONF_H_ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment