🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TCriticalSection between 2 threads

#2774
From: Boba
Date: Tue, 28 Nov 2006 12:09
16 lines
1742 bytes
"Eelke" <e.klein@remove.mplussoftware.nl> wrote in message
news:456c1c40$1@newsgroups.borland.com...
> An atomic operation is an operation which is executed completely before
> another thread can see the result of the operation. For instance the
> assignment of an int is atomic because the CPU changes all 32-bits at
> the same time so another thread sees either the old value or the new but
> never some combination.
>
> This is only true when the data is properly aligned.
>
> Eelke

all i ment was synchronization. see Mr.Lebeau's msg.
the op does not mention it. if [s]he is after the correctness
of rw only (regadless of timing) on a single cpu then yes, you
are right. with a multi processor system the story is different.
Technical Details
Message-ID: <456c2710@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <456bfb16@newsgroups.borland.com> <456c0cd1@newsgroups.borland.com> <456c1747@newsgroups.borland.com> <456c1c40$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,2ab3d3cded5b6fe1
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Boba" <Boba@somewhere.world>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <456bfb16@newsgroups.borland.com> <456c0cd1@newsgroups.borland.com> <456c1747@newsgroups.borland.com> <456c1c40$1@newsgroups.borland.com>
Subject: Re: TCriticalSection between 2 threads
Date: Tue, 28 Nov 2006 06:09:16 -0600
Lines: 18
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 65.243.37.30
Message-ID: <456c2710@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1164715792 65.243.37.30 (28 Nov 2006 04:09:52 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail