patches13/0005-fix-itti-message-broadcast-memory-handling-problem.patch
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7051 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -336,10 +336,11 @@ int itti_send_broadcast_message(MessageDef *message_p) {
|
||||
if (thread_id != origin_thread_id) {
|
||||
/* Skip tasks which are not running */
|
||||
if (itti_desc.threads[thread_id].task_state == TASK_STATE_READY) {
|
||||
new_message_p = itti_malloc (origin_task_id, destination_task_id, sizeof(MessageDef));
|
||||
size_t size = sizeof(MessageHeader) + message_p->ittiMsgHeader.ittiMsgSize;
|
||||
new_message_p = itti_malloc( origin_task_id, destination_task_id, size );
|
||||
AssertFatal (new_message_p != NULL, "New message allocation failed!\n");
|
||||
|
||||
memcpy (new_message_p, message_p, sizeof(MessageDef));
|
||||
memcpy( new_message_p, message_p, size );
|
||||
result = itti_send_msg_to_task (destination_task_id, INSTANCE_DEFAULT, new_message_p);
|
||||
AssertFatal (result >= 0, "Failed to send message %d to thread %d (task %d)!\n", message_p->ittiMsgHeader.messageId, thread_id, destination_task_id);
|
||||
}
|
||||
|
||||
@@ -145,8 +145,10 @@ typedef struct MessageHeader_s
|
||||
|
||||
/** @struct MessageDef
|
||||
* @brief Message structure for inter-task communication.
|
||||
* \internal
|
||||
* The attached attribute \c __packed__ is neccessary, because the memory allocation code expects \ref ittiMsg directly following \ref ittiMsgHeader.
|
||||
*/
|
||||
typedef struct MessageDef_s
|
||||
typedef struct __attribute__ ((__packed__)) MessageDef_s
|
||||
{
|
||||
MessageHeader ittiMsgHeader; /**< Message header */
|
||||
msg_t ittiMsg; /**< Union of payloads as defined in x_messages_def.h headers */
|
||||
|
||||
@@ -1319,7 +1319,7 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
|
||||
start_meas(&phy_vars_eNB->phy_proc_tx);
|
||||
|
||||
#ifdef DEBUG_PHY_PROC
|
||||
LOG_D(PHY,"[%s %"PRIu8"] Frame %d subframe %d : Doing phy_procedures_eNB_TX(%d)\n",
|
||||
LOG_D(PHY,"[%s %"PRIu8"] Frame %d subframe %d : Doing phy_procedures_eNB_TX\n",
|
||||
(r_type == multicast_relay) ? "RN/eNB" : "eNB",
|
||||
phy_vars_eNB->Mod_id, frame, subframe);
|
||||
#endif
|
||||
|
||||
@@ -1029,7 +1029,7 @@ static void * eNB_thread_tx(void *param) {
|
||||
(subframe_select(&PHY_vars_eNB_g[0][proc->CC_id]->lte_frame_parms,proc->subframe_tx)==SF_DL))||
|
||||
(PHY_vars_eNB_g[0][proc->CC_id]->lte_frame_parms.frame_type == FDD))) {
|
||||
|
||||
phy_procedures_eNB_TX(proc->subframe,PHY_vars_eNB_g[0][proc->CC_id],0,no_relay,NULL);
|
||||
phy_procedures_eNB_TX( proc->subframe, PHY_vars_eNB_g[0][proc->CC_id], 0, no_relay, NULL );
|
||||
|
||||
}
|
||||
if ((subframe_select(&PHY_vars_eNB_g[0][proc->CC_id]->lte_frame_parms,proc->subframe_tx)==SF_S)) {
|
||||
|
||||
Reference in New Issue
Block a user