Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
2
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
09f6acf
Documentation
arch
block
certs
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
arch
build
cgroup
firewire
hv
iio
include
laptop
lguest
lib
api
fd
fs
Build
Makefile
cpu.c
cpu.h
bpf
lockdep
symbol
traceevent
util
hweight.c
rbtree.c
net
nfsd
perf
power
scripts
testing
thermal
time
usb
virtio
vm
Makefile
usr
virt
.get_maintainer.ignore
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
REPORTING-BUGS
Breadcrumbs
linux
/
tools
/
lib
/
api
/
cpu.c
Blame
Blame
Latest commit
History
History
18 lines (13 loc) · 351 Bytes
Breadcrumbs
linux
/
tools
/
lib
/
api
/
cpu.c
Top
File metadata and controls
Code
Blame
18 lines (13 loc) · 351 Bytes
Raw
#include <stdio.h> #include "cpu.h" #include "fs/fs.h" int cpu__get_max_freq(unsigned long long *freq) { char entry[PATH_MAX]; int cpu; if (sysfs__read_int("devices/system/cpu/online", &cpu) < 0) return -1; snprintf(entry, sizeof(entry), "devices/system/cpu/cpu%d/cpufreq/cpuinfo_max_freq", cpu); return sysfs__read_ull(entry, freq); }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
You can’t perform that action at this time.