Changeset 34328

Show
Ignore:
Timestamp:
07/07/09 01:23:19 (4 years ago)
Author:
saturday06
Message:

samazama

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

Legend:

Unmodified
Added
Removed
  • lang/objective-cplusplus/i3/trunk/src/mil/include/mil/Module.h

    r34327 r34328  
    6969                return head; 
    7070            } 
     71 
     72                        return NULL; 
    7173        } 
    7274 
  • lang/objective-cplusplus/i3/trunk/src/mil/include/mil/PrecompiledHeaders.h

    r34041 r34328  
    55 
    66#pragma once 
     7 
     8#ifdef HAVE_CONFIG_H 
     9#include <config.h> 
     10#endif 
     11 
    712 
    813#include "Environment.h" 
  • lang/objective-cplusplus/i3/trunk/src/mil/include/mil/os-unix/Debug.h

    r33795 r34328  
    3535        if (will_abort) 
    3636        { 
    37             cerr << "mil_abort !" << endl; 
    38             abort(); 
     37            cerr << "mil_abort() !" << endl; 
     38            *((volatile int*)0) = -1; 
     39            cerr << "SEGV suppressed !" << endl; 
     40            //abort(); 
    3941        } 
    4042    } 
  • lang/objective-cplusplus/i3/trunk/src/mil/include/mil/os-windows/Debug.h

    r34065 r34328  
    183183        { 
    184184            cerr << "mil_abort !" << endl; 
     185            DebugBreak(); 
     186            *((volatile int*)0) = -1; 
     187            cerr << "SEGV suppressed !" << endl; 
     188 
    185189#ifdef _WIN32_WCE 
    186190            exit(1); 
  • lang/objective-cplusplus/i3/trunk/src/mil/include/mil/os-windows/Thread.h

    r34164 r34328  
    55namespace mil 
    66{ 
     7class Mutex 
     8{ 
     9        CRITICAL_SECTION cs; 
     10public: 
     11        Mutex() 
     12        { 
     13                InitializeCriticalSection(&cs); 
     14        } 
     15 
     16        void lock() 
     17        { 
     18                EnterCriticalSection(&cs); 
     19        } 
     20 
     21        void unlock() 
     22        { 
     23                LeaveCriticalSection(&cs); 
     24        } 
     25 
     26        ~Mutex() 
     27        { 
     28                DeleteCriticalSection(&cs); 
     29        } 
     30}; 
    731class Conditional 
    832{ 
  • lang/objective-cplusplus/i3/trunk/src/mil/src/Test4.cpp

    r34041 r34328  
    4242    { 
    4343        void* m = p.malloc<sizeof(Event<Dummy>)>(); 
     44                if (m == NULL) { 
     45                        QT_CHECK(m); 
     46                        continue; 
     47                } 
    4448        Event<Dummy>* e = new(m) Event<Dummy>; 
    4549        e->owner_id = 1; 
     
    6468 
    6569        void* m = p[p_id].malloc<sizeof(Event<Dummy>)>(); 
     70                if (m == NULL) { 
     71                        QT_CHECK(m); 
     72                        continue; 
     73                } 
    6674        Event<Dummy>* e = new(m) Event<Dummy>; 
    6775        e->owner_id = p_id; 
  • lang/objective-cplusplus/i3/trunk/src/mil/src/Test5.cpp

    r34327 r34328  
    113113} 
    114114 
    115 QT_TEST(test_Thread080889) 
     115QT_TEST(test_Thread080iio889) 
    116116{ 
    117117    mil::Mutex m; 
    118     synchronize(m) { 
     118    synchronized (m) { 
    119119    } 
    120120} 
  • lang/objective-cplusplus/i3/trunk/src/mil/src/Test7.cpp

    r34312 r34328  
    2727    // exchange 
    2828    T exc = foo.exchange((T)-2); 
    29     QT_CHECK_EQUAL(exc, (T)0); 
     29    QT_CHECK_EQUAL(exc, (T)0x1234abcd); 
    3030    QT_CHECK_EQUAL(foo.load(), (T)-2); 
    3131 
     
    3838    QT_CHECK_EQUAL(foo.load(), (T)1); 
    3939 
    40     foo.exchange((T)0x1234abcd); 
     40    exc = foo.exchange((T)0x1234abcd); 
    4141    QT_CHECK_EQUAL(exc, (T)1); 
    4242    QT_CHECK_EQUAL(foo.load(), (T)0x1234abcd); 
     
    5757    QT_CHECK_NOT_EQUAL(memcmp(&foo, &bar, sizeof(foo)), 0); 
    5858 
    59     memset(&foo, 85, sizeof(foo)); 
    60     memset(&bar, 85, sizeof(bar)); 
     59    memset(&foo, 0x55, sizeof(foo)); 
     60    memset(&bar, 0x55, sizeof(bar)); 
    6161 
    6262    QT_CHECK_EQUAL(memcmp(&foo, &bar, sizeof(foo)), 0); 
    6363     
    64     QT_CHECK_EQUAL(foo.val.load(), (T)0); 
    6564    foo.val.store((T)0x12345); 
    6665    QT_CHECK_EQUAL(foo.val.load(), (T)0x12345); 
     
    125124 
    126125    test1<void*>(); 
    127     test1<char*>(); 
     126    //test1<char*>(); 
    128127    test1<int*>(); 
    129128 
     
    131130} 
    132131 
    133  
    134  
    135 /* 
    136132QT_TEST(test_dasfhoiaio) 
    137133{ 
     
    154150 
    155151    test2<void*>(); 
    156     test2<char*>(); 
     152    //test2<char*>(); 
    157153    test2<int*>(); 
    158154 
    159155    //test2<three_bytes>(); 
    160156} 
    161 */ 
     157 
  • lang/objective-cplusplus/i3/trunk/src/mil/src/Test8.cpp

    r34193 r34328  
     1 
     2 
    13#include <mil/PrecompiledHeaders.h> 
     4 
     5 
    26#include <mil/Mil.h> 
    37#include <mil/Atomic.h> 
     
    5660*/ 
    5761 
     62 
    5863namespace Test8 
    5964{ 
     65/* 
    6066using namespace mil; 
    61  
     67using boost::uint32_t; 
    6268int global = 0; 
    6369 
     
    6773    char data1[SIZE]; 
    6874     
    69     uint32_t status; // 下位  = 読み込み状態(0=0, 1=1, 2=読んでない) 
     75        uint32_t status; // 下位  = 読み込み状態(0=0, 1=1, 2=読んでない) 
    7076                     // 上位  = 最新版 
    7177    DoubleBuffer() : status(0) { 
    72     } 
     78    }; 
    7379 
    7480    // 書き込みスレッドがデータを取得 
     
    112118    } 
    113119}; 
     120*/ 
     121} 
    114122 
    115 } 
    116123 
    117124using namespace mil; 
  • lang/objective-cplusplus/i3/trunk/windows/mil_test.vcproj

    r34077 r34328  
    863863                        > 
    864864                        <File 
    865                                 RelativePath="..\src\mil\include\mil\StaticData.cpp" 
    866                                 > 
    867                                 <FileConfiguration 
    868                                         Name="Debug|Win32" 
    869                                         > 
    870                                         <Tool 
    871                                                 Name="VCCLCompilerTool" 
    872                                                 UsePrecompiledHeader="0" 
    873                                         /> 
    874                                 </FileConfiguration> 
    875                                 <FileConfiguration 
    876                                         Name="Debug|x64" 
    877                                         > 
    878                                         <Tool 
    879                                                 Name="VCCLCompilerTool" 
    880                                                 UsePrecompiledHeader="0" 
    881                                         /> 
    882                                 </FileConfiguration> 
    883                                 <FileConfiguration 
    884                                         Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)" 
    885                                         > 
    886                                         <Tool 
    887                                                 Name="VCCLCompilerTool" 
    888                                                 UsePrecompiledHeader="0" 
    889                                         /> 
    890                                 </FileConfiguration> 
    891                                 <FileConfiguration 
    892                                         Name="Debug_Analyze|x64" 
    893                                         > 
    894                                         <Tool 
    895                                                 Name="VCCLCompilerTool" 
    896                                                 UsePrecompiledHeader="0" 
    897                                         /> 
    898                                 </FileConfiguration> 
     865                                RelativePath="..\src\mil\src\StaticData.cpp" 
     866                                > 
    899867                        </File> 
    900868                        <File 
     
    951919                        </File> 
    952920                        <File 
    953                                 RelativePath="..\src\mil\src\Test1.cpp" 
    954                                 > 
    955                         </File> 
    956                         <File 
    957921                                RelativePath="..\src\mil\src\Test2.cpp" 
    958922                                > 
     
    972936                        <File 
    973937                                RelativePath="..\src\mil\src\Test6.cpp" 
     938                                > 
     939                        </File> 
     940                        <File 
     941                                RelativePath="..\src\mil\src\Test7.cpp" 
     942                                > 
     943                        </File> 
     944                        <File 
     945                                RelativePath="..\src\mil\src\Test8.cpp" 
    974946                                > 
    975947                        </File> 
     
    1001973                        </File> 
    1002974                        <File 
     975                                RelativePath="..\src\mil\include\mil\Debug.h" 
     976                                > 
     977                        </File> 
     978                        <File 
    1003979                                RelativePath="..\src\mil\include\mil\os-windows\Debug.h" 
    1004980                                > 
    1005981                        </File> 
    1006982                        <File 
    1007                                 RelativePath="..\src\mil\include\mil\Debug.h" 
    1008                                 > 
    1009                         </File> 
    1010                         <File 
    1011983                                RelativePath="..\src\mil\include\mil\gui-windows\DummyMessageHandler-inl.h" 
    1012984                                > 
     
    1021993                        </File> 
    1022994                        <File 
     995                                RelativePath="..\src\mil\include\mil\GuiModule.h" 
     996                                > 
     997                        </File> 
     998                        <File 
    1023999                                RelativePath="..\src\mil\include\mil\gui-windows\GuiModule.h" 
    10241000                                > 
    10251001                        </File> 
    10261002                        <File 
    1027                                 RelativePath="..\src\mil\include\mil\GuiModule.h" 
    1028                                 > 
    1029                         </File> 
    1030                         <File 
    10311003                                RelativePath="..\src\mil\include\mil\gui-windows\MessageCracker-inl.h" 
    10321004                                > 
     
    10731045                        </File> 
    10741046                        <File 
     1047                                RelativePath="..\src\mil\include\mil\os-windows\Thread.h" 
     1048                                > 
     1049                        </File> 
     1050                        <File 
    10751051                                RelativePath="..\src\mil\include\mil\Thread.h" 
    1076                                 > 
    1077                         </File> 
    1078                         <File 
    1079                                 RelativePath="..\src\mil\include\mil\os-windows\Thread.h" 
    10801052                                > 
    10811053                        </File>