Changeset 36280
- Timestamp:
- 12/27/09 18:32:14 (3 years ago)
- Location:
- lang/objective-cplusplus/i3/trunk
- Files:
-
- 11 modified
-
Makefile.am (modified) (1 diff)
-
autotools/tests/Makefile.am (modified) (1 diff)
-
src/Common.h (modified) (2 diffs)
-
src/Delegate.h (modified) (1 diff)
-
src/mil/include/mil/Atomic.h (modified) (1 diff)
-
src/mil/include/mil/Environment.h (modified) (2 diffs)
-
src/mil/include/mil/Mil.h (modified) (2 diffs)
-
src/mil/include/mil/ModuleCommon.h (modified) (1 diff)
-
src/mil/include/mil/PrecompiledHeaders.h (modified) (1 diff)
-
src/os-windows/Os.cpp (modified) (1 diff)
-
tmp/main5.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/objective-cplusplus/i3/trunk/Makefile.am
r36275 r36280 96 96 97 97 if WITH_OS_WINDOWS 98 99 DISTCHECK_CONFIGURE_FLAGS += --enable-threads=win32 100 98 101 if WITH_GUI_WINDOWS 99 102 -
lang/objective-cplusplus/i3/trunk/autotools/tests/Makefile.am
r36185 r36280 3 3 AUTOM4TE = autom4te 4 4 DISTCLEANFILES = $(top_builddir)/i3_test$(EXEEXT) $(top_builddir)/mil_test$(EXEEXT) 5 6 atconfig: $(top_builddir)/config.status 7 cd $(top_builddir) && $(SHELL) config.status 5 8 6 9 check-local: atconfig atlocal $(TESTSUITE) -
lang/objective-cplusplus/i3/trunk/src/Common.h
r36265 r36280 1 1 #pragma once 2 2 3 #if defined(HAVE_CONFIG_H) && !defined(PACKAGE_NAME) 4 #include <config.h> 5 #endif 3 #include <mil/Mil.h> 4 #include <mil/Atomic.h> 5 #include <mil/Thread.h> 6 #include <mil/DoubleBuffer.h> 6 7 7 8 #ifdef _MSC_VER … … 60 61 #endif 61 62 62 // mil63 #include <mil/Mil.h>64 #include <mil/Atomic.h>65 #include <mil/Thread.h>66 #include <mil/DoubleBuffer.h>67 68 63 #ifdef MIL_OS_WINDOWS 69 64 # include "os-windows/Os.h" -
lang/objective-cplusplus/i3/trunk/src/Delegate.h
r36148 r36280 18 18 19 19 template <typename T> void execute(T& event); 20 template <typename T> void execute_hook_(T& event) {} 20 21 template <typename T> void beforeExecute(T& event) {} 21 22 template <typename T> void afterExecute(T& event) {} -
lang/objective-cplusplus/i3/trunk/src/mil/include/mil/Atomic.h
r35623 r36280 2 2 3 3 #include "Mil.h" 4 5 /*6 #ifdef InterlockedExchangePointer7 #define MIL_INTERLOCKED8 #elif defined(_GNUC_) && _GNUC_ >= 4 && 09 #define MIL_INTERLOCKED10 #include <stdint.h>11 static inline int32_t InterlockedCompareExchange(volatile int32_t *dest, int32_t exch, int32_t comp)12 {13 return __sync_val_compare_and_swap(dest, exch, comp);14 }15 static inline void* InterlockedCompareExchangePointer(volatile void* *dest, void* exch, void* comp)16 {17 return __sync_val_compare_and_swap(dest, exch, comp);18 }19 static inline int32_t InterlockedIncrement(volatile int32_t *dest)20 {21 return __sync_fetch_and_add(dest, 1) + 1;22 }23 static inline int32_t InterlockedDecrement(volatile int32_t *dest)24 {25 return __sync_fetch_and_sub(dest, 1) - 1;26 }27 static inline int32_t InterlockedExchange(volatile int32_t *dest, int32_t exch)28 {29 return __sync_lock_test_and_set(dest, exch);30 }31 static inline void* InterlockedExchangePointer(volatile void* *dest, void* exch)32 {33 return __sync_lock_test_and_set(dest, exch);34 }35 static inline int32_t InterlockedExchangeAdd(volatile int32_t *dest, int32_t add)36 {37 return __sync_fetch_and_add(dest, add);38 }39 40 #endif41 */42 4 43 5 #ifdef HAVE_GCC_ATOMIC_OPERATIONS -
lang/objective-cplusplus/i3/trunk/src/mil/include/mil/Environment.h
r32102 r36280 2 2 3 3 // guess environment 4 5 #if defined(HAVE_CONFIG_H) && !defined(PACKAGE_NAME) 6 #include <config.h> 7 #endif 8 9 #if !defined(_DEBUG) && !defined(NDEBUG) 10 # define NDEBUG 11 #endif 12 13 #if defined(NDEBUG) && defined(_DEBUG) 14 #error 15 #endif 16 4 17 #if defined(MIL_OS_WINDOWS) && defined(MIL_OS_UNIX) 5 18 # error … … 22 35 #endif 23 36 24 #if defined(NDEBUG) && defined(_DEBUG)25 #error26 #endif -
lang/objective-cplusplus/i3/trunk/src/mil/include/mil/Mil.h
r35623 r36280 4 4 * MI Library 5 5 */ 6 #include "PrecompiledHeaders.h" 6 7 #include "Environment.h" 7 #include "PrecompiledHeaders.h" 8 8 9 #include "FilterException.h" 9 10 … … 24 25 #include "MscCrt.h" 25 26 #include "Debug.h" 26 #include "Atomic.h"27 27 28 28 #ifndef decltype -
lang/objective-cplusplus/i3/trunk/src/mil/include/mil/ModuleCommon.h
r36274 r36280 151 151 152 152 template <class Event> 153 void execute_hook_(Event&) {} 153 void execute_hook_(Event&) {}; 154 154 155 155 template <class Event> 156 void execute_hook(Event&) // no bracket 157 156 void execute_hook(Event&) {}; // no bracket 158 157 159 158 ModuleCommon() : tls(this->thread_id) { -
lang/objective-cplusplus/i3/trunk/src/mil/include/mil/PrecompiledHeaders.h
r36260 r36280 6 6 #pragma once 7 7 8 #include "Environment.h"9 //#ifndef NDEBUG10 11 8 #ifdef _MSC_VER 12 13 # if !defined(_DEBUG) && !defined(NDEBUG)14 # define NDEBUG15 # endif16 9 17 10 #pragma warning(push) -
lang/objective-cplusplus/i3/trunk/src/os-windows/Os.cpp
r36210 r36280 117 117 PACL pDacl = NULL; 118 118 EXPLICIT_ACCESS explicitAccess = {}; 119 119 TCHAR everyone[] = _T("Everyone"); 120 120 BuildExplicitAccessWithName( 121 &explicitAccess, _T("Everyone"),121 &explicitAccess, everyone, 122 122 GENERIC_READ | FILE_ADD_SUBDIRECTORY, 123 123 GRANT_ACCESS, -
lang/objective-cplusplus/i3/trunk/tmp/main5.cpp
r36278 r36280 6 6 int get_native_thread_id() { 7 7 return GetCurrentThreadId(); 8 } 9 int sleep(int seconds) { 10 Sleep(seconds * 1000); 11 return 0; 8 12 } 9 13 #else … … 96 100 } 97 101 98 //{99 // MyThread* thread= [[MyThread alloc] init];100 // thread->thread_id = 1;101 // [NSThread detachNewThreadSelector:@selector(startThread) toTarget:threadwithObject:nil];102 //}102 { 103 MyThread* a = [[MyThread alloc] init]; 104 a->thread_id = 1; 105 [NSThread detachNewThreadSelector:@selector(startThread) toTarget:a withObject:nil]; 106 } 103 107 104 108 sleep(2);
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)