diff options
Diffstat (limited to 'include/acpi/acpiosxf.h')
-rw-r--r-- | include/acpi/acpiosxf.h | 40 |
1 files changed, 31 insertions, 9 deletions
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 8f473c83b7c4..89bc4a16c2e8 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
@@ -96,25 +96,47 @@ acpi_os_table_override(struct acpi_table_header *existing_table, | |||
96 | struct acpi_table_header **new_table); | 96 | struct acpi_table_header **new_table); |
97 | 97 | ||
98 | /* | 98 | /* |
99 | * Synchronization primitives | 99 | * Spinlock primitives |
100 | */ | ||
101 | acpi_status acpi_os_create_lock(acpi_spinlock * out_handle); | ||
102 | |||
103 | void acpi_os_delete_lock(acpi_spinlock handle); | ||
104 | |||
105 | acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock handle); | ||
106 | |||
107 | void acpi_os_release_lock(acpi_spinlock handle, acpi_cpu_flags flags); | ||
108 | |||
109 | /* | ||
110 | * Semaphore primitives | ||
100 | */ | 111 | */ |
101 | acpi_status | 112 | acpi_status |
102 | acpi_os_create_semaphore(u32 max_units, | 113 | acpi_os_create_semaphore(u32 max_units, |
103 | u32 initial_units, acpi_handle * out_handle); | 114 | u32 initial_units, acpi_semaphore * out_handle); |
104 | 115 | ||
105 | acpi_status acpi_os_delete_semaphore(acpi_handle handle); | 116 | acpi_status acpi_os_delete_semaphore(acpi_semaphore handle); |
106 | 117 | ||
107 | acpi_status acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 timeout); | 118 | acpi_status |
119 | acpi_os_wait_semaphore(acpi_semaphore handle, u32 units, u16 timeout); | ||
120 | |||
121 | acpi_status acpi_os_signal_semaphore(acpi_semaphore handle, u32 units); | ||
122 | |||
123 | /* | ||
124 | * Mutex primitives | ||
125 | */ | ||
126 | acpi_status acpi_os_create_mutex(acpi_mutex * out_handle); | ||
108 | 127 | ||
109 | acpi_status acpi_os_signal_semaphore(acpi_handle handle, u32 units); | 128 | void acpi_os_delete_mutex(acpi_mutex handle); |
110 | 129 | ||
111 | acpi_status acpi_os_create_lock(acpi_handle * out_handle); | 130 | acpi_status acpi_os_acquire_mutex(acpi_mutex handle, u16 timeout); |
112 | 131 | ||
113 | void acpi_os_delete_lock(acpi_handle handle); | 132 | void acpi_os_release_mutex(acpi_mutex handle); |
114 | 133 | ||
115 | acpi_cpu_flags acpi_os_acquire_lock(acpi_handle handle); | 134 | /* Temporary macros for Mutex* interfaces, map to existing semaphore xfaces */ |
116 | 135 | ||
117 | void acpi_os_release_lock(acpi_handle handle, acpi_cpu_flags flags); | 136 | #define acpi_os_create_mutex(out_handle) acpi_os_create_semaphore (1, 1, out_handle) |
137 | #define acpi_os_delete_mutex(handle) (void) acpi_os_delete_semaphore (handle) | ||
138 | #define acpi_os_acquire_mutex(handle,time) acpi_os_wait_semaphore (handle, 1, time) | ||
139 | #define acpi_os_release_mutex(handle) (void) acpi_os_signal_semaphore (handle, 1) | ||
118 | 140 | ||
119 | /* | 141 | /* |
120 | * Memory allocation and mapping | 142 | * Memory allocation and mapping |