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
Michael Black
OpenXG-RAN
Commits
446e0c75
Commit
446e0c75
authored
Apr 12, 2016
by
Rohit Gupta
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hotfix-106-usrp_rt_dc_offset' into bugfix-48-L1L2signaling
parents
20e24609
6e5d7cdd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
29 deletions
+36
-29
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+36
-29
No files found.
targets/RT/USER/lte-softmodem.c
View file @
446e0c75
...
@@ -3302,39 +3302,46 @@ int main( int argc, char **argv )
...
@@ -3302,39 +3302,46 @@ int main( int argc, char **argv )
}
}
#ifndef LOWLATENCY
#ifndef LOWLATENCY
cpu_set_t
cpuset
;
int
s
;
char
cpu_affinity
[
1024
];
LOG_I
(
HW
,
"Setting the affinity of main function to CPU 0, for device library to use CPU 0 only!
\n
"
);
CPU_ZERO
(
&
cpuset
);
CPU_SET
(
0
,
&
cpuset
);
s
=
pthread_setaffinity_np
(
pthread_self
(),
sizeof
(
cpu_set_t
),
&
cpuset
);
/* Currently we set affinity for UHD to CPU 0 for eNB only and only if number of CPUS >2 */
if
(
s
!=
0
)
/* ToDo: Set CPU affinity for UE */
if
(
UE_flag
==
0
&&
get_nprocs
()
>
2
)
{
{
perror
(
"pthread_setaffinity_np"
);
cpu_set_t
cpuset
;
exit_fun
(
"Error setting processor affinity"
);
int
s
;
}
char
cpu_affinity
[
1024
];
/* Check the actual affinity mask assigned to the thread */
s
=
pthread_getaffinity_np
(
pthread_self
(),
sizeof
(
cpu_set_t
),
&
cpuset
);
LOG_I
(
HW
,
"Setting the affinity of main function to CPU 0, for device library to use CPU 0 only!
\n
"
);
if
(
s
!=
0
)
{
CPU_ZERO
(
&
cpuset
);
perror
(
"pthread_getaffinity_np"
);
CPU_SET
(
0
,
&
cpuset
);
exit_fun
(
"Error getting processor affinity "
);
}
s
=
pthread_setaffinity_np
(
pthread_self
(),
sizeof
(
cpu_set_t
),
&
cpuset
);
memset
(
cpu_affinity
,
0
,
sizeof
(
cpu_affinity
));
if
(
s
!=
0
)
for
(
int
j
=
0
;
j
<
CPU_SETSIZE
;
j
++
)
{
if
(
CPU_ISSET
(
j
,
&
cpuset
))
perror
(
"pthread_setaffinity_np"
);
{
exit_fun
(
"Error setting processor affinity"
);
char
temp
[
1024
];
}
sprintf
(
temp
,
" CPU_%d "
,
j
);
strcat
(
cpu_affinity
,
temp
);
/* Check the actual affinity mask assigned to the thread */
s
=
pthread_getaffinity_np
(
pthread_self
(),
sizeof
(
cpu_set_t
),
&
cpuset
);
if
(
s
!=
0
)
{
perror
(
"pthread_getaffinity_np"
);
exit_fun
(
"Error getting processor affinity "
);
}
memset
(
cpu_affinity
,
0
,
sizeof
(
cpu_affinity
));
for
(
int
j
=
0
;
j
<
CPU_SETSIZE
;
j
++
)
{
if
(
CPU_ISSET
(
j
,
&
cpuset
))
{
char
temp
[
1024
];
sprintf
(
temp
,
" CPU_%d "
,
j
);
strcat
(
cpu_affinity
,
temp
);
}
}
LOG_I
(
HW
,
"CPU Affinity of main() function is... %s
\n
"
,
cpu_affinity
);
}
}
LOG_I
(
HW
,
"CPU Affinity of main() function is... %s
\n
"
,
cpu_affinity
);
#endif
#endif
/* device host type is set*/
/* device host type is set*/
...
...
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