Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7937033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:24:38+00:00 2026-06-03T22:24:38+00:00

https://stackoverflow.com/a/189778/462608 In the case of non-recursive mutexes, there is no sense of ownership and

  • 0

https://stackoverflow.com/a/189778/462608

In the case of non-recursive mutexes, there is no sense of ownership and any thread can usually release the mutex no matter which thread originally took the mutex.

What I have studied about Mutexes is that a thread acquires it when it wants to do something to a shared object, and when it completes whatever it wanted to do, it releases the lock. And meanwhile other threads can either sleep or spinlock.

What does the above quote mean by “any thread can usually release the mutex no matter which thread originally took the mutex.”?

What’s the point that I am missing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T22:24:41+00:00Added an answer on June 3, 2026 at 10:24 pm

    This may differ between different thread implementations, but since you’ve tagged your question with “pthreads” I assume you’re interested in pthread mutexes (and not vxworks mutexes, which is apparently what the link you provide describes).

    So in pthreads the rule is that the same thread that locks a mutex must unlock it. You can set attributes on the mutex object whether you want an error to be generated if this rule is violated, or whether the result is undefined behavior (say, for debug vs. release builds). See the manpage for the pthread_mutexattr_settype function for details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From here: https://stackoverflow.com/a/2485177/462608 For thread-safe accesses to shared data, we need a guarantee that
In answering this question ( https://stackoverflow.com/questions/352317/c-coding-question#352327 ), it got me wondering... Is there any
I was reading this thread/post: https://stackoverflow.com/questions/262298/windows-c-ui-technology and am also wondering about a non .NET
As caf talked about it in https://stackoverflow.com/a/1113041/1354779 , there is a way to use
As per https://stackoverflow.com/questions/3264227/relations-with-multiple-keys-in-doctrine-1-2 , I have two tables which (as I can't get it
https://stackoverflow.com/a/5524120/462608 If you want to call functions recursively, which lock the same mutex, then
Given this answer: https://stackoverflow.com/a/4263048 Which is excellent, how can we be sure that out
From here: https://stackoverflow.com/a/5524120/462608 If you want to lock several mutex-protected objects from a set
In relation to the link below https://stackoverflow.com/questions/5577406/enable-both-lan-intranet-and-usb-internet Is there a way to do it
From this question:- https://stackoverflow.com/questions/1342611/is-there-a-webservice-api-to-grab-a-screenshot-of-another-website and some other questions/google I got some results like:-- http://www.bitpixels.com/

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.