fishbowl/engine/include/fishbone/thread.h

36 lines
505 B
C
Raw Normal View History

2026-05-27 16:03:38 +09:00
#ifndef __FISHBONE_THREAD_H__
#define __FISHBONE_THREAD_H__
namespace fishbone {
class Thread;
class Mutex;
}; // namespace fishbone
#include <fishbone/machdep.h>
namespace fishbone {
class Thread {
2026-05-27 21:36:15 +09:00
struct Impl;
Impl* impl;
2026-05-27 16:03:38 +09:00
public:
Thread(void (*call)(fishbone::Thread* thread, void* arg), void* arg);
~Thread();
void join();
};
class Mutex {
2026-05-27 21:36:15 +09:00
struct Impl;
Impl* impl;
2026-05-27 16:03:38 +09:00
public:
Mutex();
~Mutex();
void lock();
void unlock();
};
}; // namespace fishbone
#endif