Cleaned up the use of thread types
The THREAD type was not used everywhere and pthread_t was used instead. The thread creation function also returned the address of a stack allocated value which isn't guaranteed to be usable.
This commit is contained in:
@ -87,7 +87,7 @@ spinlock_acquire(SPINLOCK *lock)
|
||||
}
|
||||
}
|
||||
lock->acquired++;
|
||||
lock->owner = THREAD_SHELF();
|
||||
lock->owner = thread_self();
|
||||
atomic_add(&(lock->waiting), -1);
|
||||
#endif
|
||||
}
|
||||
@ -112,7 +112,7 @@ spinlock_acquire_nowait(SPINLOCK *lock)
|
||||
#endif
|
||||
#if SPINLOCK_PROFILE
|
||||
lock->acquired++;
|
||||
lock->owner = THREAD_SHELF();
|
||||
lock->owner = thread_self();
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user