The arg portion of the pthread_create can be any pointer, as for how often people do this i'm not for sure.
A good reference your questions would be "Pthreads Progamming" from Oreilly, here is a link. http://www.oreilly.com/catalog/pthread/ This is a great source of information for things you should/shouldn't do with threads and how to avoid potential problems. It also has good examples which for me is the best teacher. Sincerly Stephen Alstrin -----Original Message----- From: Dachuan Yu [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 3:48 PM To: [EMAIL PROTECTED] Subject: Function pointers as arguments to thread code? Hi, My apologies if this message appeared twice. I sent a previous one while I was not a member and from the mail archive it seems that it did not reach the list. My questions is: When creating a new thread, a function pointer to the thread code is usually provided together with some arguments to the function. I was wondering how often are some of these arguments function pointers. Does that happen in actual applications? Similarly, if a thread returns a value when it terminates, how often is that value a function pointer in practice? Thanks! Dachuan ______________________________________________________________________ GNU Portable Threads (Pth) http://www.gnu.org/software/pth/ Development Site http://www.ossp.org/pkg/lib/pth/ Distribution Files ftp://ftp.gnu.org/gnu/pth/ Distribution Snapshots ftp://ftp.ossp.org/pkg/lib/pth/ User Support Mailing List [EMAIL PROTECTED] Automated List Manager (Majordomo) [EMAIL PROTECTED] ______________________________________________________________________ GNU Portable Threads (Pth) http://www.gnu.org/software/pth/ Development Site http://www.ossp.org/pkg/lib/pth/ Distribution Files ftp://ftp.gnu.org/gnu/pth/ Distribution Snapshots ftp://ftp.ossp.org/pkg/lib/pth/ User Support Mailing List [EMAIL PROTECTED] Automated List Manager (Majordomo) [EMAIL PROTECTED]