Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
OpenXG
OpenXG UE
Commits
69c038b5
Commit
69c038b5
authored
Jan 08, 2021
by
frtabu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add tpool thread name parameter, fi init
parent
caa15144
Changes
4
Show 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 @
69c038b5
...
@@ -92,7 +92,7 @@ void *one_thread(void *arg) {
...
@@ -92,7 +92,7 @@ void *one_thread(void *arg) {
}
while
(
true
);
}
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
));
memset
(
pool
,
0
,
sizeof
(
*
pool
));
char
*
measr
=
getenv
(
"threadPoolMeasurements"
);
char
*
measr
=
getenv
(
"threadPoolMeasurements"
);
pool
->
measurePerf
=
performanceMeas
;
pool
->
measurePerf
=
performanceMeas
;
...
@@ -116,6 +116,7 @@ void initTpool(char *params,tpool_t *pool, bool performanceMeas) {
...
@@ -116,6 +116,7 @@ void initTpool(char *params,tpool_t *pool, bool performanceMeas) {
pool
->
restrictRNTI
=
false
;
pool
->
restrictRNTI
=
false
;
curptr
=
strtok_r
(
parms_cpy
,
","
,
&
saveptr
);
curptr
=
strtok_r
(
parms_cpy
,
","
,
&
saveptr
);
struct
one_thread
*
ptr
;
struct
one_thread
*
ptr
;
char
*
tname
=
(
name
==
NULL
?
"Tpool"
:
name
);
while
(
curptr
!=
NULL
)
{
while
(
curptr
!=
NULL
)
{
int
c
=
toupper
(
curptr
[
0
]);
int
c
=
toupper
(
curptr
[
0
]);
...
@@ -138,7 +139,7 @@ void initTpool(char *params,tpool_t *pool, bool performanceMeas) {
...
@@ -138,7 +139,7 @@ void initTpool(char *params,tpool_t *pool, bool performanceMeas) {
pool
->
allthreads
->
pool
=
pool
;
pool
->
allthreads
->
pool
=
pool
;
//Configure the thread scheduler policy for Linux
//Configure the thread scheduler policy for Linux
// set the thread name for debugging
// 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
,
threadCreate
(
&
pool
->
allthreads
->
threadID
,
one_thread
,
(
void
*
)
pool
->
allthreads
,
pool
->
allthreads
->
name
,
pool
->
allthreads
->
coreID
,
OAI_PRIORITY_RT
);
pool
->
allthreads
->
name
,
pool
->
allthreads
->
coreID
,
OAI_PRIORITY_RT
);
pool
->
nbThreads
++
;
pool
->
nbThreads
++
;
...
...
common/utils/threadPool/thread-pool.h
View file @
69c038b5
...
@@ -294,6 +294,6 @@ static inline int abortTpool(tpool_t *t, uint64_t key) {
...
@@ -294,6 +294,6 @@ static inline int abortTpool(tpool_t *t, uint64_t key) {
mutexunlock
(
nf
->
lockF
);
mutexunlock
(
nf
->
lockF
);
return
nbRemoved
;
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
#endif
executables/nr-uesoftmodem.c
View file @
69c038b5
...
@@ -214,9 +214,9 @@ nrUE_params_t *get_nrUE_params(void) {
...
@@ -214,9 +214,9 @@ nrUE_params_t *get_nrUE_params(void) {
}
}
/* initialie thread pools used for NRUE processing paralleliation */
/* initialie thread pools used for NRUE processing paralleliation */
void
init_tpools
(
uint8_t
nun_dlsch_threads
)
{
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
++
)
{
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
);
initTpool
(
params
,
&
(
nrUE_params
.
Tpool
),
false
);
free
(
params
);
free
(
params
);
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
69c038b5
...
@@ -60,16 +60,16 @@ int nbDlProcessing =0;
...
@@ -60,16 +60,16 @@ int nbDlProcessing =0;
static
tpool_t
pool_dl
;
static
tpool_t
pool_dl
;
//extern double cpuf;
//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
;
return
;
char
*
params
=
calloc
(
1
,(
nu
n_dlsch_threads
*
2
)
+
1
);
char
*
params
=
calloc
(
1
,(
nu
m_dlsch_threads
*
3
)
+
1
);
for
(
int
i
=
0
;
i
<
nu
n
_dlsch_threads
;
i
++
)
{
for
(
int
i
=
0
;
i
<
nu
m
_dlsch_threads
;
i
++
)
{
memcpy
(
params
+
(
i
*
2
),
"-1"
,
2
);
memcpy
(
params
+
(
i
*
3
),
"-1,"
,
3
);
}
}
init
Tpool
(
params
,
&
pool_dl
,
false
);
init
NamedTpool
(
params
,
&
pool_dl
,
false
,
"dlsch"
);
free
(
params
);
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