Changeset 27712 for lang/cplusplus/i3
- Timestamp:
- 01/01/09 03:54:56 (4 years ago)
- Files:
-
- 1 modified
-
lang/cplusplus/i3/trunk/src/mol/include/mol/Mol.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/cplusplus/i3/trunk/src/mol/include/mol/Mol.h
r27708 r27712 77 77 class atomic : boost::noncopyable 78 78 { 79 Tt;79 void* t; 80 80 public: 81 atomic(T t) : t(t) 82 { 81 atomic(T t) 82 { 83 store(t); 83 84 } 84 85 … … 98 99 void* tmp = NULL; 99 100 memcpy(&tmp, &new_val, sizeof(new_val)); 100 return (T)InterlockedExchangePointer(101 void* got = InterlockedExchangePointer( 101 102 reinterpret_cast<void* volatile *>(&t), tmp); 103 T cooked; 104 memcpy(&cooked, &got, sizeof(cooked)); 105 return cooked; 102 106 } 103 107
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)