thread doubt


 
Thread Tools Search this Thread
Top Forums Programming thread doubt
# 1  
Old 12-03-2011
thread doubt

hi All
i have one doubt. in my project am using thrd1 and thrd2. am using interface is mbox and now my doubt is thrd1 is posting data and thrd2 is reading data...?? how we will receive the data...
# 2  
Old 12-03-2011
Are yoyu trying to coordinate read and writing? Use a mutex, pthread_mutex_t is the datatype used with pthreads.

The basic man pages for this:
pthread_mutex_init
pthread_mutex_destroy
pthread_mutex_lock
pthread_mutex_unlock
pthread_mutex_trylock
# 3  
Old 12-05-2011
thanks Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Forum Support Area for Unregistered Users & Account Problems

Not able to post thread/reply to thread

Dear Moderator I am not able to post any new thread or post reply to mine old thread. Kindly help as i am stuck on one problem and needed suggestion. Regards Jaydeep (1 Reply)
Discussion started by: jaydeep_sadaria
1 Replies

2. UNIX for Dummies Questions & Answers

Thread holding spinlock doubt

Are thread holding spinlocks deletion safe? I mean if say a thread t1 is holding a spinlock, then can an another thread t2 wanting the spinlock delete the thread t1 if t1 is not releasing the spinlock? (0 Replies)
Discussion started by: rupeshkp728
0 Replies

3. Programming

Parent Thread Of Child Thread

Parent Thread Of Child Thread Suppose a process creates some threads say threadC and threadD. Later on each of these threads create new child threads say threadC1, threadC2, threadC3 etc. So a tree of threads will get created. Is there any way to find out the parent thread of one such... (1 Reply)
Discussion started by: rupeshkp728
1 Replies

4. Programming

How to cancel a thread safely from the initial thread?

how about asynchronous canceling? or with signal? if with signal whether it effects the process? my english so badly :( :( (1 Reply)
Discussion started by: alan.zhao
1 Replies
Login or Register to Ask a Question