mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
LibThreading: Move now-trivial accessors of Thread to cpp file
Some of these might be changed in the future, and because Thread.h is a commonly included header file, we don't want to change it as much as possible.
This commit is contained in:
parent
7fd7562140
commit
9e40d4ccd6
Notes:
sideshowbarker
2024-07-17 03:24:32 +09:00
Author: https://github.com/kleinesfilmroellchen Commit: https://github.com/SerenityOS/serenity/commit/9e40d4ccd6 Pull-request: https://github.com/SerenityOS/serenity/pull/16011 Reviewed-by: https://github.com/ADKaster ✅
2 changed files with 9 additions and 3 deletions
|
@ -52,6 +52,12 @@ ErrorOr<int> Thread::get_priority() const
|
|||
return scheduling_parameters.sched_priority;
|
||||
}
|
||||
|
||||
DeprecatedString Thread::thread_name() const { return m_thread_name; }
|
||||
|
||||
pthread_t Thread::tid() const { return m_tid; }
|
||||
|
||||
bool Thread::is_started() const { return m_started; }
|
||||
|
||||
void Thread::start()
|
||||
{
|
||||
int rc = pthread_create(
|
||||
|
|
|
@ -33,9 +33,9 @@ public:
|
|||
template<typename T = void>
|
||||
Result<T, ThreadError> join();
|
||||
|
||||
DeprecatedString thread_name() const { return m_thread_name; }
|
||||
pthread_t tid() const { return m_tid; }
|
||||
bool is_started() const { return m_started; }
|
||||
DeprecatedString thread_name() const;
|
||||
pthread_t tid() const;
|
||||
bool is_started() const;
|
||||
|
||||
private:
|
||||
explicit Thread(Function<intptr_t()> action, StringView thread_name = {});
|
||||
|
|
Loading…
Reference in a new issue