1
0
Fork 0

fixed casts for threads

This commit is contained in:
Frank Celler 2015-02-06 14:35:47 +01:00 committed by Willi Goesgens
parent fa68eb7b41
commit dc1c9ab48f
3 changed files with 7 additions and 7 deletions

View File

@ -108,7 +108,7 @@ void TRI_InitThread (TRI_thread_t* thread) {
////////////////////////////////////////////////////////////////////////////////
TRI_pid_t TRI_CurrentProcessId () {
return (TRI_pid_t) getpid();
return getpid();
}
////////////////////////////////////////////////////////////////////////////////
@ -128,7 +128,7 @@ TRI_tpid_t TRI_CurrentThreadProcessId () {
////////////////////////////////////////////////////////////////////////////////
TRI_tid_t TRI_CurrentThreadId () {
return (TRI_tid_t) pthread_self();
return pthread_self();
}
////////////////////////////////////////////////////////////////////////////////

View File

@ -54,13 +54,13 @@
/// @brief thread process identifier
////////////////////////////////////////////////////////////////////////////////
#define TRI_tpid_t int
#define TRI_tpid_t pid_t
////////////////////////////////////////////////////////////////////////////////
/// @brief thread identifier
////////////////////////////////////////////////////////////////////////////////
#define TRI_tid_t uintptr_t
#define TRI_tid_t pthread_t
////////////////////////////////////////////////////////////////////////////////
/// @brief thread

View File

@ -112,7 +112,7 @@ bool SchedulerThread::open () {
////////////////////////////////////////////////////////////////////////////////
void SchedulerThread::beginShutdown () {
LOG_TRACE("beginning shutdown sequence of scheduler thread (%d)", (int) threadId());
LOG_TRACE("beginning shutdown sequence of scheduler thread (%llu)", (unsigned long long) threadId());
_stopping = 1;
_scheduler->wakeupLoop(_loop);
@ -231,7 +231,7 @@ void SchedulerThread::destroyTask (Task* task) {
////////////////////////////////////////////////////////////////////////////////
void SchedulerThread::run () {
LOG_TRACE("scheduler thread started (%d)", (int) threadId());
LOG_TRACE("scheduler thread started (%llu)", (unsigned long long) threadId());
if (_defaultLoop) {
#ifdef TRI_HAVE_POSIX_THREADS
@ -305,7 +305,7 @@ void SchedulerThread::run () {
SCHEDULER_UNLOCK(&_queueLock);
}
LOG_TRACE("scheduler thread stopped (%d)", (int) threadId());
LOG_TRACE("scheduler thread stopped (%llu)", (unsigned long long) threadId());
_stopped = 1;