00001 #line 2081 "./lpsrc/flx_rtl.pak" 00002 #ifndef __FLX_SYNC_H__ 00003 #define __FLX_SYNC_H__ 00004 00005 #include "flx_gc.hpp" 00006 #include "flx_dynlink.hpp" 00007 #include "flx_rtl.hpp" 00008 #include <list> 00009 00010 namespace flx { namespace run { 00011 00012 enum fstate_t { terminated, blocked, delegated }; 00013 enum fpc_t { next_fthread_pos, next_request_pos }; 00014 00015 RTL_EXTERN char const * get_fstate_desc(fstate_t); 00016 RTL_EXTERN char const * get_fpc_desc(fpc_t); 00017 00018 struct RTL_EXTERN gc_profile_t { 00019 bool debug_allocations; 00020 bool debug_collections; 00021 unsigned long compact; 00022 unsigned long gc_freq; 00023 unsigned long gc_counter; 00024 unsigned long collections; 00025 bool finalise; 00026 flx::gc::generic::collector_t *collector; 00027 00028 gc_profile_t ( 00029 bool debug_allocations_, 00030 bool debug_collections_, 00031 unsigned long compact_, 00032 unsigned long gc_freq_, 00033 bool finalise_, 00034 flx::gc::generic::collector_t *collector 00035 ); 00036 ~gc_profile_t(); 00037 }; 00038 00039 struct RTL_EXTERN sync_state_t { 00040 bool debug_driver; 00041 gc_profile_t *gcp; 00042 std::list<flx::rtl::fthread_t*> *active; 00043 flx::rtl::fthread_t *ft; 00044 flx::rtl::_uctor_ *request; 00045 fpc_t pc; 00046 fstate_t fs; 00047 sync_state_t ( 00048 bool debug_driver_, 00049 gc_profile_t *gcp_, 00050 std::list<flx::rtl::fthread_t*> *active_ 00051 ); 00052 void frun(); 00053 }; 00054 00055 }} 00056 00057 #endif