From owner-freebsd-hackers Fri Nov 20 18:11:49 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA24527 for freebsd-hackers-outgoing; Fri, 20 Nov 1998 18:11:49 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from cimlogic.com.au (cimlog.lnk.telstra.net [139.130.51.31]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA24518 for ; Fri, 20 Nov 1998 18:11:45 -0800 (PST) (envelope-from jb@cimlogic.com.au) Received: (from jb@localhost) by cimlogic.com.au (8.9.1/8.9.1) id NAA27074; Sat, 21 Nov 1998 13:15:10 +1100 (EST) (envelope-from jb) From: John Birrell Message-Id: <199811210215.NAA27074@cimlogic.com.au> Subject: Re: reading socket in thread busy loops In-Reply-To: <199811210120.SAA05732@count.timing.com> from Craig Anderson at "Nov 20, 98 06:20:20 pm" To: chanders@timing.com (Craig Anderson) Date: Sat, 21 Nov 1998 13:15:09 +1100 (EST) Cc: freebsd-hackers@FreeBSD.ORG, chanders@timing.com X-Mailer: ELM [version 2.4ME+ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Craig Anderson wrote: > My attempts to block on a socket read cause the > thread library to go into a spin loop. I believe > the socket fd is explicitly set to blocking mode, > but I'm not positive I'm setting things up properly. > Can anyone familiar with the threads library tell me > how to get blocking behavior? I'm running FreeBSD 2.2.6. Sounds like you are linking libc before libc_r. On 2.2.6, you should use the -nostdlib arg to gcc to prevent it linking against libc. -- John Birrell - jb@cimlogic.com.au; jb@freebsd.org http://www.cimlogic.com.au/ CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message