1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:58:13 +00:00

LibPthread: Fix incompatible pthread_setname_np(), pthread_getname_np()

Other implementations of pthread_setname_np() do not take the name
length as an argument.

For pthread_getname_np(), other implementations take the buffer size
as a size_t.

This patch brings us in line with other implementations.
This commit is contained in:
Andreas Kling 2020-01-11 12:54:30 +01:00
parent 24c736b0e7
commit eede6cfd06
3 changed files with 8 additions and 14 deletions

View file

@ -33,7 +33,7 @@ void LibThread::Thread::start()
ASSERT(rc == 0);
if (!m_thread_name.is_empty()) {
rc = pthread_setname_np(m_tid, m_thread_name.characters(), m_thread_name.length());
rc = pthread_setname_np(m_tid, m_thread_name.characters());
ASSERT(rc == 0);
}
dbg() << "Started a thread, tid = " << m_tid;