00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef THREADDUMMYIMPL_H
00016 #define THREADDUMMYIMPL_H
00017
00018 #include "pandabase.h"
00019 #include "selectThreadImpl.h"
00020
00021 #ifdef THREAD_DUMMY_IMPL
00022
00023 #include "pnotify.h"
00024 #include "threadPriority.h"
00025
00026 class Thread;
00027
00028 #ifdef WIN32
00029 #define WIN32_LEAN_AND_MEAN
00030 #include <windows.h>
00031 #endif
00032
00033
00034
00035
00036
00037
00038
00039 class EXPCL_PANDA_PIPELINE ThreadDummyImpl {
00040 public:
00041 INLINE ThreadDummyImpl(Thread *parent_obj);
00042 INLINE ~ThreadDummyImpl();
00043
00044 INLINE void setup_main_thread();
00045 INLINE bool start(ThreadPriority priority, bool joinable);
00046 INLINE void join();
00047 INLINE void preempt();
00048
00049 string get_unique_id() const;
00050
00051 INLINE static void prepare_for_exit();
00052
00053 static Thread *get_current_thread();
00054 INLINE static void bind_thread(Thread *thread);
00055 INLINE static bool is_threading_supported();
00056 INLINE static bool is_true_threads();
00057 INLINE static bool is_simple_threads();
00058 INLINE static void sleep(double seconds);
00059 INLINE static void yield();
00060 INLINE static void consider_yield();
00061 };
00062
00063 #include "threadDummyImpl.I"
00064
00065 #endif // THREAD_DUMMY_IMPL
00066
00067 #endif