Skip to content

Immediately returning SH2 operations unblock before block #3

@neilneil2000

Description

@neilneil2000

The implementation of opStart() in sh2.c causes a binary semaphore operated by sh2_hal_block and sh2_hal_unblock to get stuck.

Logic Flow in opStart:

opStart
-> pOp->start() [example: setSensorConfigStart]
-> shtp_sent
-> opTxDone
-> sh2.pOp->txDone [example: setSensorConfigTxDone]
-> opCompleted
-> sh2_hal_unblock();
->sh2_hal_block();

All of the above are in the same thread, and leaves the system in a position where the an operation which calls sh2_hal_block() (e.g. getReportIds) will hang indefinitely

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions