Changeset 34991 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Jul 3, 2008, 5:06:11 PM (17 years ago)
Author:
[email protected]
Message:

Follow-up to the 64-bit build fix. Use intptr_t rather than ssize_t as the latter is non-standard and does not exist on Windows.

Location:
trunk/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r34990 r34991  
     12008-07-03  Mark Rowe  <[email protected]>
     2
     3        Follow-up to the 64-bit build fix.  Use intptr_t rather than ssize_t as
     4        the latter is non-standard and does not exist on Windows.
     5
     6        * kjs/JSLock.cpp:
     7        (KJS::JSLock::lockCount):
     8        (KJS::JSLock::lock):
     9        (KJS::JSLock::unlock):
     10        (KJS::JSLock::DropAllLocks::DropAllLocks):
     11        * kjs/JSLock.h:
     12
    1132008-07-02  Mark Rowe  <[email protected]>
    214
  • trunk/JavaScriptCore/kjs/JSLock.cpp

    r34990 r34991  
    4949
    5050// Lock nesting count.
    51 ssize_t JSLock::lockCount()
    52 {
    53     pthread_once(&createJSLockCountOnce, createJSLockCount);
    54 
    55     return reinterpret_cast<ssize_t>(pthread_getspecific(JSLockCount));
    56 }
    57 
    58 static void setLockCount(ssize_t count)
     51intptr_t JSLock::lockCount()
     52{
     53    pthread_once(&createJSLockCountOnce, createJSLockCount);
     54
     55    return reinterpret_cast<intptr_t>(pthread_getspecific(JSLockCount));
     56}
     57
     58static void setLockCount(intptr_t count)
    5959{
    6060    ASSERT(count >= 0);
     
    8080    pthread_once(&createJSLockCountOnce, createJSLockCount);
    8181
    82     ssize_t currentLockCount = lockCount();
     82    intptr_t currentLockCount = lockCount();
    8383    if (!currentLockCount && lockForReal) {
    8484        int result;
     
    9999#endif
    100100
    101     ssize_t newLockCount = lockCount() - 1;
     101    intptr_t newLockCount = lockCount() - 1;
    102102    setLockCount(newLockCount);
    103103    if (!newLockCount && lockForReal) {
     
    135135
    136136    m_lockCount = JSLock::lockCount();
    137     for (ssize_t i = 0; i < m_lockCount; i++)
     137    for (intptr_t i = 0; i < m_lockCount; i++)
    138138        JSLock::unlock(m_lockingForReal);
    139139}
     
    148148
    149149    m_lockCount = JSLock::lockCount();
    150     for (ssize_t i = 0; i < m_lockCount; i++)
     150    for (intptr_t i = 0; i < m_lockCount; i++)
    151151        JSLock::unlock(m_lockingForReal);
    152152}
     
    154154JSLock::DropAllLocks::~DropAllLocks()
    155155{
    156     for (ssize_t i = 0; i < m_lockCount; i++)
     156    for (intptr_t i = 0; i < m_lockCount; i++)
    157157        JSLock::lock(m_lockingForReal);
    158158}
     
    167167// If threading support is off, set the lock count to a constant value of 1 so assertions
    168168// that the lock is held don't fail
    169 ssize_t JSLock::lockCount()
     169intptr_t JSLock::lockCount()
    170170{
    171171    return 1;
  • trunk/JavaScriptCore/kjs/JSLock.h

    r34990 r34991  
    8585        static void unlock(ExecState*);
    8686
    87         static ssize_t lockCount();
     87        static intptr_t lockCount();
    8888        static bool currentThreadIsHoldingLock();
    8989
     
    9999           
    100100        private:
    101             ssize_t m_lockCount;
     101            intptr_t m_lockCount;
    102102            bool m_lockingForReal;
    103103        };
Note: See TracChangeset for help on using the changeset viewer.