mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 22:05:36 +00:00
cpu: Make cpu routines being per-acrh
They are really depends on CPU we're running on. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
f50f7d01ec
commit
fcb9a9bfb1
10
proc_parse.c
10
proc_parse.c
@@ -35,7 +35,7 @@ static char *buf = __buf.buf;
|
||||
|
||||
#define BUF_SIZE sizeof(__buf.buf)
|
||||
|
||||
int parse_cpuinfo_features(void)
|
||||
int parse_cpuinfo_features(int (*handler)(char *tok))
|
||||
{
|
||||
FILE *cpuinfo;
|
||||
|
||||
@@ -53,12 +53,8 @@ int parse_cpuinfo_features(void)
|
||||
|
||||
for (tok = strtok(buf, " \t\n"); tok;
|
||||
tok = strtok(NULL, " \t\n")) {
|
||||
if (!strcmp(tok, x86_cap_flags[X86_FEATURE_FXSR]))
|
||||
cpu_set_feature(X86_FEATURE_FXSR);
|
||||
else if (!strcmp(tok, x86_cap_flags[X86_FEATURE_XSAVE]))
|
||||
cpu_set_feature(X86_FEATURE_XSAVE);
|
||||
else if (!strcmp(tok, x86_cap_flags[X86_FEATURE_FPU]))
|
||||
cpu_set_feature(X86_FEATURE_FPU);
|
||||
if (handler(tok) < 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user