LibCore: Remove CThread

It's been replaced with Thread::Thread.
This commit is contained in:
Sergey Bugaev 2019-08-25 19:29:08 +03:00 committed by Andreas Kling
parent 7c92f7d537
commit 0826cc5a35
Notes: sideshowbarker 2024-07-19 12:30:54 +09:00
3 changed files with 0 additions and 57 deletions

View File

@ -1,33 +0,0 @@
#ifdef __serenity__
#include <AK/Assertions.h>
#include <LibCore/CEventLoop.h>
#include <LibCore/CThread.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
CThread& CThread::main_thread()
{
static CThread* main_thread;
if (!main_thread)
main_thread = new CThread(MainThread);
return *main_thread;
}
CThread::CThread(MainThreadTag)
: m_thread_id(0)
{
}
CThread::CThread(int (*entry)(void*), void* user_data)
{
ASSERT(entry);
m_thread_id = create_thread(entry, user_data);
}
CThread::~CThread()
{
}
#endif

View File

@ -1,23 +0,0 @@
#pragma once
#ifdef __serenity__
class CThread {
public:
static CThread& main_thread();
CThread(int (*entry)(void*), void* user_data);
~CThread();
bool is_main_thread() const { return m_thread_id == 0; }
int thread_id() const { return m_thread_id; }
private:
enum MainThreadTag { MainThread };
explicit CThread(MainThreadTag);
int m_thread_id { -1 };
};
#endif

View File

@ -3,7 +3,6 @@ include ../../Makefile.common
OBJS = \
CArgsParser.o \
CIODevice.o \
CThread.o \
CFile.o \
CSocket.o \
CLocalSocket.o \