compel: Move cpu interface to compel

We will need it when parasite engine will be creating signal frames.
Export appropriate headers and use it in CRIU by linking with libcompel.a.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Cyrill Gorcunov 2016-10-19 14:06:56 +03:00 committed by Andrei Vagin
parent 1a30731b1f
commit aabb45bece
29 changed files with 365 additions and 218 deletions

14
compel/include/uapi/cpu.h Normal file
View file

@ -0,0 +1,14 @@
#ifndef UAPI_COMPEL_CPU_H__
#define UAPI_COMPEL_CPU_H__
#include <stdbool.h>
#include <compel/asm/cpu.h>
extern void compel_set_cpu_cap(compel_cpuinfo_t *info, unsigned int feature);
extern void compel_clear_cpu_cap(compel_cpuinfo_t *info, unsigned int feature);
extern int compel_test_cpu_cap(compel_cpuinfo_t *info, unsigned int feature);
extern int compel_cpuid(compel_cpuinfo_t *info);
extern bool cpu_has_feature(unsigned int feature);
#endif /* UAPI_COMPEL_CPU_H__ */