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
wangjie
OpenXG-RAN
Commits
cbdfc1c9
Commit
cbdfc1c9
authored
Jan 08, 2021
by
frtabu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add tpool thread name parameter, fi init
parent
58309dd7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
13 deletions
+14
-13
common/utils/threadPool/thread-pool.c
common/utils/threadPool/thread-pool.c
+4
-3
common/utils/threadPool/thread-pool.h
common/utils/threadPool/thread-pool.h
+2
-2
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+2
-2
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+6
-6
No files found.
common/utils/threadPool/thread-pool.c
View file @
cbdfc1c9
...
...
@@ -92,7 +92,7 @@ void *one_thread(void *arg) {
}
while
(
true
);
}
void
init
Tpool
(
char
*
params
,
tpool_t
*
pool
,
bool
performanceMeas
)
{
void
init
NamedTpool
(
char
*
params
,
tpool_t
*
pool
,
bool
performanceMeas
,
char
*
name
)
{
memset
(
pool
,
0
,
sizeof
(
*
pool
));
char
*
measr
=
getenv
(
"threadPoolMeasurements"
);
pool
->
measurePerf
=
performanceMeas
;
...
...
@@ -116,6 +116,7 @@ void initTpool(char *params,tpool_t *pool, bool performanceMeas) {
pool
->
restrictRNTI
=
false
;
curptr
=
strtok_r
(
parms_cpy
,
","
,
&
saveptr
);
struct
one_thread
*
ptr
;
char
*
tname
=
(
name
==
NULL
?
"Tpool"
:
name
);
while
(
curptr
!=
NULL
)
{
int
c
=
toupper
(
curptr
[
0
]);
...
...
@@ -129,7 +130,7 @@ void initTpool(char *params,tpool_t *pool, bool performanceMeas) {
break
;
default:
ptr
=
pool
->
allthreads
;
ptr
=
pool
->
allthreads
;
pool
->
allthreads
=
(
struct
one_thread
*
)
malloc
(
sizeof
(
struct
one_thread
));
pool
->
allthreads
->
next
=
ptr
;
printf
(
"create a thread for core %d
\n
"
,
atoi
(
curptr
));
...
...
@@ -138,7 +139,7 @@ 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
(
pool
->
allthreads
->
name
,
"
Tpool_%d"
,
pool
->
allthreads
->
coreID
);
sprintf
(
pool
->
allthreads
->
name
,
"
%s%d_%d"
,
tname
,
pool
->
nbThreads
,
pool
->
allthreads
->
coreID
);
threadCreate
(
&
pool
->
allthreads
->
threadID
,
one_thread
,
(
void
*
)
pool
->
allthreads
,
pool
->
allthreads
->
name
,
pool
->
allthreads
->
coreID
,
OAI_PRIORITY_RT
);
pool
->
nbThreads
++
;
...
...
common/utils/threadPool/thread-pool.h
View file @
cbdfc1c9
...
...
@@ -294,6 +294,6 @@ static inline int abortTpool(tpool_t *t, uint64_t key) {
mutexunlock
(
nf
->
lockF
);
return
nbRemoved
;
}
void
init
Tpool
(
char
*
params
,
tpool_t
*
pool
,
bool
performanceMeas
);
void
init
NamedTpool
(
char
*
params
,
tpool_t
*
pool
,
bool
performanceMeas
,
char
*
name
);
#define initTpool(PARAMPTR,TPOOLPTR, MEASURFLAG) initNamedTpool(PARAMPTR,TPOOLPTR, MEASURFLAG, NULL)
#endif
executables/nr-uesoftmodem.c
View file @
cbdfc1c9
...
...
@@ -214,9 +214,9 @@ nrUE_params_t *get_nrUE_params(void) {
}
/* initialie thread pools used for NRUE processing paralleliation */
void
init_tpools
(
uint8_t
nun_dlsch_threads
)
{
char
*
params
=
calloc
(
1
,(
RX_NB_TH
*
2
)
+
1
);
char
*
params
=
calloc
(
1
,(
RX_NB_TH
*
3
)
+
1
);
for
(
int
i
=
0
;
i
<
RX_NB_TH
;
i
++
)
{
memcpy
(
params
+
(
i
*
2
),
"-1"
,
2
);
memcpy
(
params
+
(
i
*
3
),
"-1,"
,
3
);
}
initTpool
(
params
,
&
(
nrUE_params
.
Tpool
),
false
);
free
(
params
);
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
cbdfc1c9
...
...
@@ -60,16 +60,16 @@ int nbDlProcessing =0;
static
tpool_t
pool_dl
;
//extern double cpuf;
void
init_dlsch_tpool
(
uint8_t
nu
n
_dlsch_threads
)
void
init_dlsch_tpool
(
uint8_t
nu
m
_dlsch_threads
)
{
if
(
nu
n
_dlsch_threads
==
0
)
if
(
nu
m
_dlsch_threads
==
0
)
return
;
char
*
params
=
calloc
(
1
,(
nu
n_dlsch_threads
*
2
)
+
1
);
for
(
int
i
=
0
;
i
<
nu
n
_dlsch_threads
;
i
++
)
{
memcpy
(
params
+
(
i
*
2
),
"-1"
,
2
);
char
*
params
=
calloc
(
1
,(
nu
m_dlsch_threads
*
3
)
+
1
);
for
(
int
i
=
0
;
i
<
nu
m
_dlsch_threads
;
i
++
)
{
memcpy
(
params
+
(
i
*
3
),
"-1,"
,
3
);
}
init
Tpool
(
params
,
&
pool_dl
,
false
);
init
NamedTpool
(
params
,
&
pool_dl
,
false
,
"dlsch"
);
free
(
params
);
}
...
...
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