Changeset 36280

Show
Ignore:
Timestamp:
12/27/09 18:32:14 (3 years ago)
Author:
saturday06
Message:

jijijijiji

Location:
lang/objective-cplusplus/i3/trunk
Files:
11 modified

Legend:

Unmodified
Added
Removed
  • lang/objective-cplusplus/i3/trunk/Makefile.am

    r36275 r36280  
    9696 
    9797if WITH_OS_WINDOWS 
     98 
     99DISTCHECK_CONFIGURE_FLAGS += --enable-threads=win32 
     100 
    98101if WITH_GUI_WINDOWS 
    99102 
  • lang/objective-cplusplus/i3/trunk/autotools/tests/Makefile.am

    r36185 r36280  
    33AUTOM4TE = autom4te 
    44DISTCLEANFILES = $(top_builddir)/i3_test$(EXEEXT) $(top_builddir)/mil_test$(EXEEXT) 
     5 
     6atconfig: $(top_builddir)/config.status 
     7        cd $(top_builddir) && $(SHELL) config.status 
    58 
    69check-local: atconfig atlocal $(TESTSUITE) 
  • lang/objective-cplusplus/i3/trunk/src/Common.h

    r36265 r36280  
    11#pragma once 
    22 
    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> 
    67 
    78#ifdef _MSC_VER 
     
    6061#endif 
    6162 
    62 // mil 
    63 #include <mil/Mil.h> 
    64 #include <mil/Atomic.h> 
    65 #include <mil/Thread.h> 
    66 #include <mil/DoubleBuffer.h> 
    67  
    6863#ifdef MIL_OS_WINDOWS 
    6964#  include "os-windows/Os.h" 
  • lang/objective-cplusplus/i3/trunk/src/Delegate.h

    r36148 r36280  
    1818 
    1919    template <typename T> void execute(T& event); 
     20    template <typename T> void execute_hook_(T& event) {} 
    2021    template <typename T> void beforeExecute(T& event) {} 
    2122    template <typename T> void afterExecute(T& event) {} 
  • lang/objective-cplusplus/i3/trunk/src/mil/include/mil/Atomic.h

    r35623 r36280  
    22 
    33#include "Mil.h" 
    4  
    5 /* 
    6 #ifdef InterlockedExchangePointer 
    7 #define MIL_INTERLOCKED 
    8 #elif defined(_GNUC_) && _GNUC_ >= 4 && 0 
    9 #define MIL_INTERLOCKED 
    10 #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 #endif 
    41 */ 
    424 
    435#ifdef HAVE_GCC_ATOMIC_OPERATIONS 
  • lang/objective-cplusplus/i3/trunk/src/mil/include/mil/Environment.h

    r32102 r36280  
    22 
    33// 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 
    417#if defined(MIL_OS_WINDOWS) &&  defined(MIL_OS_UNIX) 
    518#  error 
     
    2235#endif 
    2336 
    24 #if defined(NDEBUG) && defined(_DEBUG) 
    25 #error 
    26 #endif 
  • lang/objective-cplusplus/i3/trunk/src/mil/include/mil/Mil.h

    r35623 r36280  
    44 * MI Library 
    55 */ 
     6#include "PrecompiledHeaders.h" 
    67#include "Environment.h" 
    7 #include "PrecompiledHeaders.h" 
     8 
    89#include "FilterException.h" 
    910 
     
    2425#include "MscCrt.h" 
    2526#include "Debug.h" 
    26 #include "Atomic.h" 
    2727 
    2828#ifndef decltype 
  • lang/objective-cplusplus/i3/trunk/src/mil/include/mil/ModuleCommon.h

    r36274 r36280  
    151151 
    152152        template <class Event> 
    153         void execute_hook_(Event&) {} 
     153    void execute_hook_(Event&) {}; 
    154154 
    155155        template <class Event> 
    156     void execute_hook(Event&) // no bracket 
    157  
     156    void execute_hook(Event&) {}; // no bracket 
    158157 
    159158    ModuleCommon() : tls(this->thread_id) { 
  • lang/objective-cplusplus/i3/trunk/src/mil/include/mil/PrecompiledHeaders.h

    r36260 r36280  
    66#pragma once 
    77 
    8 #include "Environment.h" 
    9 //#ifndef NDEBUG 
    10  
    118#ifdef _MSC_VER 
    12  
    13 #  if !defined(_DEBUG) && !defined(NDEBUG) 
    14 #    define NDEBUG 
    15 #  endif 
    169 
    1710#pragma warning(push) 
  • lang/objective-cplusplus/i3/trunk/src/os-windows/Os.cpp

    r36210 r36280  
    117117        PACL pDacl = NULL; 
    118118        EXPLICIT_ACCESS explicitAccess = {}; 
    119  
     119        TCHAR everyone[] = _T("Everyone"); 
    120120        BuildExplicitAccessWithName( 
    121             &explicitAccess, _T("Everyone"), 
     121            &explicitAccess, everyone, 
    122122            GENERIC_READ | FILE_ADD_SUBDIRECTORY, 
    123123            GRANT_ACCESS, 
  • lang/objective-cplusplus/i3/trunk/tmp/main5.cpp

    r36278 r36280  
    66int get_native_thread_id() { 
    77    return GetCurrentThreadId(); 
     8} 
     9int sleep(int seconds) { 
     10    Sleep(seconds * 1000); 
     11    return 0; 
    812} 
    913#else 
     
    96100    } 
    97101 
    98 //    { 
    99 //        MyThread* thread = [[MyThread alloc] init]; 
    100 //        thread->thread_id = 1; 
    101 //        [NSThread detachNewThreadSelector:@selector(startThread) toTarget:thread withObject:nil]; 
    102 //    } 
     102    { 
     103        MyThread* a = [[MyThread alloc] init]; 
     104        a->thread_id = 1; 
     105        [NSThread detachNewThreadSelector:@selector(startThread) toTarget:a withObject:nil]; 
     106    } 
    103107 
    104108    sleep(2);