commit
171bf4ab3f
|
@ -23,13 +23,14 @@
|
|||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
#include <syscall.h>
|
||||
#include "zm_exception.h"
|
||||
#include "zm_utils.h"
|
||||
|
||||
class ThreadException : public Exception
|
||||
{
|
||||
public:
|
||||
ThreadException( const std::string &message ) : Exception( stringtf( "(%d) "+message, (long int)syscall(224) ) )
|
||||
ThreadException( const std::string &message ) : Exception( stringtf( "(%d) "+message, (long int)syscall(SYS_gettid) ) )
|
||||
{
|
||||
}
|
||||
};
|
||||
|
@ -202,7 +203,7 @@ protected:
|
|||
|
||||
pid_t id() const
|
||||
{
|
||||
return( (pid_t)syscall(224) );
|
||||
return( (pid_t)syscall(SYS_gettid) );
|
||||
}
|
||||
void exit( int status = 0 )
|
||||
{
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#ifndef ZM_TIMER_H
|
||||
#define ZM_TIMER_H
|
||||
|
||||
#include <syscall.h>
|
||||
#include "zm_thread.h"
|
||||
|
||||
#include "zm_exception.h"
|
||||
|
@ -30,7 +31,7 @@ private:
|
|||
class TimerException : public Exception
|
||||
{
|
||||
public:
|
||||
TimerException( const std::string &message ) : Exception( stringtf( "(%d) "+message, (long int)syscall(224) ) )
|
||||
TimerException( const std::string &message ) : Exception( stringtf( "(%d) "+message, (long int)syscall(SYS_gettid) ) )
|
||||
{
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue