help-hurd
[Top][All Lists]
Advanced

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

�ǯu���X�X��


From: q7_onil2b2bgj
Subject: ǯuXX
Date: Sun, 30 Jun 2002 20:07:57 -0400

¶Ç¯u¸¹½X¥X°â


§Ú¦³¥_°Ï02_¶}ÀY¶Ç¯u¸¹½X¡A¦@¬°77270µ§

¬O§Ú±q¦U­Ó¦P·~¤½·|¡B¹q¸Üï¡B¶À­¶¡B¼x«H©Ò¡B

ºô»Úºô¸ô¡A¥úºÐ¤ù...µ¥µ¥¡A

¸g¦~²Ö¤ë¤@µ§¤@µ§¥´¤J¦¬¶°¤U¨Óªº¡A¶O¤F«Ü¤jªº¥\¤Ò¡C

¥úªá¿ú¶R¼x«H©Ò¥Xªºªº¥U¤l¡A´Nªá¤F¤£¤Ö¿ú¡A

¦A¸g¹L²Î­p¤èªk¾ã²z¡A©Ò¥H¨S¦³¥ô¦ó¤@µ§¬O­«½Æªº¡A

¨Ã¸g¹L¹ê»Úµo°e´ú¸Õ¡A¦A­ç°£±¼µL®Äªº¸¹½X¡A

©Ò¥H¨C¤@µ§¨ì4¤ë©³¬°¤î¡A³£¥i¥Hµo°e¡C

®Ú¾Ú¸gÅç¡A´X¥G©Ò¦³02_¶}ÀYªº¶Ç¯u¡A

³£¤w¦¬¶°¦b³o¸Ì¤F¡A±q¨ä¥L¨Ó·½¡A¤]¤£¤Ó®e©ö¦A§ä¨ì·sªº¡C

¦pªG±z¦³¿³½ìÁʶR¡A§ÚÄ@·N¥H3000¤¸¤À¨É¡C


¾H¤p©j
tel: 02-27492314




From Marcus.Brinkmann@ruhr-uni-bochum.de Mon Jul 01 01:38:14 2002
Received: from porta.u64.de ([194.77.88.106])
        by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian))
        id 17Ott7-0000Ii-00
        for <help-hurd@gnu.org>; Mon, 01 Jul 2002 01:38:13 -0400
Received: from (localhost) [212.23.136.22] 
        by porta.u64.de with asmtp (Exim 3.12 #1 (Debian))
        id 17OuZ7-00017y-00; Mon, 01 Jul 2002 08:21:37 +0200
Received: from marcus by localhost with local (Exim 3.35 #1 (Debian))
        id 17Ott4-0001mP-00; Mon, 01 Jul 2002 07:38:10 +0200
Date: Mon, 1 Jul 2002 07:38:10 +0200
From: Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>
To: Igor Shmukler <shmukler@mail.ru>
Cc: help-hurd@gnu.org
Subject: Re: strage cthread behavior
Message-ID: <20020701053809.GB1746@212.23.136.22>
References: <20020630171719.GA769@212.23.136.22> <E17OoJK-000PWO-00@f10.mail.ru>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <E17OoJK-000PWO-00@f10.mail.ru>
User-Agent: Mutt/1.4i
Sender: help-hurd-admin@gnu.org
Errors-To: help-hurd-admin@gnu.org
X-BeenThere: help-hurd@gnu.org
X-Mailman-Version: 2.0.11
Precedence: bulk
List-Help: <mailto:help-hurd-request@gnu.org?subject=help>
List-Post: <mailto:help-hurd@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-hurd>,
        <mailto:help-hurd-request@gnu.org?subject=subscribe>
List-Id: Users list for the GNU Hurd <help-hurd.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-hurd>,
        <mailto:help-hurd-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-hurd/>

On Mon, Jul 01, 2002 at 03:40:54AM +0400, Igor Shmukler wrote:
> Firstb of all, I want to say that you are correct. I did not explain myself
> properly. Thanks for noticing that.
> Yes, stdio calls are atomic. Thus you need not worry about syncing printfs.
> However, this in way does guarantee that 
> printf("Hello "); printf("World\n"); will in fact print Hello World.
> POSIX provides the flockfile() and funlockfile() functions to address this, so
> that you would instead use 
> flockfile(stdout); 
> printf("Hello "); printf("World\n");
> funlockfile(stdout);
> This will guarantee expected behaviour.

Yup.  Note that I did not analyze what the submitters problem actually was,
I was merely adding some basic info.  I thought the discussion was about
atomicity of an individual printf.  If the submitters problem was ordering
multiple printfs, he should follow your example.

> Otherwise stdout will could have whatever in it.
> 
> [OT] POSIX was designed so that people write portable soft, relying on GNU
> systems features limits your options in terms of software usibility or/and
> complicates development of portable code.
> I am sure eventually GNU will switch to pthreads and other POSIX compliant
> interfaces.

I agree, but it depends on what we are talking about.  If we talk about the
GNU Hurd, and well, after all this is a Hurd mailing list and the submitter
talked about our cthreads, it is perfectly fine to rely on GNU extensions if
it gives you an advantage.  We do it in the Hurd in several places.

If we talk about portability in general, I wouldn't start with worrying
about cthreads at all :)

Thanks,
Marcus


-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de


reply via email to

[Prev in Thread] Current Thread [Next in Thread]