From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 29 09:14:04 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2000716A41C for ; Wed, 29 Jun 2005 09:14:04 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mail22.sea5.speakeasy.net (mail22.sea5.speakeasy.net [69.17.117.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id EAA5943D4C for ; Wed, 29 Jun 2005 09:14:03 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 20266 invoked from network); 29 Jun 2005 09:14:03 -0000 Received: from server.baldwin.cx ([216.27.160.63]) (envelope-sender ) by mail22.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 29 Jun 2005 09:14:03 -0000 Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id j5T9DpI0007252; Wed, 29 Jun 2005 05:13:58 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: Pablo Mora Date: Wed, 29 Jun 2005 05:01:30 -0400 User-Agent: KMail/1.8 References: <200506271318.36748.jhb@FreeBSD.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200506290501.31301.jhb@FreeBSD.org> X-Spam-Status: No, score=-2.8 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx Cc: freebsd-hackers@FreeBSD.org Subject: Re: problem handling POSIX thread on FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jun 2005 09:14:04 -0000 On Tuesday 28 June 2005 07:58 pm, Pablo Mora wrote: > Ok, I understand, but by being threads POSIX should be executed of the > same one in any type of S.OR? Not sure I understand the question. What do you mean by S.O? Are you sayi= ng=20 that since the threads are POSIX, that you would expect the program to act= =20 the same on all Operating Systems? That's not an entirely safe assumption = to=20 make in that POSIX only guarantees that things like mutexes work (and it=20 specifically states that you have to unlock a mutex in the same thread you= =20 locked it, what you were doing would result in undefined behavior). POSIX= =20 doesn't make any guarantees about how threads are scheduled with respect to= =20 one another. =2D-=20 John Baldwin =A0<>< =A0http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" =A0=3D =A0http://www.FreeBSD.org