Skip to content

Add double-lock detection for OSAL mutexes as a debug option #434

Description

@jphickey

Is your feature request related to a problem? Please describe.
A recent issue in nasa/cFE#591 was due to an application double-locking the same mutex from the same task. This wasn't detected during testing because POSIX allows this recursive locking. However, other RTOS's do not allow it, nor is it intended behavior.

Describe the solution you'd like
OSAL should check/enforce that a single task ID only takes a mutex once, and must release it before locking again. Violations of this pattern should be reported to the debug console, so they can be addressed by the developer.

As there is a small overhead cost to doing this, it can be selectively enabled as a debug feature, and remain off by default.

Additional context
See nasa/cFE#591

Requester Info
Joseph Hickey, Vantage Systems, Inc.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    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