2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-04 00:05:26 +00:00

common: Move in bit operation helpers

travis-ci: success for Common headers
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
Cyrill Gorcunov
2016-10-24 14:58:09 +03:00
committed by Pavel Emelyanov
parent 4485723f80
commit 49883d681f
20 changed files with 21 additions and 13 deletions

View File

@@ -7,7 +7,7 @@
#include "images/core.pb-c.h" #include "images/core.pb-c.h"
#include "asm/page.h" #include "asm/page.h"
#include "asm/bitops.h" #include "bitops.h"
#include "asm/int.h" #include "asm/int.h"

View File

@@ -6,7 +6,7 @@
#include "images/core.pb-c.h" #include "images/core.pb-c.h"
#include "asm/page.h" #include "asm/page.h"
#include "asm/bitops.h" #include "bitops.h"
#include "asm/int.h" #include "asm/int.h"
#define SIGMAX 64 #define SIGMAX 64

View File

@@ -6,7 +6,7 @@
#include "images/core.pb-c.h" #include "images/core.pb-c.h"
#include "asm/page.h" #include "asm/page.h"
#include "asm/bitops.h" #include "bitops.h"
#include "asm/int.h" #include "asm/int.h"
/* /*

View File

@@ -6,7 +6,7 @@
#include <sys/types.h> #include <sys/types.h>
#include "asm/bitops.h" #include "bitops.h"
#include "asm/types.h" #include "asm/types.h"
#include "asm/cpu.h" #include "asm/cpu.h"
#include "asm/fpu.h" #include "asm/fpu.h"

View File

@@ -5,7 +5,7 @@
#include <signal.h> #include <signal.h>
#include "asm/page.h" #include "asm/page.h"
#include "asm/bitops.h" #include "bitops.h"
#include "asm/int.h" #include "asm/int.h"
#include "images/core.pb-c.h" #include "images/core.pb-c.h"

View File

@@ -1,4 +1,4 @@
#include "bitsperlong.h" #include "common/bitsperlong.h"
#define BIT_WORD(nr) ((nr) / BITS_PER_LONG) #define BIT_WORD(nr) ((nr) / BITS_PER_LONG)

View File

@@ -1,4 +1,4 @@
#ifndef __CR_INC_BITOPS_H__ #ifndef __CR_INC_BITOPS_H__
#define __CR_INC_BITOPS_H__ #define __CR_INC_BITOPS_H__
#include "asm/bitops.h" #include "common/bitops.h"
#endif #endif

View File

@@ -1,4 +1,4 @@
#ifndef __CR_INC_BITSPERLONG_H__ #ifndef __CR_INC_BITSPERLONG_H__
#define __CR_INC_BITSPERLONG_H__ #define __CR_INC_BITSPERLONG_H__
#include "asm/bitsperlong.h" #include "common/bitsperlong.h"
#endif #endif

View File

@@ -2,7 +2,7 @@
#include "int.h" #include "int.h"
#include "types.h" #include "types.h"
#include "bitsperlong.h" #include "common/bitsperlong.h"
#include "syscall.h" #include "syscall.h"
#include "log.h" #include "log.h"

View File

@@ -2,6 +2,6 @@
#define __CR_ASM_BITOPS_H__ #define __CR_ASM_BITOPS_H__
#include "common/compiler.h" #include "common/compiler.h"
#include "asm-generic/bitops.h" #include "common/asm-generic/bitops.h"
#endif /* __CR_ASM_BITOPS_H__ */ #endif /* __CR_ASM_BITOPS_H__ */

View File

@@ -2,6 +2,6 @@
#define __CR_ASM_BITOPS_H__ #define __CR_ASM_BITOPS_H__
#include "common/compiler.h" #include "common/compiler.h"
#include "asm-generic/bitops.h" #include "common/asm-generic/bitops.h"
#endif /* __CR_ASM_BITOPS_H__ */ #endif /* __CR_ASM_BITOPS_H__ */

View File

@@ -40,7 +40,7 @@
#include "common/compiler.h" #include "common/compiler.h"
#include "asm/bitsperlong.h" #include "common/asm/bitsperlong.h"
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
#define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_LONG) #define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_LONG)

View File

@@ -1,7 +1,7 @@
#ifndef __CR_BITOPS_H__ #ifndef __CR_BITOPS_H__
#define __CR_BITOPS_H__ #define __CR_BITOPS_H__
#include "asm/bitsperlong.h" #include "common/asm/bitsperlong.h"
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
#define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_LONG) #define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_LONG)

4
include/common/bitops.h Normal file
View File

@@ -0,0 +1,4 @@
#ifndef __CR_COMMON_BITOPS_H__
#define __CR_COMMON_BITOPS_H__
#include "asm/bitops.h"
#endif

View File

@@ -0,0 +1,4 @@
#ifndef __CR_COMMON_BITSPERLONG_H__
#define __CR_COMMON_BITSPERLONG_H__
#include "asm/bitsperlong.h"
#endif