forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadsp_stddef.h
More file actions
83 lines (64 loc) · 1.42 KB
/
adsp_stddef.h
File metadata and controls
83 lines (64 loc) · 1.42 KB
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
78
79
80
81
82
83
// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright(c) 2021 Intel Corporation. All rights reserved.
#ifndef _ADSP_STDDEF_H_
#define _ADSP_STDDEF_H_
#include <stddef.h>
#include <stdint.h>
#if defined(XTENSA_TOOLSCHAIN) || defined(__XCC__)
#include <xtensa/config/tie.h>
#endif
#ifndef XCHAL_CP1_SA_ALIGN
#define XCHAL_CP1_SA_ALIGN sizeof(intptr_t)
#endif
#ifdef __GNUC__
#define ALIGNED(x) __attribute__((aligned((x))))
#else
#define ALIGNED(x)
#endif
#define DCACHE_ALIGNED ALIGNED(64)
#ifdef __XTENSA__
#define RESTRICT __restrict
#else
#define RESTRICT
#endif
#define MODULE_INSTANCE_ALIGNMENT 4096
#ifndef MIN
#define MIN(a,b) ((a<b) ? a : b)
#endif
#ifndef MAX
#define MAX(a,b) ((a<b) ? b : a)
#endif
#ifdef __cplusplus
namespace intel_adsp
{
struct ModulePlaceholder {};
}
inline void* operator new(size_t size, intel_adsp::ModulePlaceholder* placeholder) throw()
{
(void)size;
return placeholder;
}
#endif //#ifdef __cplusplus
#define ADSP_BUILD_INFO_FORMAT 0
/*! \cond INTERNAL */
typedef union AdspApiVersion
{
uint32_t full;
struct
{
uint32_t minor : 10;
uint32_t middle : 10;
uint32_t major : 10;
uint32_t reserved : 2;
} fields;
} AdspApiVersion;
/*! \endcond INTERNAL */
/*! \cond INTERNAL */
typedef const struct
{
uint32_t FORMAT;
AdspApiVersion API_VERSION_NUMBER;
} AdspBuildInfo;
/*! \endcond INTERNAL */
#endif //_ADSP_STDDEF_H_