50 #define _COMPONENT ACPI_EXECUTER
80 if (obj_desc->mutex.next) {
81 (obj_desc->mutex.next)->
mutex.prev = obj_desc->mutex.prev;
84 if (obj_desc->mutex.prev) {
85 (obj_desc->mutex.prev)->
mutex.next = obj_desc->mutex.next;
93 (obj_desc->mutex.prev)->mutex.original_sync_level =
94 obj_desc->mutex.original_sync_level;
129 list_head->
mutex.prev = obj_desc;
175 if (obj_desc->
mutex.thread_id == thread_id) {
180 obj_desc->
mutex.acquisition_depth++;
202 obj_desc->
mutex.thread_id = thread_id;
203 obj_desc->
mutex.acquisition_depth = 1;
204 obj_desc->
mutex.original_sync_level = 0;
239 if (!walk_state->
thread) {
241 "Cannot acquire Mutex [%4.4s], null thread info",
250 if (walk_state->
thread->current_sync_level > obj_desc->
mutex.sync_level) {
252 "Cannot acquire Mutex [%4.4s], current SyncLevel is too large (%u)",
254 walk_state->
thread->current_sync_level));
260 walk_state->
thread->thread_id);
266 obj_desc->
mutex.original_sync_level =
267 walk_state->
thread->current_sync_level;
268 walk_state->
thread->current_sync_level =
269 obj_desc->
mutex.sync_level;
273 acpi_ex_link_mutex(obj_desc, walk_state->
thread);
307 if (obj_desc->
mutex.acquisition_depth == 0) {
313 obj_desc->
mutex.acquisition_depth--;
314 if (obj_desc->
mutex.acquisition_depth != 0) {
321 if (obj_desc->
mutex.owner_thread) {
339 obj_desc->
mutex.thread_id = 0;
361 u8 previous_sync_level;
370 owner_thread = obj_desc->
mutex.owner_thread;
376 "Cannot release Mutex [%4.4s], not acquired",
382 if (!walk_state->
thread) {
384 "Cannot release Mutex [%4.4s], null thread info",
396 "Thread %u cannot release Mutex [%4.4s] acquired by thread %u",
412 "Cannot release Mutex [%4.4s], SyncLevel mismatch: mutex %u current %u",
414 obj_desc->
mutex.sync_level,
415 walk_state->
thread->current_sync_level));
424 previous_sync_level =
432 if (obj_desc->
mutex.acquisition_depth == 0) {
471 next = obj_desc->
mutex.next;
475 obj_desc->
mutex.acquisition_depth = 0;
491 obj_desc->
mutex.thread_id = 0;
496 obj_desc->
mutex.original_sync_level;