Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions include/rthreads/rthreads.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ int sthread_detach(sthread_t *thread);
* @thread to terminate. If that thread has already terminated, then
* it will return immediately. The thread specified by @thread must
* be joinable.
*
* Returns: 0 on success, otherwise it returns a non-zero error number.
*/
void sthread_join(sthread_t *thread);

Expand All @@ -101,16 +103,6 @@ void sthread_join(sthread_t *thread);
*/
bool sthread_isself(sthread_t *thread);

/**
* sthread_set_name:
* @thread : pointer to thread object
* @name : name to define for the thread (at most
* 15 bytes)
*
* Set the thread name, useful for debugging.
*/
void sthread_setname(sthread_t *thread, const char *name);

/**
* slock_new:
*
Expand Down
20 changes: 2 additions & 18 deletions rthreads/rthreads.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,8 @@ int sthread_detach(sthread_t *thread)
* @thread to terminate. If that thread has already terminated, then
* it will return immediately. The thread specified by @thread must
* be joinable.
*
* Returns: 0 on success, otherwise it returns a non-zero error number.
*/
void sthread_join(sthread_t *thread)
{
Expand Down Expand Up @@ -318,24 +320,6 @@ bool sthread_isself(sthread_t *thread)
#endif
}

/**
* sthread_set_name:
* @thread : pointer to thread object
* @name : name to define for the thread (at most
* 15 bytes)
*
* Set the thread name, useful for debugging.
*/
void sthread_setname(sthread_t *thread, const char *name)
{
if (!thread)
return;
// TODO: implement that for Windows too.
#ifndef USE_WIN32_THREADS
pthread_setname_np(thread->id, name);
#endif
}

/**
* slock_new:
*
Expand Down