Commit 33d621c4 authored by Cedric Roux's avatar Cedric Roux

- New function: get task name

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4288 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent ad361f21
......@@ -76,8 +76,7 @@ struct message_list_s {
typedef struct task_desc_s {
/* Queue of messages belonging to the task */
STAILQ_HEAD(message_queue_head, message_list_s)
message_queue;
STAILQ_HEAD(message_queue_head, message_list_s) message_queue;
/* Number of messages in the queue */
volatile uint32_t message_in_queue;
......@@ -125,6 +124,15 @@ char *itti_get_message_name(MessagesIds message_id) {
return (itti_desc.messages_info[message_id].name);
}
char *itti_get_task_name(task_id_t task_id)
{
thread_id_t thread_id = TASK_GET_THREAD_ID(task_id);
DevCheck(thread_id < itti_desc.thread_max, thread_id, itti_desc.thread_max, 0);
return (itti_desc.threads_name[thread_id]);
}
int itti_send_broadcast_message(MessageDef *message_p) {
thread_id_t origin_thread_id;
uint32_t i;
......@@ -371,7 +379,7 @@ void itti_exit_task(void) {
}
void itti_terminate_tasks(task_id_t task_id) {
// Sends Terminate signals to all tasks.
// Sends Terminate signals to all tasks.
itti_send_terminate_message (task_id);
if (itti_desc.thread_handling_signals >= 0) {
......
......@@ -137,6 +137,11 @@ void itti_terminate_tasks(task_id_t task_id);
**/
char *itti_get_message_name(MessagesIds message_id);
/** \brief Return the printable string associated with a task id
* \param thread_id Id of the task
**/
char *itti_get_task_name(task_id_t task_id);
/** \brief Alloc and memset(0) a new itti message.
* \param origin_task_id Task ID of the sending task
* \param message_id Message ID
......
......@@ -133,7 +133,7 @@ typedef struct MessageHeader_s
task_id_t originTaskId; /**< ID of the sender task */
task_id_t destinationTaskId; /**< ID of the destination task */
instance_t instance; /* Task instance for virtualization */
instance_t instance; /**< Task instance for virtualization */
MessageHeaderSize size; /**< Message size (not including header size) */
} MessageHeader;
......
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