Resync
This commit is contained in:
parent
b216ff2029
commit
f28056364a
|
@ -90,8 +90,6 @@ int sthread_detach(sthread_t *thread);
|
||||||
* @thread to terminate. If that thread has already terminated, then
|
* @thread to terminate. If that thread has already terminated, then
|
||||||
* it will return immediately. The thread specified by @thread must
|
* it will return immediately. The thread specified by @thread must
|
||||||
* be joinable.
|
* be joinable.
|
||||||
*
|
|
||||||
* Returns: 0 on success, otherwise it returns a non-zero error number.
|
|
||||||
*/
|
*/
|
||||||
void sthread_join(sthread_t *thread);
|
void sthread_join(sthread_t *thread);
|
||||||
|
|
||||||
|
@ -103,6 +101,16 @@ void sthread_join(sthread_t *thread);
|
||||||
*/
|
*/
|
||||||
bool sthread_isself(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:
|
* slock_new:
|
||||||
*
|
*
|
||||||
|
|
|
@ -285,8 +285,6 @@ int sthread_detach(sthread_t *thread)
|
||||||
* @thread to terminate. If that thread has already terminated, then
|
* @thread to terminate. If that thread has already terminated, then
|
||||||
* it will return immediately. The thread specified by @thread must
|
* it will return immediately. The thread specified by @thread must
|
||||||
* be joinable.
|
* be joinable.
|
||||||
*
|
|
||||||
* Returns: 0 on success, otherwise it returns a non-zero error number.
|
|
||||||
*/
|
*/
|
||||||
void sthread_join(sthread_t *thread)
|
void sthread_join(sthread_t *thread)
|
||||||
{
|
{
|
||||||
|
@ -320,6 +318,24 @@ bool sthread_isself(sthread_t *thread)
|
||||||
#endif
|
#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:
|
* slock_new:
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue