From 7d154e4c256ccbfdeb8ba2b301706202c00a7a42 Mon Sep 17 00:00:00 2001 From: winckel Date: Mon, 3 Feb 2014 14:28:54 +0000 Subject: [PATCH] Changed L2L1 task start and termination control. git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5011 818b1a75-f10b-46b9-bf7c-635c3b92a50f --- targets/SIMU/USER/oaisim.c | 39 +++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/targets/SIMU/USER/oaisim.c b/targets/SIMU/USER/oaisim.c index bdf805958a..319f7363e7 100644 --- a/targets/SIMU/USER/oaisim.c +++ b/targets/SIMU/USER/oaisim.c @@ -375,18 +375,30 @@ static s32 UE_id = 0, eNB_id = 0; static s32 RN_id=0; #endif +Packet_OTG_List *otg_pdcp_buffer; + +typedef enum l2l1_task_state_e +{ + L2L1_WAITTING, + L2L1_RUNNING, + L2L1_TERMINATED, +} l2l1_task_state_t; + +/*------------------------------------------------------------------------------*/ void *l2l1_task(void *args_p) { + l2l1_task_state_t l2l1_state = L2L1_WAITTING; + clock_t t; + // Framing variables - s32 slot, last_slot, next_slot; + s32 slot, last_slot, next_slot; #ifdef Rel10 - relaying_type_t r_type=no_relay; // no relaying + relaying_type_t r_type = no_relay; // no relaying #endif - lte_subframe_t direction; - - char fname[64], vname[64]; + lte_subframe_t direction; + char fname[64], vname[64]; #ifdef XFORMS // current status is that every UE has a DL scope for a SINGLE eNB (eNB_id=0) @@ -432,7 +444,6 @@ void *l2l1_task(void *args_p) { } #endif - #ifdef PRINT_STATS for (UE_id=0;UE_id= 0) { - itti_wait_tasks_end(); + itti_wait_tasks_end(); } else { exit(-1); // need a softer mode } @@ -1091,7 +1101,6 @@ int main(int argc, char **argv) { } l2l1_task (NULL); #endif - t = clock () - t; LOG_I (EMU,"Duration of the simulation: %f seconds\n", ((float) t) / CLOCKS_PER_SEC);