atomic operation

Hi,

 Is it official to say that fetching and storing a 'long' (for 32-bit
and 64-bit) is an atomic operation ?

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
guy
10/29/2004 2:33:59 PM
comp.lang.c++.moderated 10726 articles. 1 followers. allnor (8506) is leader. Post Follow

12 Replies
324 Views

Similar Articles

[PageSpeed] 39

"Guy" <guy.peleg@gmail.com> wrote in message
news:f4d01807.0410280800.4c62b16a@posting.google.com...

>  Is it official to say that fetching and storing a 'long' (for 32-bit
> and 64-bit) is an atomic operation ?

absolutely not.



      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
Balog
10/31/2004 10:51:54 AM
guy.peleg@gmail.com (Guy) wrote in message 
news:<f4d01807.0410280800.4c62b16a@posting.google.com>...
> Hi,
> 
>  Is it official to say that fetching and storing a 'long' (for 32-bit
> and 64-bit) is an atomic operation ?
> 

No

joshua lehrer
factset research systems
NYSE:FDS

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
usenet_cpp
10/31/2004 10:54:22 AM
Guy wrote:
> Hi,
> 
>  Is it official to say that fetching and storing a 'long' (for 32-bit
> and 64-bit) is an atomic operation ?
>   peri
There's no C++ concept of atomic operations.   You'll have to
check your particular implementation for such support.

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
Ron
10/31/2004 10:54:43 AM
On 29 Oct 2004 10:33:59 -0400, guy.peleg@gmail.com (Guy) wrote in
comp.lang.c++.moderated:

> Hi,
> 
>  Is it official to say that fetching and storing a 'long' (for 32-bit
> and 64-bit) is an atomic operation ?

No, it is not.  Accesses of the type 'sig_atomic_t', defined in
<csignal> or <signal.h> are guaranteed to be atomic operations.  In
theory this could be an 8-bit type on 8-bit processors, but there
isn't much C++ activity on 8-bit processors these days.

In most cases it is signed or unsigned int, but there is no guarantee.

-- 
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
Jack
10/31/2004 11:16:03 AM
On 29 Oct 2004 10:33:59 -0400, Guy <guy.peleg@gmail.com> wrote:

>  Is it official to say that fetching and storing a 'long' (for 32-bit
> and 64-bit) is an atomic operation ?

I presume, you are talking atomic with regards to threads, right?

If so, then no, it's not. There are too many processor dependent factors  
involved.

On processors that work with aligned data only it's atomic only when  
reading and writing a machine word on machine instruction level, that is,  
the instruction is atomic and can't be interrupted in the middle. For 32  
bit processors the machine word is most likely also a 32-bit int. On  
processors which do work with unaligned data (like x86 does), it's only  
atomic when accessing properly aligned data.

But the machine instruction level atomicity buys you little in multithread  
code. The reason being memory visibility, that is, instruction atomicity  
does not imply that a written to memory value will immediately be seen by  
other threads on a multiprocessor, which is pretty much what you want.  
This is because all modern processors cache memory, writes go to cache,  
cache gets flushed to memory at arbitrary from code's point of view  
moments, other processors may know of the new value only when it has been  
written to memory. So, there must be a means to flush writes to memory and  
to signal other processors to update their cashes. This means are provided  
by memory barriers, that ensure that the effect of invoking them is that  
all other threads will see changes to memory made before invoking the  
memory barrier.

Operating systems provide memory barriers as function calls. For POSIX you  
can find a list of functions that issue the memory barrier here  
http://groups.google.com/groups?selm=opsf9kv0mjti5cme%40localhost.localdomain&rnum=2&filter=0.  
For win32 you may start looking here  
http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/synchro_88127404-a394-403f-a289-d61c45ab81d5.xml.asp


-- 
Maxim Yegorushkin

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
Maxim
10/31/2004 11:18:33 AM
Maxim Yegorushkin wrote:
[...]
> Operating systems provide memory barriers as function calls. For POSIX you
> can find a list of functions that issue the memory barrier here
> 
http://groups.google.com/groups?selm=opsf9kv0mjti5cme%40localhost.localdomain&rnum=2&filter=0.

In addition to the links I've posted in my previous message, see
also <http://cmc.rice.edu/docs/docs/Adv1999Mar1RecentAdva.pdf>.

regards,
alexander.

P.S. DRB it totally wrong with respect to {non}conformance of
release consistency model, BTW.

--
"The current POSIX memory model is far from perfect. [...] I 
 really think you'd be far better off persuing this at the C++ 
 language level and lobbying for a language threading model that 
 can coexist with (carefully designed) POSIX implementations but 
 is not directly dependent on the POSIX language."

   -- DRB (sorta annoyed by pseudo-C++ illustrations ;-) )

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
Alexander
11/2/2004 9:38:33 PM
Jack Klein wrote:
[...]
> >  Is it official to say that fetching and storing a 'long' (for 32-bit
> > and 64-bit) is an atomic operation ?
> 
> No, it is not.  Accesses of the type 'sig_atomic_t', defined in
> <csignal> or <signal.h> are guaranteed to be atomic operations.  

Only with respect to assignments in signal handlers (when this
or that signal is delivered to the same thread and only for static 
volatile sig_atomic_t objects). It has really nothing to do with 
threads (just in case you meant to imply that) Uhmm, see 
<http://tinyurl.com/5zvyj>. Better read this entire thread 
<http://tinyurl.com/5g6pm>... you might as well contribute. ;-)

regards,
alexander.

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
Alexander
11/2/2004 9:40:03 PM
Thanks but I think I need to rephrase the question. 

Suppose I have a 'long'(in either 32-bit or 64-bit) I have a process
with two threads. One is reading this 'long' and one is writing it. Is
it possible that while the writing thread is in the middle of the
writing, the process will switched to the reading thread? Or is it
true to say that this action (updating or reading) this long is safe?

Alexander Terekhov <terekhov@web.de> wrote in message news:<4187AF6B.E09C3A11@web.de>...
> Maxim Yegorushkin wrote:
> [...]
> > Operating systems provide memory barriers as function calls. For POSIX you
> > can find a list of functions that issue the memory barrier here
> > 
> http://groups.google.com/groups?selm=opsf9kv0mjti5cme%40localhost.localdomain&rnum=2&filter=0.
> 
> In addition to the links I've posted in my previous message, see
> also <http://cmc.rice.edu/docs/docs/Adv1999Mar1RecentAdva.pdf>.
> 
> regards,
> alexander.
> 
> P.S. DRB it totally wrong with respect to {non}conformance of
> release consistency model, BTW.
> 
> --
> "The current POSIX memory model is far from perfect. [...] I 
>  really think you'd be far better off persuing this at the C++ 
>  language level and lobbying for a language threading model that 
>  can coexist with (carefully designed) POSIX implementations but 
>  is not directly dependent on the POSIX language."
> 
>    -- DRB (sorta annoyed by pseudo-C++ illustrations ;-) )

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
guy
11/8/2004 11:36:46 PM
guy.peleg@gmail.com (Guy) wrote in message
news:<f4d01807.0411072321.719f19e2@posting.google.com>...

 > Thanks but I think I need to rephrase the question.

 > Suppose I have a 'long'(in either 32-bit or 64-bit) I have a process
 > with two threads. One is reading this 'long' and one is writing it. Is
 > it possible that while the writing thread is in the middle of the
 > writing, the process will switched to the reading thread? Or is it
 > true to say that this action (updating or reading) this long is safe?

It's not possible to say anything.

I think your missing what most of the posters have been trying to tell
you.  Atomicity is not necessarily relevant.  You speak of switching
threads, for example.  But on many machines today, there are two or more
threads running simultaneously -- no thread switch is necessary for
problems to occur, and the issue is not just atomicity, but visibility.
On most machines, a thread switch can only occur on an instruction
boundary -- Intel processors have an increment memory instruction, and
if thread switching on a single processor were the only issue, that
would suffice for an atomic increment.  It doesn't, and it is not
without reason that processors have additional hardware synchronization
means; even 25 years ago, Intel required a LOCK prefix on an increment
in memory, if you wanted the operation to be atomic, and the plethory of
caches and pipelines in a modern processor just makes the issue more
complex.

Under Posix, the rule is simple: if any thread modifies, all accesses
must be serialized by means of one of the system locking mechanisms
(mutex, semaphore, etc.).  I suspect that the rule under Windows is the
same.  On the other hand, many systems provide additional, system
specific methods of serialization or synchronization, and in most cases,
if you're not afraid of a little assembler, you can avoid the system
synchronizations in specific cases.  (On both Sparc and Intel 32 bit
architectures, this involves special machine instructions that are never
generated by the compiler.)

If all you mean is that if you have a long with 0, and one thread writes
0xFFFFFFFF, then other threads can never see anything but 0 or
0xFFFFFFFF (and not, for example, 0xFFFF0000 or 0x0000FFFF), then the
answer still depends on the processor and the alignement of the data.
And theoretically, at least, it is possible that the other thread never
see the change unless you do something special.

--
James Kanze           GABI Software         http://www.gabi-soft.fr
Conseils en informatique orient�e objet/
                    Beratung in objektorientierter Datenverarbeitung
9 place S�mard, 78210 St.-Cyr-l'�cole, France, +33 (0)1 30 23 00 34

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
kanze
11/9/2004 12:22:19 PM
guy.peleg@gmail.com (Guy) wrote in message news:<f4d01807.0411072321.719f19e2@posting.google.com>...
 > Thanks but I think I need to rephrase the question.
 >
 > Suppose I have a 'long'(in either 32-bit or 64-bit) I have a process
 > with two threads. One is reading this 'long' and one is writing it. Is
 > it possible that while the writing thread is in the middle of the
 > writing, the process will switched to the reading thread? Or is it
 > true to say that this action (updating or reading) this long is safe?

There are no guarantees in C++, whether longs are 32, 33 or 64 bits.
Of course, there are no threads in C++, so this usually doesn't
matter. Once you use a threading extension to C++, that extension
should tell you - and you should ask your question in a group which
covers that extension.

Regards,
Michiel Salters

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
Michiel
11/9/2004 12:22:48 PM
Guy wrote:
 > Thanks but I think I need to rephrase the question.
 >
 > Suppose I have a 'long'(in either 32-bit or 64-bit) I have a process
 > with two threads. One is reading this 'long' and one is writing it. Is
 > it possible that while the writing thread is in the middle of the
 > writing, the process will switched to the reading thread? Or is it
 > true to say that this action (updating or reading) this long is safe?
<snip>

This is unanswerable without knowing the details of the running
environment (OS, processor architecture, library implementation...).
Multithreaded programs are outside the scope of the C++ standard.

-- 
Ben Hutchings
If God had intended Man to program,
we'd have been born with serial I/O ports.

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
Ben
11/9/2004 12:27:01 PM
guy.peleg@gmail.com (Guy) wrote
> Thanks but I think I need to rephrase the question. 
> 
> Suppose I have a 'long'(in either 32-bit or 64-bit) I have a process
> with two threads. One is reading this 'long' and one is writing it. Is
> it possible that while the writing thread is in the middle of the
> writing, the process will switched to the reading thread? Or is it
> true to say that this action (updating or reading) this long is safe?

I don't think you've asked anything here that wasn't assumed the first
time around. In any case, the answer doesn't change: it's still NO.

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
allan_w
11/9/2004 9:11:44 PM
Reply:

Similar Artilces:

Building a mailbox in C++ with atomic operations
Hello world, I'm thinking of building a message-passing shared-nothing massively- multithreaded system. One thing I know I'll need interlocks for are the mailboxes. Basically, each process has a mailbox which any other process (who "knows" that process's address) can add messages to. Since I don't guarantee order of message delivery, I've decided to use a simple singly-linked list to represent the mailbox. However, I'd like to try using atomic operations instead of protecting with a mutex. The atomic operations library I intend to use will be the GLib atomics: http://library.gnome.org/devel/glib/stable/glib-Atomic-Operations.html The list elements class are: class ValueHolder { public: Value* data; ValueHolderRef next; }; where ValueHolderRef is a smart pointer type that also doubles as the representation of the list: class ValueHolderRef { private: ValueHolder* p; ValueHolderRef(ValueHolderRef const&); //disallowed! ValueHolderRef& operator=(ValueHolderRef const&); //disallowed! public: ValueHolderRef(ValueHolder* np=0) : p(np) { } void reset(ValueHolder* np=0) { delete p; p = np;} ~ValueHolderRef() { reset(); } // insert a singleton list element into this list void insert(ValueHolderRef&); // remove a single list element and put it into that other ref void remove(ValueHolderRef&); //swap void swap(ValueHolderRef&)...

C++0x: sequentially consistent atomic operations
I'm trying to figure out what synchronizes-with edges sequentially consistent atomic operations must introduce. My reasoning is based on latest C++0x draft: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2691.pdf And Peter Dimov's excellent proposal on bidirectional fences: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2633.html First example: std::atomic<int> x, y; // both initially 0 void thread1() { x.fetch_add(1, std::memory_order_seq_cst); int r1 = y.load(std::memory_order_relaxed); } void thread1() { y.fetch_add(1, std::memory_order_seq_cst); int r2 = x.load(std::memory_order_relaxed); } As I understand, (r1 == 0) && (r2 == 0) is possible output, because no synchronizes-with edges introduced (at least I can't find anything which says the opposite). Is this intended? It's quite counter-intuitive. fetch_add operations are ordered, and they both acquire and release. So why here is no synchronizes-with edge between them? Then I don't understand what differentiate seq_cst operations from acq_rel operations, here seq_cst operations acts exactly like acq_rel operations. Second example: std::atomic<int> x, y; // both initially 0 void thread1() { x.fetch_add(1, std::memory_order_seq_cst); int r1 = y.load(std::memory_order_relaxed); } void thread1() { y.store(1, std::memory_order_relaxed); std::atomic_thread_fence(std::memory_order_seq_cst); ...

jython and C-c C-c
How do I get C-c C-c to work with jython? I have the jpython command set to jython, and I can start the interpreter with C-C ! and then use C-c C-c, but this is rather frustrating. If I try to use C-c C-c without first starting the interpreter in another window I get wrong type argument: sequencep, jpython Thanks, Dave Cook ...

Better C/C++ Than C/C++?
I am looking for a good systems programming language that can be used instead of C/C++. My qualifications for the language are: * mature compiler(s) that produce native-code binaries (for Windows) * open source - preferable, but not 100% necessary Thanks, Kevin "Kevin Albrecht" <kevin@albrecht.net> writes: > I am looking for a good systems programming language > that can be used instead of C/C++. My qualifications > for the language are: > > * mature compiler(s) that produce native-code > binaries (for Windows) Ocaml, D, cyclone, Eiffel, Beta > * open source - preferable, but not 100% necessary what's wrong with using C? Friedrich > what's wrong with using C? Too low level, no built-in garbage collection. -- Kevin "Kevin Albrecht" <kevin@albrecht.net> writes: >> what's wrong with using C? > > Too low level, Well the Smalltalk people say, have a small language and a big library. I assume C's library status beyond that of Smalltalk. > no built-in garbage collection. Use the Boehm Weisser GC. Friedrich "Kevin Albrecht" <kevin@albrecht.net> wrote in message news:<2TiYb.237892$rj7.1641209@twister.tampabay.rr.com>... > I am looking for a good systems programming language > that can be used instead of C/C++. My qualifications > for the language are: > > * mature compiler(s) that produce native-code > binaries (for Windows) > ...

Atomic variable Vs. Atomic operation
Hi, Lets say I have two shared variables a,b which are related to each other. When multiple applications share these shared variables, access to them needs to be an atomic operation, otherwise the relation may break. So to ensure mutual exclusion, I'll put their modification under a critical section protected by lock. critical_code { P(mutex) a := something b := something V(mutex) } Lets say my hardware/OS/compiler supports atomic variables. Then I modified my above code as follows. code { atomic a := something atomic b := something } Can this code ensure mutual exclusion, when accessed by multiple applications? Sincerely, Srinivas Nayak Srinu <sinu.nayak2001@gmail.com> writes: > Lets say I have two shared variables a,b which are related to each > other. When multiple applications share these shared variables, access > to them needs to be an atomic operation, otherwise the relation may > break. So to ensure mutual exclusion, I'll put their modification > under a critical section protected by lock. > > critical_code > { > P(mutex) > a := something > b := something > V(mutex) > } In this case, only one thread can run critical_code at a time, so the whole operation is effectively atomic. > Lets say my hardware/OS/compiler supports atomic variables. Then I > modified my above code as follows. > > code > { > ...

Atomic variable Vs. Atomic operation
Hi, Lets say I have two shared variables a,b which are related to each other. When multiple applications share these shared variables, access to them needs to be an atomic operation, otherwise the relation may break. So to ensure mutual exclusion, I'll put their modification under a critical section protected by lock. critical_code { P(mutex) a := something b := something V(mutex) } Lets say my hardware/OS/compiler supports atomic variables. Then I modified my above code as follows. code { atomic a := something atomic b := something } Can this code ensure mutua...

Atomic variable Vs. Atomic operation
Hi, Lets say I have two shared variables a,b which are related to each other. When multiple applications share these shared variables, access to them needs to be an atomic operation, otherwise the relation may break. So to ensure mutual exclusion, I'll put their modification under a critical section protected by lock. critical_code { P(mutex) a := something b := something V(mutex) } Lets say my hardware/OS/compiler supports atomic variables. Then I modified my above code as follows. code { atomic a := something atomic b := something } ...

The Wikipedia article on C and C++ operators
This concerns the Wikipedia article on C and C++ operators: http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B Until very recently the first table in the page was a very useful one on the precedence of C operators. This has recently been replaced by one on C++ operators. I'm not at all happy with that but I guess I can always link to the history page. But I was wondering if anyone could have a look and verify that the C part is correct. I'm pretty sure that in C postfix/prefix increment/decrement have the same priority. Is it different in C++ ? By the way here's the page I h...

Pseudo-atomic
http://semipublic.comp-arch.net/wiki/Pseudo-atomic [[Pseudo-atomic]] is a term that I (Glew) have coined to refer to atomic operations that can fail to be atomic, such as: * [[Load-linked/store-conditional (LL/SC)]] * IBM z196's [[LOAD PAIR DISJOINT]] * even [[hardware transactional memory]] ** such as [[Intel Transactional Synchronization Extensions (TSX)]]'s [[Restricted Transactional Memory (RTM)]], where "the [[XBEGIN]] instruction takes an operand that provides a relative offset to the fallback instruction address if the RTM region could not be successfully executed tra...

Is the behaviour of * operator an example of operator oveloading in c?
The * operator behaves in 2 different ways. It is used as the value at address operator as well as the multiplication operator. Does this mean * is overloaded in c? karthik wrote: > The * operator behaves in 2 different ways. It is used as the value at > address operator as well as the multiplication operator. Does this mean > * is overloaded in c? Which one? Either way, you decide... http://en.wikipedia.org/wiki/Operator_overloading Note: your question is probably better suited to comp.programming. -- Peter karthik schrieb: > The * operator behaves in 2 different ways. ...

Is there something similar to ?: operator (C/C++) in Python?
Hi, I need to pass a bunch of parameters conditionally. In C/C++, I can do func(cond1?a:b,cond2?c:d,.....) In Python, I am using temporary variables like if cond1: para1 = a else: para1 = b # .... # a bunch of such if/else func(para1, para2,...) Is there an easier way to do this in Python? BTW, I do not want to use the following since all of a,b,c,d etc will be evaluated. def condValue(cond, val1,val2): if cond: return val1 else: return val2 func(condValue(cond1,a,b), condValue(cond2,c,d),...) Thanks. Bo Bo Peng wrote: > I need to pass a bunch of parameter...

slime C-c C-c annoyance
Does anyone have a good workaround for this problem other than: just be careful! When I've compiled a large package and slime has given me a *slime-compilation* buffer, I like to work through this buffer issue by issue, fixing the errors, warnings, etc. But If I ever press C-c C-c in the editor window while fixing an error, slime destroys the *(slime-compilation* buffer with the compilation output of C-c C-c. Jim Newton <jimka.issy@gmail.com> writes: > Does anyone have a good workaround for this problem other than: just be careful! > > When I've compiled a ...

C/C++ in matlab and matlab in C/C++ ?
Is it possible to read C/C++ code in matlab and the other way around too? Hi, as long as C or C++ are written in text files you can edit them in the matlab editor. To see the special character of C or C++ coding language, in the editor go to menus: file>preferences>Edito/Debugger>language and on popup "Language" select "C/C++". This does not allow you to run the C/C++ code, just to view it i nicer way... regards, chris saneman <asdfsdf@asd.com> wrote in message <frl846 $f8i$2@news.net.uni-c.dk>... > Is it possible to read C/C...

C as a Subset of C++ (or C++ as a superset of C)
Isn't it a lame use of human time and effort to maintain completely separate C and C++ standards? As in the words of Betty White about Facebook: "It seems like an incredible waste of time". Why don't the two standards groups get together and agree on a common specification for the ground which both standards cover? There would still be two separate standards, but they'd both be exactly the same for the common ground. The common ground document could be referred to by both standards instead of being maintained by both groups in individual efforts resulting in...

c------->c++ and c++------>c
We can write c program in turbo c++ editor.But reverse is not true why? i.e The program will not compile if u write c++ program in turbo c editor vim wrote: > We can write c program in turbo c++ editor.But reverse is not true why? > i.e The program will not compile if u write c++ program in turbo c > editor This isn't about C; this is about some editor. Why the fircone should /we/ know? Ask in a relevant group. [And /why/, in an editor specialised to some specific programming languages, would you expect it to compile a /different/ one? Would you expect turbo perl to compi...

C/C++ in MATALB or MATLAB in C/C++?
Hi I've been asking on the net how to use MEX properly so that I can use C/C++ in MATLAB, but information is not forthcoming. There seems to be a lot on using MATLAB in C/C++ but not the other way around. I understand Mathworks is trying very hard to sell the Matlab Compiler, but even so, why is it SO hard to get information about MEX? Or is it that I've missed something very fundamental, meaning that I'm struggling over something that is actually quite easy? Any thoughts and info would be great. Thanks BullDog BullDog wrote: > Hi > > I've been asking on the net ...

Setting & Clearing flags and C/C++ operators...
This is very much related to the Moria conversion I'm carrying out at the moment. I hope to have something to bring along to the ROUGOL show in a couple of weeks. Won't be a working program I'm afraid, but at least something concrete in the way of code listings. However, bitmasks are used all over the place dealing with player status, item drops, monsters etc. I'm coming up against various C tricks <variable> =& ~<variable> for example. The other common one is |=. I understand what they are in C and I think I have most of them covered. It's the usage of th...

Automating C/C++ Coding Standards for any Operating System
Abraxas Software Understanding YOUR GOALS & Using CodeCheck Implementing Corporate Source Code Guidelines C/C++ Source Code GuideLine Automation The goals of CodeCheck are: 1 To create a standard which will enable you to provide the customer with a quality product in a timely manner. 2 To promote standardization of software development among programmers. 3 To act as a learning tool for new programmers. 4 To act as a reference tool for all levels of programmers. 5 To promote a team approach among programmers. 6 To help programmers create readable, re-usable and maintainable software. 7 T...

C, C++ and C# Forums
Throne Software has opened up C, C++ and C# Forums at: http://www.thronesoftware.com/forum/ Join us! In article <1120963701.862698.160260@g14g2000cwa.googlegroups.com>, Throne Software <mail@thronesoftware.com> writes >Throne Software has opened up C, C++ and C# Forums at: > >http://www.thronesoftware.com/forum/ > >Join us! Why? The beauty of news groups is that they come to me I don't have to go to them. Also all the people who have been around a while know what they are doing and are here. I noticed that there are some C and C++ Forums on another system. Full of the blind (opinionated) leading the blind. The problem is that as the experienced people who have been around a long while are on usenet. the system works. Why move. Certainly not to a forum on a commercial web site. The web site might go down. Usenet can't. Web based systems are not as safe. I have to trust you about cookies and all sorts. (active X etc). Usenet is international and independent. It is not controlled by anyone. Why would anyone move from this system to a web based one in a a rogue state? There is no point in running a web based forum except as a support forum for your own products. -- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/ /\/\/ chris@phaedsys.org www.phaedsys.org \/\/\ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ Chris Hills wrote: > In article <1120963701.862...

C,, C++, Java, C#
I come from C,C++,Java and C#. What can SmallTalk do for me and for what cost? Regarding the Squeak thing, it's interesting though confusing. Is it an IDE? Why are the menus so wacky? "DM McGowan II" <nospam@nospam.net> wrote in message news:PLednX2vnLd11IncRVn-rA@comcast.com... > I come from C,C++,Java and C#. What can SmallTalk do for me ...? Ask not what Smalltalk can do for, but what can you do with Smalltalk. :-) In very few words, it significantly reduces time to market, while enhancig the development experience. This is because: 1. It manages the memory for you, so you don't have to allocate/deallocate all the time (the source of some of the most nasty bugs in C). Java and C# learnt that feature from ST. 2. It has single inheritance. 3. All the development is in a single file, called the image, so you don't have to fish for where did you put that missing class. Yet, you don't have to go through thousands of lines of code to find the method you wrote three months ago. 4. It's the language for which it's easier to work within the Agile methodologies. 5. It's strongly typed without being unnecessarily redundant. 6. It's "wacky" interface releases you from the need to use curlys. 7. It comes with a huge library, so you don't need to reinvent the wheel as much. 8. It's debugger is highly integrated and friendly, so the experience of findin...

C, C++ and C# Forums
Throne Software has opened up C, C++ and C# Forums at: http://www.thronesoftware.com/forum/ Join us! ...

c,c++,obj-c
Of the 3 languages titled in this post is c++ older than obj-c ? Would someone experienced in C be able to dive right into C++ rather than obj-c ? Java is out for me now except applet programming I think I'm going to go with just C and C++. Bill Bill Cunningham wrote: > Of the 3 languages titled in this post is c++ older than obj-c ? Why does that matter? Do you want to use an old language? Try Fortran or LISP. > Would > someone experienced in C be able to dive right into C++ rather than > obj-c ? Not quite dive in, at least not into the OO parts of C++. ...

C, C++ and C# Forums
Throne Software has opened up C, C++ and C# Forums at: http://www.thronesoftware.com/forum/ Join us! Throne Software wrote: > Throne Software has opened up C, C++ and C# Forums at: > > http://www.thronesoftware.com/forum/ For all of your forums newsgroups already exist. > Join us! Why? Don't see any reason to support your marketing. ...

Is this operation atomic?
I'm finishing up a total rewrite of an interrupt-heavy program (the previous version was a nightmare of pushf/cli/popf wrapping to prevent race conditions in code shared by multiple interrupt handlers -- don't ask) and I have been staring at it for so long that I am confusing myself as to which operations can be considered atomic or not. Here is clearing a flag variable (this is 16-bit real mode x86): C6060A0000 MOV BYTE PTR [000A],0 Can I consider this operation atomic, or can this somehow be interrupted once instruction decoding and execution has begun? Jim Leonard wro...

About C and C++
Hello, I will resume it like this: On the criterias of "complexity" and "difficulty", the C and C++ programming languages are more complex and difficult than Object Pascal for example, so since they are more complex and difficult they are likely to create something like a darwinian filter who don't let the weaker humans among us humans to cross or to climb the social ladder, this is why i think that C and C++ do participate to social darwinism, this is why i say that C and C++ are bad. Thank you, Amine Moulay Ramdane. On Sun, 08 Jun 2014 06:1...

Web resources about - atomic operation - comp.lang.c++.moderated

United States Special Operations Command - Wikipedia, the free encyclopedia
The United States Special Operations Command ( USSOCOM ) is the Unified Combatant Command charged with overseeing the various Special Operations ...

Logan police set up school zone drink driving operation
Logan police step up operation targeting drink drivers in school zones after nabbing more drunk mums and dads than expected.

Confessions of a Sydney surgeon: why your operation may not work
Commonly performed operations can be found to be useless, according to a practising Sydney surgeon.

Confessions of a Sydney surgeon: why your operation may not work
Commonly performed operations can be found to be useless, according to a practising Sydney surgeon.


Fusion Cues Up a VP of Digital Operations
... newest career chapter. Per Fusion chief digital officer Daniel Eilemberg , Mehta will be joining the company as vice president of digital operations. ...

Oberlin professor claims ISIS a 'CIA and Mossad operation'
Joy Karega, an assistant professor of rhetoric and composition at Oberlin College, let loose on Facebook with several unhinged posts about Israel ...

Medal of Honor recipient describes dramatic Taliban rescue operation
Navy SEAL Edward Byers received the Medal of Honor for his actions during a 2012 mission to rescue an American captive from the Taliban

Senvion To Launch Wind Energy Operations In India
... to an equity investment firm, Senvion is set to enter the wind energy market in India. Europe-based Senvion has announced plans to start operations ...

Inside a security operations center
... services provider Alert Logic reveals how proactive monitoring detects breaches and accelerates incident response Walk into a security operations ...

Resources last updated: 3/7/2016 9:49:51 AM