Changeset 3370

Show
Ignore:
Timestamp:
02/06/10 11:50:48 (6 weeks ago)
Author:
trichards
Message:

Added operator< to the posix threadId implementation.

Location:
Core/branches/0075_TR_SCRIPTING/Threading/src
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • Core/branches/0075_TR_SCRIPTING/Threading/src/Thread_posix.cpp

    r3327 r3370  
    3838#include <unistd.h> 
    3939#include <sys/errno.h> 
     40#include <assert.h> 
    4041 
    4142//-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ 
     
    166167 
    167168//-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ 
     169bool 
     170Thread_posix::NativeThreadId_posix::operator<(const I_Thread::ThreadId::I_NativeThreadId& _id) const 
     171{ 
     172    const NativeThreadId_posix* const pNativeThreadId_posix = dynamic_cast<const NativeThreadId_posix*>(&_id); 
     173    assert(pNativeThreadId_posix != NULL); 
     174    return (m_nativeThreadId < pNativeThreadId_posix->m_nativeThreadId); 
     175} 
     176 
     177//-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ 
    168178I_Thread::ThreadId::I_NativeThreadId* 
    169179Thread_posix::NativeThreadId_posix::clone() const 
  • Core/branches/0075_TR_SCRIPTING/Threading/src/Thread_posix.hpp

    r3327 r3370  
    7979        virtual bool operator==(const I_NativeThreadId&) const; 
    8080        virtual bool operator!=(const I_NativeThreadId&) const; 
     81        virtual bool operator<(const I_NativeThreadId& _otherId) const; 
    8182        virtual I_NativeThreadId* clone() const; 
    8283        virtual std::string toString() const; 
  • Core/branches/0075_TR_SCRIPTING/Threading/src/Thread_win32.cpp

    r3335 r3370  
    7878//-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ 
    7979#ifndef USE_CPP_THREADING 
    80 extern "C"  
     80extern "C" 
    8181{ 
    8282void threadFunctionC(void* _pThis) 
     
    186186//-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ 
    187187bool 
    188 Thread_win32::NativeThreadId_win32::operator <(const I_Thread::ThreadId::I_NativeThreadId& _id) const 
     188Thread_win32::NativeThreadId_win32::operator<(const I_Thread::ThreadId::I_NativeThreadId& _id) const 
    189189{ 
    190190    const NativeThreadId_win32* const pNativeThreadId_win32 = dynamic_cast<const NativeThreadId_win32*>(&_id);