From owner-freebsd-questions Mon Aug 9 7:45:34 1999 Delivered-To: freebsd-questions@freebsd.org Received: from bom3.vsnl.net.in (lvsb1.vsnl.net.in [202.54.4.24]) by hub.freebsd.org (Postfix) with ESMTP id D6D9A15249 for ; Mon, 9 Aug 1999 07:45:10 -0700 (PDT) (envelope-from ugtech@bom3.vsnl.net.in) Received: from Cosmos (PPP45-159.lvsb.vsnl.net.in [202.54.45.159]) by bom3.vsnl.net.in (8.9.0/8.9.0) with SMTP id UAA05356 for ; Mon, 9 Aug 1999 20:10:36 +0530 (IST) Message-ID: <003801bee275$4b045a20$030136ca@ugtech.com> From: "Geeta Mahesh" To: Subject: pthreads on FreeBSD Date: Mon, 9 Aug 1999 20:11:37 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0035_01BEE2A3.62E47AC0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. ------=_NextPart_000_0035_01BEE2A3.62E47AC0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi.=20 I am using pthreads in my application.=20 I am able to run a small sample program that creates a thread using = pthread_create=20 wherein the main program and the thread display a line of text. However, I find that the threading is not taking place when I run my = application which creates a thread=20 using pthread_create.=20 The main thread in my application listens for client connections on a = socket and signals a semaphore when there is a connection while the = thread runs in the background, waits on a semaphore and continues = execution when the semaphore is signaled. I see that either the main program executes or the thread executes.=20 Can you tell me what is going wrong? Regards Geeta ------=_NextPart_000_0035_01BEE2A3.62E47AC0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi.
I am using pthreads in my application.
I am able to run a small sample program that creates = a thread=20 using pthread_create
wherein the main program and the thread display a = line of=20 text.
 
However, I find that the threading is not taking = place when I=20 run my application which creates a thread
using pthread_create.
 
The main thread in my application listens for client = connections on a socket and signals a semaphore when there is a = connection while=20 the  thread runs in the background, waits on = a=20 semaphore and continues execution when the semaphore is = signaled.
 
I see that either the main program executes or the = thread=20 executes.
 
Can you tell me what is going wrong?
Regards
Geeta
------=_NextPart_000_0035_01BEE2A3.62E47AC0-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message