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
096a32bf
Commit
096a32bf
authored
Jan 03, 2023
by
Karim Harouat
Committed by
Robert Schmidt
Jan 12, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
system.c : cleaning check result of system call
parent
1a0c0cd1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
common/utils/system.c
common/utils/system.c
+8
-3
No files found.
common/utils/system.c
View file @
096a32bf
...
...
@@ -366,9 +366,14 @@ void set_latency_target(void) {
LOG_E
(
HW
,
"Can't set /dev/cpu_dma_latency to %u us
\n
"
,
latency_target_value
);
// Set CPU frequency to it's maximum
if
(
0
!=
system
(
"for d in /sys/devices/system/cpu/cpu[0-9]*; do cat $d/cpufreq/cpuinfo_max_freq > $d/cpufreq/scaling_min_freq; done"
))
LOG_E
(
HW
,
"Can't set cpu frequency
\n
"
);
int
system_ret
=
system
(
"for d in /sys/devices/system/cpu/cpu[0-9]*; do cat $d/cpufreq/cpuinfo_max_freq > $d/cpufreq/scaling_min_freq; done"
);
if
(
system_ret
==
-
1
)
{
LOG_E
(
HW
,
"Can't set cpu frequency: [%d] %s
\n
"
,
errno
,
strerror
(
errno
));
return
;
}
if
(
!
((
WIFEXITED
(
system_ret
))
&&
(
WEXITSTATUS
(
system_ret
)
==
0
)))
{
LOG_E
(
HW
,
"Can't set cpu frequency
\n
"
);
}
mlockall
(
MCL_CURRENT
|
MCL_FUTURE
);
}
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