10 More Discussions You Might Find Interesting
1. Programming
I am trying the understand the conditional variable concept.
I went through the following site:
https://computing.llnl.gov/tutorials/pthreads/#ConditionVariables
I understand that condition variables allow threads to synchronize based upon the VALUE of data.
When the data acheives a particular... (2 Replies)
Discussion started by: rupeshkp728
2 Replies
2. Programming
I have a while loop like so:
while (counter (file1));
how can I pass that into a pthread_create()?
I was thinking ...
while(pthread_create(&path, NULL, counter, file));
is that right? (1 Reply)
Discussion started by: l flipboi l
1 Replies
3. Programming
Hi,
I am reading through the pthreads tutorial and had a question on the example they have given for condition variables. Here is the code snippet:
This is what the thread waiting on the condition variables doing:
pthread_mutex_lock(&count_mutex);
while (count<COUNT_LIMIT) { <---... (10 Replies)
Discussion started by: the_learner
10 Replies
4. UNIX for Advanced & Expert Users
I am so confused about the user threads and kernel threads.Suppose I created a thread using pthread create call in Linux ,whether it will be a user thread or kernel thread.If it user thread,then how its map to kernel thread.
I heard about the M:1,M:N,1:1 mapping methods.Which method linux is... (1 Reply)
Discussion started by: sujith4u87
1 Replies
5. Programming
What is the difference between mutex_lock and pthread_mutex_lock ? Should I use both when using binary semaphores.
Also, what is the difference between using a binary semaphore and a counting semaphore where you wait on the condition variable ? (1 Reply)
Discussion started by: joey
1 Replies
6. Programming
I thought one used the select function to wait on multiple semaphores but according to http://opengroup.org/onlinepubs/007908799/xsh/select.html, the select function is only good for I/O features (like pipes and fifos).
How can I block for multiple semaphores? What if I have a mixture of things... (1 Reply)
Discussion started by: siegfried
1 Replies
7. Programming
I've been wondering if I can make mutexes much easier to use in C++ with creative use of a locking class and variable scope, but I'm not sure if things happen in the order I want. Here's pseudocode for something that could use the class:
int someclass::getvalue()
{
int retval;
... (0 Replies)
Discussion started by: Corona688
0 Replies
8. Programming
hallo 2 al
can anyone pls tell me where and how can i find and install the pthread.h lib ?
thx :cool: (2 Replies)
Discussion started by: XinU*
2 Replies
9. Programming
consider if the thread routine returns any void pointer while calling pthread_join,
the thread resources are freed and the thread will be terminated when the main thread is exit ,that is my assumption whether it is true
how do we find whether the thread is alive or terminated
how do we find... (0 Replies)
Discussion started by: MKSRaja
0 Replies
10. Programming
Can someone point to a link where I can get good info about pthread?
thanx.. :) (1 Reply)
Discussion started by: jyotipg
1 Replies