Changed get_thread_id and am_self to const member functions
Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
return entry();
}
-const pthread_t &Thread::get_thread_id()
+const pthread_t &Thread::get_thread_id() const
{
return thread_id;
}
return thread_id != 0;
}
-bool Thread::am_self()
+bool Thread::am_self() const
{
return (pthread_self() == thread_id);
}
static void *_entry_func(void *arg);
public:
- const pthread_t &get_thread_id();
+ const pthread_t &get_thread_id() const;
pid_t get_pid() const { return pid; }
bool is_started() const;
- bool am_self();
+ bool am_self() const;
int kill(int signal);
int try_create(size_t stacksize);
void create(size_t stacksize = 0);