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
lizhongxiao
OpenXG-RAN
Commits
a9897798
Commit
a9897798
authored
Jan 02, 2019
by
frobinet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BugFix: gNB main() thread shall be shared between at least 2 CPUs during initialization
parent
a0eddd49
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
15 deletions
+8
-15
targets/RT/USER/nr-softmodem.c
targets/RT/USER/nr-softmodem.c
+6
-1
targets/RT/USER/rt_wrapper.c
targets/RT/USER/rt_wrapper.c
+2
-14
No files found.
targets/RT/USER/nr-softmodem.c
View file @
a9897798
...
@@ -1033,8 +1033,13 @@ int main( int argc, char **argv )
...
@@ -1033,8 +1033,13 @@ int main( int argc, char **argv )
char
cpu_affinity
[
1024
];
char
cpu_affinity
[
1024
];
CPU_ZERO
(
&
cpuset
);
CPU_ZERO
(
&
cpuset
);
#ifdef CPU_AFFINITY
#ifdef CPU_AFFINITY
int
j
;
if
(
get_nprocs
()
>
2
)
{
if
(
get_nprocs
()
>
2
)
{
CPU_SET
(
1
,
&
cpuset
);
// CPU_SET(1, &cpuset);
for
(
j
=
2
;
j
<
get_nprocs
();
j
++
)
{
CPU_SET
(
j
,
&
cpuset
);
}
s
=
pthread_setaffinity_np
(
pthread_self
(),
sizeof
(
cpu_set_t
),
&
cpuset
);
s
=
pthread_setaffinity_np
(
pthread_self
(),
sizeof
(
cpu_set_t
),
&
cpuset
);
if
(
s
!=
0
)
{
if
(
s
!=
0
)
{
perror
(
"pthread_setaffinity_np"
);
perror
(
"pthread_setaffinity_np"
);
...
...
targets/RT/USER/rt_wrapper.c
View file @
a9897798
...
@@ -302,23 +302,11 @@ void thread_top_init(char *thread_name,
...
@@ -302,23 +302,11 @@ void thread_top_init(char *thread_name,
#ifdef CPU_AFFINITY
#ifdef CPU_AFFINITY
if
(
get_nprocs
()
>
2
)
if
(
get_nprocs
()
>
2
)
{
if
(
affinity
==
0
)
{
printf
(
"[SYRTEM CPU AFFINITY !!!] ERROR:affinity is 0 -> 2-7 !!!!!!!!!! !!!!!!!!!!
\n
"
);
// CPU_SET(0,&cpuset);
for
(
j
=
2
;
j
<
get_nprocs
();
j
++
)
{
CPU_SET
(
j
,
&
cpuset
);
}
}
else
{
{
for
(
j
=
2
;
j
<
get_nprocs
();
j
++
)
for
(
j
=
2
;
j
<
get_nprocs
();
j
++
)
{
{
CPU_SET
(
j
,
&
cpuset
);
CPU_SET
(
j
,
&
cpuset
);
}
}
}
s
=
pthread_setaffinity_np
(
pthread_self
(),
sizeof
(
cpu_set_t
),
&
cpuset
);
s
=
pthread_setaffinity_np
(
pthread_self
(),
sizeof
(
cpu_set_t
),
&
cpuset
);
if
(
s
!=
0
)
if
(
s
!=
0
)
...
...
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