atomic.C

00001 #include <iostream>
00002 
00003 #include <archon/util/exception.H>
00004 #include <archon/util/atomic.H>
00005 
00006 using namespace std;
00007 using namespace Archon::Utilities;
00008 
00009 int main()
00010 {
00011   set_unexpected(Exception::terminal<exceptionCatchInfo>);
00012   set_terminate (Exception::terminal<exceptionCatchInfo>);
00013 
00014   Atomic a(0);
00015 
00016   cerr << "1 == " <<  a    << " == (" << (++a) << ") == " << (a+1) << endl;
00017 
00018   a += -1;
00019   a -= -1;
00020 
00021   cerr << "1 == " << (a-1) << " == (" << (a++) << ") == " <<  a    << endl;
00022 
00023   return 0;
00024 }

Generated on Sun Jul 30 22:55:43 2006 for Archon by  doxygen 1.4.4