Commit 98044041 authored by Florian Kaltenberger's avatar Florian Kaltenberger

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6525 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 80957a42
...@@ -111,19 +111,9 @@ struct sched_param sched_param_UE_init_synch; ...@@ -111,19 +111,9 @@ struct sched_param sched_param_UE_init_synch;
struct sched_param sched_param_UE_thread_tx; struct sched_param sched_param_UE_thread_tx;
struct sched_param sched_param_UE_thread_rx; struct sched_param sched_param_UE_thread_rx;
#ifdef RTAI
extern SEM *mutex;
//static CND *cond;
extern SEM *sync_sem; // to sync rx & tx streaming
//static int sync_thread;
#else
extern pthread_cond_t sync_cond; extern pthread_cond_t sync_cond;
extern pthread_mutex_t sync_mutex; extern pthread_mutex_t sync_mutex;
extern int sync_var; extern int sync_var;
#endif
extern openair0_config_t openair0_cfg[MAX_CARDS]; extern openair0_config_t openair0_cfg[MAX_CARDS];
extern uint32_t downlink_frequency[MAX_NUM_CCs][4]; extern uint32_t downlink_frequency[MAX_NUM_CCs][4];
...@@ -453,8 +443,6 @@ static void *UE_thread_tx(void *arg) { ...@@ -453,8 +443,6 @@ static void *UE_thread_tx(void *arg) {
pthread_mutex_unlock(&sync_mutex); pthread_mutex_unlock(&sync_mutex);
printf("unlocked sync_mutex, waiting (UE_thread_tx)\n"); printf("unlocked sync_mutex, waiting (UE_thread_tx)\n");
printf("Starting UE TX thread\n"); printf("Starting UE TX thread\n");
mlockall(MCL_CURRENT | MCL_FUTURE); mlockall(MCL_CURRENT | MCL_FUTURE);
...@@ -585,19 +573,14 @@ static void *UE_thread_rx(void *arg) { ...@@ -585,19 +573,14 @@ static void *UE_thread_rx(void *arg) {
mlockall(MCL_CURRENT | MCL_FUTURE); mlockall(MCL_CURRENT | MCL_FUTURE);
#ifndef EXMIMO
printf("waiting for sync (UE_thread_rx)\n"); printf("waiting for sync (UE_thread_rx)\n");
#ifdef RTAI
rt_sem_wait(sync_sem);
#else
pthread_mutex_lock(&sync_mutex); pthread_mutex_lock(&sync_mutex);
printf("Locked sync_mutex, waiting (UE_thread_rx)\n"); printf("Locked sync_mutex, waiting (UE_thread_rx)\n");
while (sync_var<0) while (sync_var<0)
pthread_cond_wait(&sync_cond, &sync_mutex); pthread_cond_wait(&sync_cond, &sync_mutex);
pthread_mutex_unlock(&sync_mutex); pthread_mutex_unlock(&sync_mutex);
printf("unlocked sync_mutex, waiting (UE_thread_rx)\n"); printf("unlocked sync_mutex, waiting (UE_thread_rx)\n");
#endif
#endif
printf("Starting UE RX thread\n"); printf("Starting UE RX thread\n");
...@@ -682,7 +665,7 @@ static void *UE_thread_rx(void *arg) { ...@@ -682,7 +665,7 @@ static void *UE_thread_rx(void *arg) {
} }
} }
return(0); return(0);
} }
......
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