acsolaris.h (26f3cdf0) acsolaris.h (7b1019a6)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 5 unchanged lines hidden (view full) ---

14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 5 unchanged lines hidden (view full) ---

14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
22 * Copyright 2016 Joyent, Inc.
22 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27#ifndef _ACSOLARIS_H_
28#define _ACSOLARIS_H_
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34#include <sys/types.h>
35#include <sys/sunddi.h>
36#include <sys/varargs.h>
37#include <sys/cpu.h>
38#include <sys/thread.h>
39
23 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
24 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
25 * Use is subject to license terms.
26 */
27
28#ifndef _ACSOLARIS_H_
29#define _ACSOLARIS_H_
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#include <sys/types.h>
36#include <sys/sunddi.h>
37#include <sys/varargs.h>
38#include <sys/cpu.h>
39#include <sys/thread.h>
40
41#ifdef _KERNEL
42#include <sys/ctype.h>
43#else
44#include <ctype.h>
45#include <strings.h>
46#include <stdlib.h>
47#endif
48
40/* Function name used for debug output. */
41#define ACPI_GET_FUNCTION_NAME __func__
42
43uint32_t __acpi_acquire_global_lock(void *);
44uint32_t __acpi_release_global_lock(void *);
45void __acpi_wbinvd(void);
49/* Function name used for debug output. */
50#define ACPI_GET_FUNCTION_NAME __func__
51
52uint32_t __acpi_acquire_global_lock(void *);
53uint32_t __acpi_release_global_lock(void *);
54void __acpi_wbinvd(void);
55uint32_t acpi_strtoul(const char *, char **, int);
46
47#ifdef _ILP32
48#define ACPI_MACHINE_WIDTH 32
49#elif defined(_LP64)
50#define ACPI_MACHINE_WIDTH 64
51#endif
52
53#define COMPILER_DEPENDENT_INT64 int64_t

--- 17 unchanged lines hidden (view full) ---

71 * ACPI_INTERNAL_XFACE - Internal ACPI interfaces
72 * ACPI_INTERNAL_VAR_XFACE - Internal variable-parameter list interfaces
73 */
74#define ACPI_SYSTEM_XFACE
75#define ACPI_EXTERNAL_XFACE
76#define ACPI_INTERNAL_XFACE
77#define ACPI_INTERNAL_VAR_XFACE
78
56
57#ifdef _ILP32
58#define ACPI_MACHINE_WIDTH 32
59#elif defined(_LP64)
60#define ACPI_MACHINE_WIDTH 64
61#endif
62
63#define COMPILER_DEPENDENT_INT64 int64_t

--- 17 unchanged lines hidden (view full) ---

81 * ACPI_INTERNAL_XFACE - Internal ACPI interfaces
82 * ACPI_INTERNAL_VAR_XFACE - Internal variable-parameter list interfaces
83 */
84#define ACPI_SYSTEM_XFACE
85#define ACPI_EXTERNAL_XFACE
86#define ACPI_INTERNAL_XFACE
87#define ACPI_INTERNAL_VAR_XFACE
88
89#ifdef _KERNEL
90#define strtoul(s, r, b) acpi_strtoul(s, r, b)
91#define toupper(x) (islower(x) ? (x) - 'a' + 'A' : (x))
92#define tolower(x) (isupper(x) ? (x) - 'A' + 'a' : (x))
93
94/*
95 * The ACPI headers shipped from Intel defines a bunch of functions which are
96 * already provided by the kernel. The variable below prevents those from
97 * being loaded as part of accommon.h.
98 */
99#define ACPI_USE_SYSTEM_CLIBRARY
100#endif
101
79#define ACPI_ASM_MACROS
80#define BREAKPOINT3
81#define ACPI_DISABLE_IRQS() cli()
82#define ACPI_ENABLE_IRQS() sti()
83#define ACPI_ACQUIRE_GLOBAL_LOCK(Facs, Acq) \
84 ((Acq) = __acpi_acquire_global_lock(Facs))
85
86#define ACPI_RELEASE_GLOBAL_LOCK(Facs, Acq) \
87 ((Acq) = __acpi_release_global_lock(Facs))
88
89#ifdef __cplusplus
90}
91#endif
92
93#endif /* _ACSOLARIS_H_ */
102#define ACPI_ASM_MACROS
103#define BREAKPOINT3
104#define ACPI_DISABLE_IRQS() cli()
105#define ACPI_ENABLE_IRQS() sti()
106#define ACPI_ACQUIRE_GLOBAL_LOCK(Facs, Acq) \
107 ((Acq) = __acpi_acquire_global_lock(Facs))
108
109#define ACPI_RELEASE_GLOBAL_LOCK(Facs, Acq) \
110 ((Acq) = __acpi_release_global_lock(Facs))
111
112#ifdef __cplusplus
113}
114#endif
115
116#endif /* _ACSOLARIS_H_ */