xref: /netbsd-src/sys/external/bsd/acpica/dist/include/platform/acqnx.h (revision 046a29855e04359424fd074e8313af6b6be8cfb6)
1cfbb7280Schristos /******************************************************************************
2cfbb7280Schristos  *
3cfbb7280Schristos  * Name: acqnx.h - OS specific defines, etc.
4cfbb7280Schristos  *
5cfbb7280Schristos  *****************************************************************************/
6cfbb7280Schristos 
7cfbb7280Schristos /*
8*046a2985Schristos  * Copyright (C) 2000 - 2023, Intel Corp.
9cfbb7280Schristos  * All rights reserved.
10cfbb7280Schristos  *
11cfbb7280Schristos  * Redistribution and use in source and binary forms, with or without
12cfbb7280Schristos  * modification, are permitted provided that the following conditions
13cfbb7280Schristos  * are met:
14cfbb7280Schristos  * 1. Redistributions of source code must retain the above copyright
15cfbb7280Schristos  *    notice, this list of conditions, and the following disclaimer,
16cfbb7280Schristos  *    without modification.
17cfbb7280Schristos  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18cfbb7280Schristos  *    substantially similar to the "NO WARRANTY" disclaimer below
19cfbb7280Schristos  *    ("Disclaimer") and any redistribution must be conditioned upon
20cfbb7280Schristos  *    including a substantially similar Disclaimer requirement for further
21cfbb7280Schristos  *    binary redistribution.
22cfbb7280Schristos  * 3. Neither the names of the above-listed copyright holders nor the names
23cfbb7280Schristos  *    of any contributors may be used to endorse or promote products derived
24cfbb7280Schristos  *    from this software without specific prior written permission.
25cfbb7280Schristos  *
26cfbb7280Schristos  * Alternatively, this software may be distributed under the terms of the
27cfbb7280Schristos  * GNU General Public License ("GPL") version 2 as published by the Free
28cfbb7280Schristos  * Software Foundation.
29cfbb7280Schristos  *
30cfbb7280Schristos  * NO WARRANTY
31cfbb7280Schristos  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32cfbb7280Schristos  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3346a330b4Schristos  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
34cfbb7280Schristos  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35cfbb7280Schristos  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36cfbb7280Schristos  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37cfbb7280Schristos  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38cfbb7280Schristos  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39cfbb7280Schristos  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40cfbb7280Schristos  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41cfbb7280Schristos  * POSSIBILITY OF SUCH DAMAGES.
42cfbb7280Schristos  */
43cfbb7280Schristos 
44cfbb7280Schristos #ifndef __ACQNX_H__
45cfbb7280Schristos #define __ACQNX_H__
46cfbb7280Schristos 
47d0e1da26Schristos #define ACPI_USE_STANDARD_HEADERS
48d0e1da26Schristos #define ACPI_USE_SYSTEM_CLIBRARY
49cfbb7280Schristos 
50cfbb7280Schristos #define ACPI_UINTPTR_T          uintptr_t
51cfbb7280Schristos #define ACPI_USE_LOCAL_CACHE
52cfbb7280Schristos #define ACPI_CAST_PTHREAD_T(x)  ((ACPI_THREAD_ID) ACPI_TO_INTEGER (x))
53cfbb7280Schristos 
54cfbb7280Schristos /* At present time (QNX 6.6) all supported architectures are 32 bits. */
55cfbb7280Schristos #define ACPI_MACHINE_WIDTH      32
56cfbb7280Schristos 
57cfbb7280Schristos #define COMPILER_DEPENDENT_INT64  int64_t
58cfbb7280Schristos #define COMPILER_DEPENDENT_UINT64 uint64_t
59cfbb7280Schristos 
60cfbb7280Schristos #include <ctype.h>
61cfbb7280Schristos #include <stdint.h>
62cfbb7280Schristos #include <sys/neutrino.h>
63cfbb7280Schristos 
64cfbb7280Schristos #define __cli() InterruptDisable();
65cfbb7280Schristos #define __sti() InterruptEnable();
66cfbb7280Schristos #define __cdecl
67cfbb7280Schristos 
68cfbb7280Schristos #define ACPI_USE_NATIVE_DIVIDE
6989b8eb6cSchristos #define ACPI_USE_NATIVE_MATH64
70cfbb7280Schristos 
71cfbb7280Schristos #endif /* __ACQNX_H__ */
72