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

Added operator< to the posix threadId implementation.

Files:
1 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