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

  • SEARCH
  • Home
  • 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 7845189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T17:08:51+00:00 2026-06-02T17:08:51+00:00

Normally, we can signal only one variable like pthread_cond_signal (condition) However, I want wake

  • 0

Normally, we can signal only one variable like

pthread_cond_signal (condition) 

However, I want wake up more than one condition variable at the same time. How can I do that?

In other words, Can I give an array to the signal function in order to wake all condition variable stored in that array ?

   four condition variable : X, Y, Z, T

   I want :  waking up these four condition over sending signal, at the same time
  • 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-02T17:08:52+00:00Added an answer on June 2, 2026 at 5:08 pm

    It sounds like you have made a conceptual mistake in your implementation.

    It seems you are trying to share one resource but have assigned many conditional variables to the same resource.

    If you are modelling only one resource, every child should NOT have a different condition variable but all should share the same.

    So if lets say it’s a queue that is protected by conditional variable A all threads that dependent on A should do a pthread_cond_wait(A) so that when you do a pthread_broadcast(A) every one of those threads gets woken up and the first one there gets to work on the data.

    If you really can’t change your implementation you could use a stack and pop the first condvar off and insert at bottom. This would guarantee that none will starve as long as there is enough data.

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

Sidebar

Related Questions

Normally I'm pretty competent with CSS but I just can't figure this one out...
Normally you can print a string in C like this.. printf(No record with name
Here is what i want to do. Normally we can call javascript functions on
Hi I want to Fill out a Rectangle. Normally i can use: g.FillRectangle(Brushes.Green, x1,
Normally you can get it by writing something like CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture; But
Normally we can give more values, at the maximum, how many rows a table
Normally I can do something like this to fill up the byte array with
I want to describe an entity that can either function normally or be put
Normally you can do this: <select size=3> <option>blah</option> <option>blah</option> <option>blah</option> </select> And it would
Normally we can specify a target in the link or use javascript window.open to

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.