blob: 677ff12ce56b7729c2e1608a96268a9c5947d6c7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
/* Copyright (c) 2013, Linaro Limited
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/**
* @file
*
* ODP alignments
*/
#ifndef ODP_API_ALIGN_H_
#define ODP_API_ALIGN_H_
#ifdef __cplusplus
extern "C" {
#endif
/** @addtogroup odp_compiler_optim
* Macros that allow cache line size configuration, check that
* alignment is a power of two etc.
* @{
*/
/* Checkpatch complains, but cannot use __aligned(size) for this purpose. */
/**
* @def ODP_ALIGNED
* Defines type/struct/variable alignment in bytes
*/
/**
* @def ODP_PACKED
* Defines type/struct to be packed
*/
/**
* @def ODP_OFFSETOF
* Returns offset of member in type
*/
/**
* @def ODP_FIELD_SIZEOF
* Returns sizeof member
*/
/**
* @def ODP_CACHE_LINE_SIZE
* Cache line size
*/
/**
* @def ODP_PAGE_SIZE
* Page size
*/
/**
* @def ODP_ALIGNED_CACHE
* Defines type/struct/variable to be cache line size aligned
*/
/**
* @def ODP_ALIGNED_PAGE
* Defines type/struct/variable to be page size aligned
*/
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif
|