Update of /cvsroot/pclasses/pclasses2/src/System
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23474/src/System
Modified Files:
Thread.posix.cpp
Log Message:
- Added Thread::id() and Thread::threadId()
Index: Thread.posix.cpp
===================================================================
RCS file: /cvsroot/pclasses/pclasses2/src/System/Thread.posix.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Thread.posix.cpp 25 Apr 2005 10:51:15 -0000 1.4
+++ Thread.posix.cpp 6 Jun 2005 11:59:26 -0000 1.5
@@ -126,6 +126,19 @@
return _detached;
}
+unsigned long Thread::id() const throw(LogicError)
+{
+ if(!_handle)
+ throw LogicError("Thread is not running", P_SOURCEINFO);
+
+ return _handle->thread;
+}
+
+unsigned long Thread::threadId() throw()
+{
+ return pthread_self();
+}
+
} // !namespace System
|