Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ZhouShuya
OpenXG-RAN
Commits
ba6d47a7
Commit
ba6d47a7
authored
Apr 30, 2019
by
laurent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rework threads in 5G
parent
4d787625
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
10 additions
and
17 deletions
+10
-17
common/utils/threadPool/thread-pool.c
common/utils/threadPool/thread-pool.c
+3
-2
executables/nr-gnb.c
executables/nr-gnb.c
+0
-3
executables/nr-ru.c
executables/nr-ru.c
+1
-6
executables/nr-softmodem.c
executables/nr-softmodem.c
+0
-1
executables/nr-ue.c
executables/nr-ue.c
+1
-1
openair1/SCHED/ru_procedures.c
openair1/SCHED/ru_procedures.c
+3
-2
openair1/SCHED_NR/nr_ru_procedures.c
openair1/SCHED_NR/nr_ru_procedures.c
+0
-1
openair3/SCTP/sctp_eNB_task.c
openair3/SCTP/sctp_eNB_task.c
+1
-0
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+1
-1
No files found.
common/utils/threadPool/thread-pool.c
View file @
ba6d47a7
...
...
@@ -117,8 +117,9 @@ void initTpool(char *params,tpool_t *pool, bool performanceMeas) {
pool
->
allthreads
->
pool
=
pool
;
//Configure the thread scheduler policy for Linux
// set the thread name for debugging
sprintf
(
myThread
->
name
,
"Tpool_%d"
,
myThread
->
coreID
);
threadCreate
(
&
pool
->
allthreads
->
threadID
,
one_thread
,
(
void
*
)
pool
->
allthreads
,
Tpool
,
myThread
->
name
,
myThread
->
coreID
,
OAI_PRIORITY_RT
);
sprintf
(
pool
->
allthreads
->
name
,
"Tpool_%d"
,
pool
->
allthreads
->
coreID
);
threadCreate
(
&
pool
->
allthreads
->
threadID
,
one_thread
,
(
void
*
)
pool
->
allthreads
,
pool
->
allthreads
->
name
,
pool
->
allthreads
->
coreID
,
OAI_PRIORITY_RT
);
pool
->
nbThreads
++
;
}
...
...
executables/nr-gnb.c
View file @
ba6d47a7
...
...
@@ -272,7 +272,6 @@ static void *gNB_L1_thread_tx(void *param) {
//PHY_VARS_gNB *gNB = RC.gNB[0][proc->CC_id];
char
thread_name
[
100
];
sprintf
(
thread_name
,
"TXnp4_%d
\n
"
,
&
gNB
->
proc
.
L1_proc
==
proc
?
0
:
1
);
//thread_top_init(thread_name,1,470000,500000,500000);
//wait_sync("tx_thread");
...
...
@@ -327,7 +326,6 @@ static void *gNB_L1_thread( void *param ) {
// set default return value
gNB_thread_rxtx_status
=
0
;
sprintf
(
thread_name
,
"RXn_TXnp4_%d"
,
&
gNB
->
proc
.
L1_proc
==
proc
?
0
:
1
);
//thread_top_init(thread_name,1,850000L,1000000L,2000000L);
while
(
!
oai_exit
)
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX0
,
0
);
...
...
@@ -651,7 +649,6 @@ static void* gNB_thread_prach( void* param ) {
// set default return value
gNB_thread_prach_status = 0;
thread_top_init("gNB_thread_prach",1,500000L,1000000L,20000000L);
while (!oai_exit) {
...
...
executables/nr-ru.c
View file @
ba6d47a7
...
...
@@ -777,7 +777,6 @@ static void *ru_thread_asynch_rxtx( void *param ) {
RU_t
*
ru
=
(
RU_t
*
)
param
;
RU_proc_t
*
proc
=
&
ru
->
proc
;
int
subframe
=
0
,
frame
=
0
;
thread_top_init
(
"ru_thread_asynch_rxtx"
,
1
,
870000L
,
1000000L
,
1000000L
);
// wait for top-level synchronization and do one acquisition to get timestamp for setting frame/subframe
wait_sync
(
"ru_thread_asynch_rxtx"
);
// wait for top-level synchronization and do one acquisition to get timestamp for setting frame/subframe
...
...
@@ -825,7 +824,6 @@ static void *ru_thread_prach( void *param ) {
RU_proc_t
*
proc
=
(
RU_proc_t
*
)
&
ru
->
proc
;
// set default return value
ru_thread_prach_status
=
0
;
thread_top_init
(
"ru_thread_prach"
,
1
,
500000L
,
1000000L
,
20000000L
);
while
(
RC
.
ru_mask
>
0
)
{
usleep
(
1e6
);
...
...
@@ -1211,7 +1209,6 @@ static void *ru_thread_tx( void *param ) {
int
i
=
0
;
cpu_set_t
cpuset
;
CPU_ZERO
(
&
cpuset
);
thread_top_init
(
"ru_thread_tx"
,
1
,
400000
,
500000
,
500000
);
//CPU_SET(5, &cpuset);
//pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
//wait_sync("ru_thread_tx");
...
...
@@ -1324,7 +1321,6 @@ static void *ru_thread( void *param ) {
ru_thread_status
=
0
;
// set default return value
sprintf
(
threadname
,
"ru_thread %d"
,
ru
->
idx
);
thread_top_init
(
threadname
,
0
,
870000
,
1000000
,
1000000
);
LOG_I
(
PHY
,
"Starting RU %d (%s,%s),
\n
"
,
ru
->
idx
,
NB_functions
[
ru
->
function
],
NB_timing
[
ru
->
if_timing
]);
if
(
emulate_rf
)
{
...
...
@@ -1507,7 +1503,6 @@ void *ru_thread_synch(void *arg) {
static int ru_thread_synch_status;
thread_top_init("ru_thread_synch",0,5000000,10000000,10000000);
wait_sync("ru_thread_synch");
...
...
@@ -1633,7 +1628,7 @@ void init_RU_proc(RU_t *ru) {
pthread_cond_init
(
&
proc
->
cond_asynch_rxtx
,
NULL
);
pthread_cond_init
(
&
proc
->
cond_synch
,
NULL
);
pthread_cond_init
(
&
proc
->
cond_gNBs
,
NULL
);
threadCreate
(
&
proc
->
pthread_FH
,
ru_thread
,
(
void
*
)
ru
,
"thread_FH"
,
-
1
,
OAI_PRIORITY_RT
);
threadCreate
(
&
proc
->
pthread_FH
,
ru_thread
,
(
void
*
)
ru
,
"thread_FH"
,
-
1
,
OAI_PRIORITY_RT
_MAX
);
if
(
get_thread_parallel_conf
()
==
PARALLEL_RU_L1_SPLIT
||
get_thread_parallel_conf
()
==
PARALLEL_RU_L1_TRX_SPLIT
)
threadCreate
(
&
proc
->
pthread_FH1
,
ru_thread_tx
,
(
void
*
)
ru
,
"thread_FH1"
,
-
1
,
OAI_PRIORITY_RT
);
...
...
executables/nr-softmodem.c
View file @
ba6d47a7
...
...
@@ -1065,7 +1065,6 @@ int main( int argc, char **argv ) {
}
// UE_id
threadCreate
(
&
forms_thread
,
scope_thread
,
NULL
,
"scope"
,
-
1
,
OAI_PRIORITY_RT_LOW
);
printf
(
"Scope thread created, ret=%d
\n
"
,
ret
);
}
...
...
executables/nr-ue.c
View file @
ba6d47a7
...
...
@@ -760,7 +760,7 @@ void init_UE(int nb_inst) {
mac_inst
->
initial_bwp_ul
.
N_RB
=
UE
->
frame_parms
.
N_RB_UL
;
mac_inst
->
initial_bwp_ul
.
cyclic_prefix
=
UE
->
frame_parms
.
Ncp
;
LOG_I
(
PHY
,
"Intializing UE Threads for instance %d (%p,%p)...
\n
"
,
inst
,
PHY_vars_UE_g
[
inst
],
PHY_vars_UE_g
[
inst
][
0
]);
threadCreate
(
&
threads
[
inst
],
UE_thread
,
(
void
*
)
UE
),
"UEthread"
,
-
1
,
OAI_PRIORITY_RT
);
threadCreate
(
&
threads
[
inst
],
UE_thread
,
(
void
*
)
UE
,
"UEthread"
,
-
1
,
OAI_PRIORITY_RT_MAX
);
}
printf
(
"UE threads created by %ld
\n
"
,
gettid
());
...
...
openair1/SCHED/ru_procedures.c
View file @
ba6d47a7
...
...
@@ -44,6 +44,7 @@
#include "assertions.h"
#include "common/utils/system.h"
#include "msc.h"
#include <time.h>
...
...
@@ -483,7 +484,7 @@ void init_feptx_thread(RU_t *ru,pthread_attr_t *attr_feptx) {
pthread_mutex_init
(
&
proc
->
mutex_feptx
,
NULL
);
pthread_cond_init
(
&
proc
->
cond_feptx
,
NULL
);
pthread_create
(
&
proc
->
pthread_feptx
,
attr_feptx
,
feptx_thread
,
(
void
*
)
ru
);
threadCreate
(
&
proc
->
pthread_feptx
,
feptx_thread
,
(
void
*
)
ru
,
"feptx"
,
-
1
,
OAI_PRIORITY_RT
);
}
...
...
@@ -497,7 +498,7 @@ void init_fep_thread(RU_t *ru,pthread_attr_t *attr_fep) {
pthread_mutex_init
(
&
proc
->
mutex_fep
,
NULL
);
pthread_cond_init
(
&
proc
->
cond_fep
,
NULL
);
pthread_create
(
&
proc
->
pthread_fep
,
attr_fep
,
fep_thread
,
(
void
*
)
ru
);
threadCreate
(
&
proc
->
pthread_fep
,
fep_thread
,
(
void
*
)
ru
,
"fep"
,
-
1
,
OAI_PRIORITY_RT
);
}
...
...
openair1/SCHED_NR/nr_ru_procedures.c
View file @
ba6d47a7
...
...
@@ -180,7 +180,6 @@ static void *nr_feptx_thread(void *param) {
RU_t
*
ru
=
(
RU_t
*
)
param
;
RU_proc_t
*
proc
=
&
ru
->
proc
;
thread_top_init
(
"nr_feptx_thread"
,
0
,
870000
,
1000000
,
1000000
);
while
(
!
oai_exit
)
{
...
...
openair3/SCTP/sctp_eNB_task.c
View file @
ba6d47a7
...
...
@@ -40,6 +40,7 @@
#include <arpa/inet.h>
#include "assertions.h"
#include "common/utils/system.h"
#include "queue.h"
#include "intertask_interface.h"
...
...
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
ba6d47a7
...
...
@@ -299,6 +299,7 @@ static int trx_usrp_start(openair0_device *device) {
if
(
u_sf_mode
!=
2
)
{
// not replay mode
#endif
uhd
::
set_thread_priority_safe
(
1.0
);
usrp_state_t
*
s
=
(
usrp_state_t
*
)
device
->
priv
;
// setup GPIO for TDD, GPIO(4) = ATR_RX
//set data direction register (DDR) to output
...
...
@@ -1038,7 +1039,6 @@ extern "C" {
<<
use_mmap
<<
std
::
endl
;
}
else
{
#endif
uhd
::
set_thread_priority_safe
(
1.0
);
usrp_state_t
*
s
=
(
usrp_state_t
*
)
calloc
(
sizeof
(
usrp_state_t
),
1
);
if
(
openair0_cfg
[
0
].
clock_source
==
gpsdo
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment