[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

pthread resources


Anyone know of good pthred references?  Read everything at
http://pauillac.inria.fr/~xleroy/linuxthreads/ and references
from there.  For instance, I am trying to figure out if this is

main() {
	pthread_t p, p2;
	char *c;
	char c2[] = "something";

	c = strdup("some data");
	pthread_create(&p, 0, f, c);
	pthread_create(&p2, 0, f2, c2);

	  what happens with p and p2 here - will they or c2 be out of
	  scope?  Do I need a join before the exit(0)

void *f(void *v) {
	// let the thread sleep for a while

void *f2(void *v) {
	// let the thread sleep for a while

Allan M. Wind			Finger: wind@digit-safe.dyndns.org (GPG/PGP)
P.O. Box 2022			Email: wind@freewwweb.com
Woburn, MA 01888-0022		ICQ: 44214251
USA				Phone: 781.279.4513

Reply to: