Threads: Implemented a sequential thread id

This commit is contained in:
Subv 2014-12-04 08:13:53 -05:00
parent 029ff9f1fd
commit ef1d5cda06
2 changed files with 19 additions and 4 deletions

View file

@ -58,7 +58,12 @@ void Reschedule();
/// Stops the current thread
ResultCode StopThread(Handle thread, const char* reason);
// Retrieves the thread id of the specified thread handle
/**
* Retrieves the ID of the specified thread handle
* @param thread_id Will contain the output thread id
* @param handle Handle to the thread we want
* @return Whether the function was successful or not
*/
ResultCode GetThreadId(u32* thread_id, Handle handle);
/// Resumes a thread from waiting by marking it as "ready"