Menu

#338 QPC/Posix Critical section mutex is not recursive

QP
closed
None
1
2024-08-01
2023-07-12
Anonymous
No

I believe there is a mistake in the POSIX qpc port.
The mutex used for critical section used with QF_enterCriticalSection_ and QF_leaveCriticalSection_ is a regular mutex.
Looking at the Windows port, it is implemented using a CriticalSection which is of a recursive nature.

Shouldn't the pthread mutex QF_pThreadMutex_ be recursive? I ask this question because we have code working on Windows which deadlocks under Linux because of this.

Thank you.

Discussion

  • Quantum Leaps

    Quantum Leaps - 2023-08-26

    The main critical section mutex used in POSIX and POSIX-QV ports will be portably initialized as recursive in the upcoming QP/C/C++ 7.3.0.

    --MMS

     
  • Quantum Leaps

    Quantum Leaps - 2023-09-27

    Fixed in QP/C/C++ 7.3.0.
    --MMS

     

Anonymous
Anonymous

Add attachments
Cancel