Date: Fri, 26 Nov 1999 17:32:28 -0500 From: Dan Moschuk <dan@FreeBSD.ORG> To: Rob King <dimwit@pernet.net> Cc: Dan Moschuk <dan@FreeBSD.ORG>, hackers@FreeBSD.ORG Subject: Re: PThreads and Sockets Message-ID: <19991126173228.A2608@spirit.jaded.net> In-Reply-To: <Pine.BSF.4.20.9911261439070.13170-100000@deadpixi.pernet.net>; from dimwit@pernet.net on Fri, Nov 26, 1999 at 02:42:35PM -0600 References: <19991126153649.A1358@spirit.jaded.net> <Pine.BSF.4.20.9911261439070.13170-100000@deadpixi.pernet.net>
next in thread | previous in thread | raw e-mail | index | archive | help
| int sd2; | if((sd2=accept(sd, (struct sockaddr*)&cad, &alen)) > 0) { | pthread_create(&thread1, pthread_attr_default, | serverstart, &sd2); | } | | Then the serverstart function: | | void *serverstart(void *ptr) | { | int *sd2; | sd2 = (int*)ptr; | | dowhatever(sd2); | } | | Any ideas as to what I'm doing wrong? Also, thanks for your help. | | Rob Try this. void *serverstart(void *ptr) { int sd2; sd2 = *((int *) ptr); ... } -- Dan Moschuk (TFreak!dan@freebsd.org) "Cure for global warming: One giant heatsink and dual fans!" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991126173228.A2608>