427 Subj : Re: returning arguments To : comp.programming.threads From : Joe Seigh Date : Mon Jun 27 2005 09:36 am Huub wrote: > Hi, > > I have written programs on Slackware Linux in C++, each program uses a > thread. In two of these threads I read a boolean, in one I read an > integer. Like this; > > void *Draad(void *threadid) > { > read sensor; > return data; > } > > main() > { > rc = pthread_create(&threads[1], NULL, Draad, (void *)tasdk_id); > } > > I know this isn't compilable code, but it's just to give an idea. My > question(s): > - Do threads *have* to be void? void * > - Can I pass on return values directly from the thread? ? > - If not, how do I pass them on? man pthread_join > > I hope my question is clear enough. It's not clear why you are using threads for this. You should become more familiar with standard thread usage patterns, why they're used, and what they buy you. -- Joe Seigh When you get lemons, you make lemonade. When you get hardware, you make software. . 0