mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibThread: Fix int to pointer conversion
This commit is contained in:
parent
7d84f09e7e
commit
8d95bd8418
Notes:
sideshowbarker
2024-07-18 19:01:04 +09:00
Author: https://github.com/boricj
Commit: 8d95bd8418
Pull-request: https://github.com/SerenityOS/serenity/pull/6671
Reviewed-by: https://github.com/linusg
5 changed files with 9 additions and 9 deletions
|
@ -9,7 +9,7 @@
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
LibThread::Thread::Thread(Function<int()> action, StringView thread_name)
|
||||
LibThread::Thread::Thread(Function<intptr_t()> action, StringView thread_name)
|
||||
: Core::Object(nullptr)
|
||||
, m_action(move(action))
|
||||
, m_thread_name(thread_name.is_null() ? "" : thread_name)
|
||||
|
@ -33,9 +33,9 @@ void LibThread::Thread::start()
|
|||
nullptr,
|
||||
[](void* arg) -> void* {
|
||||
Thread* self = static_cast<Thread*>(arg);
|
||||
int exit_code = self->m_action();
|
||||
auto exit_code = self->m_action();
|
||||
self->m_tid = 0;
|
||||
return (void*)exit_code;
|
||||
return reinterpret_cast<void*>(exit_code);
|
||||
},
|
||||
static_cast<void*>(this));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue