17 namespace current {
namespace platform
19 inline void yield() { pthread_yield_np(); }
20 inline void pause() {}
29 typedef thread::platform::LocalStore LocalStore;
30 friend struct thread::platform::LocalStore;
32 Thread(
bool external,
int stackSize);
36 Thread& operator=(Thread&& rhs);
38 static Thread& current();
43 static const int priorityNormal = 0;
44 static const int priorityMin;
45 static const int priorityMax;
46 void setPriority(
int priority);
47 int getPriority()
const;
50 static const ThreadId threadIdInvalid = 0;
51 ThreadId threadId()
const {
return _id; }
53 static int concurrency() {
static int ret = concurrency_priv();
return ret; }
58 static Thread* createExt();
59 static void* entry(
void* arg);
60 static int concurrency_priv();
65 UniquePtr<honey::Mutex> _lock;
void yield()
Give up this thread's time slice to allow other threads to execute.
Definition: Thread.h:52
void pause()
Perform a no-op without giving up this thread's time slice. This no-op momentarily frees resources fo...
Definition: Thread.h:54
Global Honeycomb namespace.