Changeset 400 for trunk/Include/system


Ignore:
Timestamp:
Jan 22, 2008, 9:19:59 PM (17 years ago)
Author:
イグトランス (egtra)
Message:

_System_CThreadCollectionでのクラスインスタンスへのポインタの使用を除去、参照変数構文へ。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Include/system/gc.sbp

    r399 r400  
    156156
    157157        ' スレッド管理用オブジェクトを生成
    158         _System_pobj_AllThreads = New _System_CThreadCollection()
     158        _System_pobj_AllThreads = New Detail._System_CThreadCollection()
    159159
    160160        ' 自身のThreadオブジェクトを生成
    161         Dim thread As Thread(hTargetThread,GetCurrentThreadId(),0)
     161        Dim thread = New Thread(hTargetThread, GetCurrentThreadId(), 0)
    162162        thread.Name = "main"
    163163
    164         _System_pobj_AllThreads->BeginThread(ObjPtr( thread ),_System_gc_StackRoot_StartPtr As *LONG_PTR)
     164        _System_pobj_AllThreads->BeginThread(thread, _System_gc_StackRoot_StartPtr As *LONG_PTR)
    165165
    166166    End Sub
     
    356356                ExitProcess(-1)
    357357            End If
    358             Throw New System.OutOfMemoryException(ActiveBasic.Strings.SPrintf("malloc: Failed to allocate %zu byte(s) memory.", New System.UInt64(size)))
     358            Dim s2 = Nothing As Object '#145
     359            s2 = New System.UInt64(size)
     360            Throw New System.OutOfMemoryException(ActiveBasic.Strings.SPrintf("malloc: Failed to allocate %zu (%&zx) byte(s) memory.", s2, s2))
    359361        End If
    360362    End Sub
     
    550552        Dim i As Long
    551553        For i=0 To ELM(_System_pobj_AllThreads->ThreadNum)
    552             Dim thread = _System_pobj_AllThreads->ppobj_Thread[i]
    553             If thread Then
     554            Dim thread = _System_pobj_AllThreads->collection[i].thread
     555            If Not ActiveBasic.IsNothing(thread) Then
    554556                FillMemory(VarPtr(Context),SizeOf(CONTEXT),0)
    555557                Context.ContextFlags=CONTEXT_CONTROL
    556                 If thread->__GetContext(Context)=0 Then
     558                If thread.__GetContext(Context)=0 Then
    557559                    _System_DebugOnly_OutputDebugString(Ex"レジスタ情報の取得に失敗しました。\r\n")
    558560                End If
     
    564566#endif
    565567
    566                 Dim size=(_System_pobj_AllThreads->pStackBase[i] As LONG_PTR)-(NowSp As LONG_PTR)
     568                Dim size=(_System_pobj_AllThreads->collection[i].stackBase As LONG_PTR)-(NowSp As LONG_PTR)
    567569                Dim maxNum = (size\SizeOf(LONG_PTR)) As Long
    568570
     
    666668    */
    667669    Function SweepOnOtherThread() As Long
     670        Imports System.Threading.Detail
    668671        EnterCriticalSection(CriticalSection)
    669 
    670672
    671673        Dim startTime = GetTickCount()
Note: See TracChangeset for help on using the changeset viewer.