Skip to content

AML global lock acquisition of global_lock_mutex looks wrong #305

@martin-hughes

Description

@martin-hughes

The acquisition and release of global_lock_mutex in acquire_global_lock and release_global_lock seems wrong to me - could you clarify?

In acquire_global_lock, the first line acquires the mutex, and commences the loop with the mutex locked. If the firmware lock is not acquired on the first pass then the mutex is released, and the loop continues with the loop released.

The function then exits with the mutex either locked or released, depending how many loops were executed - I would expect it to be consistent?

Then release_global_lock doesn't release global_lock_mutex under any circumstance - is this deliberate?

If the code is correct, would you mind writing (or suggesting to me to write) a comment explaining the code a little more?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions