Lines Matching refs:mutex_id

15 static acpi_status acpi_ut_create_mutex(acpi_mutex_handle mutex_id);
17 static void acpi_ut_delete_mutex(acpi_mutex_handle mutex_id);
133 static acpi_status acpi_ut_create_mutex(acpi_mutex_handle mutex_id) in acpi_ut_create_mutex() argument
137 ACPI_FUNCTION_TRACE_U32(ut_create_mutex, mutex_id); in acpi_ut_create_mutex()
139 if (!acpi_gbl_mutex_info[mutex_id].mutex) { in acpi_ut_create_mutex()
141 acpi_os_create_mutex(&acpi_gbl_mutex_info[mutex_id].mutex); in acpi_ut_create_mutex()
142 acpi_gbl_mutex_info[mutex_id].thread_id = in acpi_ut_create_mutex()
144 acpi_gbl_mutex_info[mutex_id].use_count = 0; in acpi_ut_create_mutex()
162 static void acpi_ut_delete_mutex(acpi_mutex_handle mutex_id) in acpi_ut_delete_mutex() argument
165 ACPI_FUNCTION_TRACE_U32(ut_delete_mutex, mutex_id); in acpi_ut_delete_mutex()
167 acpi_os_delete_mutex(acpi_gbl_mutex_info[mutex_id].mutex); in acpi_ut_delete_mutex()
169 acpi_gbl_mutex_info[mutex_id].mutex = NULL; in acpi_ut_delete_mutex()
170 acpi_gbl_mutex_info[mutex_id].thread_id = ACPI_MUTEX_NOT_ACQUIRED; in acpi_ut_delete_mutex()
187 acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id) in acpi_ut_acquire_mutex() argument
194 if (mutex_id > ACPI_MAX_MUTEX) { in acpi_ut_acquire_mutex()
211 for (i = mutex_id; i < ACPI_NUM_MUTEX; i++) { in acpi_ut_acquire_mutex()
213 if (i == mutex_id) { in acpi_ut_acquire_mutex()
217 (mutex_id), in acpi_ut_acquire_mutex()
227 acpi_ut_get_mutex_name(mutex_id))); in acpi_ut_acquire_mutex()
238 acpi_ut_get_mutex_name(mutex_id))); in acpi_ut_acquire_mutex()
241 acpi_os_acquire_mutex(acpi_gbl_mutex_info[mutex_id].mutex, in acpi_ut_acquire_mutex()
247 acpi_ut_get_mutex_name(mutex_id))); in acpi_ut_acquire_mutex()
249 acpi_gbl_mutex_info[mutex_id].use_count++; in acpi_ut_acquire_mutex()
250 acpi_gbl_mutex_info[mutex_id].thread_id = this_thread_id; in acpi_ut_acquire_mutex()
255 acpi_ut_get_mutex_name(mutex_id), mutex_id)); in acpi_ut_acquire_mutex()
273 acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id) in acpi_ut_release_mutex() argument
279 acpi_ut_get_mutex_name(mutex_id))); in acpi_ut_release_mutex()
281 if (mutex_id > ACPI_MAX_MUTEX) { in acpi_ut_release_mutex()
288 if (acpi_gbl_mutex_info[mutex_id].thread_id == ACPI_MUTEX_NOT_ACQUIRED) { in acpi_ut_release_mutex()
291 acpi_ut_get_mutex_name(mutex_id), mutex_id)); in acpi_ut_release_mutex()
306 for (i = mutex_id; i < ACPI_NUM_MUTEX; i++) { in acpi_ut_release_mutex()
309 if (i == mutex_id) { in acpi_ut_release_mutex()
316 acpi_ut_get_mutex_name(mutex_id))); in acpi_ut_release_mutex()
326 acpi_gbl_mutex_info[mutex_id].thread_id = ACPI_MUTEX_NOT_ACQUIRED; in acpi_ut_release_mutex()
328 acpi_os_release_mutex(acpi_gbl_mutex_info[mutex_id].mutex); in acpi_ut_release_mutex()