version 1.4, 2002/11/20 22:04:11
|
version 1.5, 2003/02/21 20:04:49
|
|
|
typedef class __pegasus_os400_thread_type { | typedef class __pegasus_os400_thread_type { |
public: | public: |
pthread_t thid; // An opaque struct on OS/400 | pthread_t thid; // An opaque struct on OS/400 |
PEGASUS_UINT64 pegasusValue; // Needed because Pegasus sets PEGASUS_THREAD_TYPE's to 0 |
PEGASUS_UINT64 pegasusValue; // Needed because Pegasus sets PEGASUS_THREAD_TYPEs to 0 |
// to indicate the thread is 'dead', but |
// to indicate the thread is dead, but |
// pthread_t structs cannot be changed on OS/400. | // pthread_t structs cannot be changed on OS/400. |
| |
// Overloaded operators. | // Overloaded operators. |
|
|
operator pthread_t*(); | operator pthread_t*(); |
operator pthread_t(); | operator pthread_t(); |
operator Uint32 (); | operator Uint32 (); |
operator PEGASUS_UINT64 (); |
|
} PEGASUS_THREAD_TYPE; | } PEGASUS_THREAD_TYPE; |
| |
typedef pthread_mutex_t PEGASUS_MUTEX_TYPE; | typedef pthread_mutex_t PEGASUS_MUTEX_TYPE; |
|
|
| |
inline __pegasus_os400_thread_type::operator Uint32 () | inline __pegasus_os400_thread_type::operator Uint32 () |
{ | { |
return Uint32(pegasusValue); |
pthread_id_np_t tid; |
} |
pthread_getunique_np(&thid, &tid); |
|
return (Uint32)(tid.intId.lo); |
inline __pegasus_os400_thread_type::operator PEGASUS_UINT64 () |
|
{ |
|
return pegasusValue; |
|
} | } |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |