Home
Support

Knowledge Base

BSPs and drivers
Community resources
Product documentation
Questions?
Contact us

Use of SyncMutexRevive
 
________________________________________________________________________

Applicable Environment
________________________________________________________________________
  • Topic: SyncMutexRevive
  • SDP: 6.4.0
  • Target: Any supported target
________________________________________________________________________

Recommendation
________________________________________________________________________

Revive a mutex that's in the DEAD state (Mutex owner killed while other thread already MUTEX blocked)
like:

# rm /dev/shmem/myshmemobject ; ./mtxshmemcreator & sleep 1 ; ./user & sleep 1 ; slay -9 mtxshmemcreator

Play with attached sample:
# ls
. mtxshmemcreator.c user.c
.. mutexshmem.h

# make mtxshmemcreator
cc mtxshmemcreator.c -o mtxshmemcreator

# make user
cc user.c -o user

# rm /dev/shmem/myshmemobject ; ./mtxshmemcreator & sleep 1 ; ./user & sleep 1 ; slay -9 mtxshmemcreator
[1] 139558955
[2] 139571245
Locking...
Reviving 0x40100000: 80000001 ffffff00
Ok.
[1] - Killed ./mtxshmemcreator
#

That's it.

________________________________________________________________________
NOTE: This entry has been validated against the SDP version listed above. Use caution when considering this advice for any other SDP version. For supported releases, please reach out to QNX Technical Support if you have any questions/concerns.
________________________________________________________________________


Related Attachments
 Attachment Name Size Last Modified
 syncmutexrevive.zip 4KB 8/23/2012 3:51 PM





Please contact us with your questions or concerns.