Changeset 50833 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Nov 11, 2009, 12:00:05 PM (16 years ago)
Author:
[email protected]
Message:

2009-11-11 Laszlo Gombos <Laszlo Gombos>

Reviewed by Alexey Proskuryakov.

Refactor multiple JavaScriptCore threads
https://bugs.webkit.org/show_bug.cgi?id=31328

Remove the id field from the PlatformThread structure
as it is not used.

  • runtime/Collector.cpp: (JSC::getCurrentPlatformThread): (JSC::suspendThread): (JSC::resumeThread): (JSC::getPlatformThreadRegisters):
Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r50791 r50833  
     12009-11-11  Laszlo Gombos  <[email protected]>
     2
     3        Reviewed by Alexey Proskuryakov.
     4
     5        Refactor multiple JavaScriptCore threads
     6        https://bugs.webkit.org/show_bug.cgi?id=31328
     7
     8        Remove the id field from the PlatformThread structure
     9        as it is not used.
     10
     11        * runtime/Collector.cpp:
     12        (JSC::getCurrentPlatformThread):
     13        (JSC::suspendThread):
     14        (JSC::resumeThread):
     15        (JSC::getPlatformThreadRegisters):
     16
    1172009-11-10  Geoffrey Garen  <[email protected]>
    218
  • trunk/JavaScriptCore/runtime/Collector.cpp

    r49955 r50833  
    119119typedef mach_port_t PlatformThread;
    120120#elif PLATFORM(WIN_OS)
    121 struct PlatformThread {
    122     PlatformThread(DWORD _id, HANDLE _handle) : id(_id), handle(_handle) {}
    123     DWORD id;
    124     HANDLE handle;
    125 };
     121typedef HANDLE PlatformThread;
    126122#endif
    127123
     
    647643    return pthread_mach_thread_np(pthread_self());
    648644#elif PLATFORM(WIN_OS)
    649     HANDLE threadHandle = pthread_getw32threadhandle_np(pthread_self());
    650     return PlatformThread(GetCurrentThreadId(), threadHandle);
     645    return pthread_getw32threadhandle_np(pthread_self());
    651646#endif
    652647}
     
    812807    thread_suspend(platformThread);
    813808#elif PLATFORM(WIN_OS)
    814     SuspendThread(platformThread.handle);
     809    SuspendThread(platformThread);
    815810#else
    816811#error Need a way to suspend threads on this platform
     
    823818    thread_resume(platformThread);
    824819#elif PLATFORM(WIN_OS)
    825     ResumeThread(platformThread.handle);
     820    ResumeThread(platformThread);
    826821#else
    827822#error Need a way to resume threads on this platform
     
    887882#elif PLATFORM(WIN_OS) && PLATFORM(X86)
    888883    regs.ContextFlags = CONTEXT_INTEGER | CONTEXT_CONTROL | CONTEXT_SEGMENTS;
    889     GetThreadContext(platformThread.handle, &regs);
     884    GetThreadContext(platformThread, &regs);
    890885    return sizeof(CONTEXT);
    891886#else
Note: See TracChangeset for help on using the changeset viewer.