🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #7493

Re: Accessing same variable from multiple threads

#7493
From: roladdon
Date: Tue, 25 Jan 2005 00:17
20 lines
1957 bytes
Sorry I can't see it.
Questions:

1) Could anything else happen besides a corrupt value ? (like a system 
crash..., exception...)
    (like in a scenario where the value does not matter and is used for 
informational purpose only, example for display only)

If nothing else besides a corrupt value can happen:
2) In case of checking for  true or false of a shared var:
        I can't see how the value could be corrupt, since only bit 1 gets 
set or cleared. All other bits stay 0.
        (to be sure you could   AND   the result with  1)

3) It's not clear to me:
        I thought it guarantied that the processor writes - uninterrupted - 
at least one byte to memory?
    - so using a   char  var  should be fine.

Roland 
Technical Details
Message-ID: <41f58ffe@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <41edea6b@newsgroups.borland.com> <41ee9aae$1@newsgroups.borland.com> <41ef3506@newsgroups.borland.com> <41eff001$1@newsgroups.borland.com> <41f57030$1@newsgroups.borland.com> <41f57ff8$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,4809cdd9a7828fa7
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "roladdon" <roladdon@PutMyServerHere.ca>
From: "roladdon" <roladdon@PutMyServerHere.ca>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <41edea6b@newsgroups.borland.com> <41ee9aae$1@newsgroups.borland.com> <41ef3506@newsgroups.borland.com> <41eff001$1@newsgroups.borland.com> <41f57030$1@newsgroups.borland.com> <41f57ff8$1@newsgroups.borland.com>
Subject: Re: Accessing same variable from multiple threads
Date: Mon, 24 Jan 2005 19:17:03 -0500
Lines: 22
Organization: AddOn
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 64.231.67.179
Message-ID: <41f58ffe@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1106612222 64.231.67.179 (24 Jan 2005 16:17:02 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail