#ifndef __types_h #define __types_h __BEGIN_SYS // This is only until Arliones finishes malloc void * sysalloc(unsigned int s); void sysfree(void * o); void free(void * o); void * operator new(unsigned int s); void * operator new[](unsigned int s); void operator delete(void * o); void operator delete[](void * o); // Any quantity typedef unsigned int Size; //typedef int Quantity; //typedef int Index; // A timer tick (resolution defined in Traits::TICK_RESOLUTION) //typedef unsigned int Tick; // Hertz //typedef unsigned int Hertz; // The time (as defined by God Chronos, measured in seconds) //typedef unsigned long Seconds; // The time (measured in microseconds) //typedef unsigned long long Microseconds; // A time-stamp (relative to frequency()) //typedef unsigned long long Time_Stamp; // A NIC Address (MAC) //typedef unsigned long long NIC_Address; //typedef unsigned short NIC_Protocol; //static const NIC_Address BROADCAST= ~0; // System object IDs typedef unsigned short Type_Id; enum { CPU_ID, IA32_ID = CPU_ID, PPC32_ID, ARM_ID, LANAI_ID, H8_ID, AVR8_ID, TSC_ID, IA32_TSC_ID = TSC_ID, PPC32_TSC_ID, ARM_TSC_ID, LANAI_TSC_ID, H8_TSC_ID, AVR8_TSC_ID, MMU_ID, IA32_MMU_ID = MMU_ID, PPC32_MMU_ID, ARM_MMU_ID, LANAI_MMU_ID, H8_MMU_ID, AVR8_MMU_ID, MACHINE_ID, PC_ID = MACHINE_ID, KHOMP_ID, IPAQ_ID, //MYRINET_ID, RCX_ID, AT90S_ID, AT86RF_ID, IC_ID, PC_IC_ID = IC_ID, KHOMP_IC_ID, IPAQ_IC_ID, MYRINET_IC_ID, RCX_IC_ID, AT90S_IC_ID, AT86RF_IC_ID, TIMER_ID, PC_TIMER_ID = TIMER_ID, KHOMP_TIMER_ID, IPAQ_TIMER_ID, MYRINET_TIMER_ID, RCX_TIMER_ID, AT90S_TIMER_ID, AT86RF_TIMER_ID, TIMEPIECE_ID, CLOCK_ID = TIMEPIECE_ID, ALARM_ID, CHRONOMETER_ID, RTC_ID, PC_RTC_ID = RTC_ID, KHOMP_RTC_ID, IPAQ_RTC_ID, PCI_ID, PC_PCI_ID = PCI_ID, KHOMP_PCI_ID, DISPLAY_ID, PC_DISPLAY_ID = DISPLAY_ID, KHOMP_DISPLAY_ID, IPAQ_DISPLAY_ID, MYRINET_DISPLAY_ID, RCX_DISPLAY_ID, AT90S_DISPLAY_ID, AT86RF_DISPLAY_ID, THREAD_ID, EXCLUSIVE_THREAD_ID = THREAD_ID, COOPERATIVE_THREAD_ID, CONCURRENT_THREAD_ID, SEGMENT_ID, CONTIGUOUS_SEGMENT_ID = SEGMENT_ID, STATIC_SEGMENT_ID, DYNAMIC_SEGMENT_ID, ADDRESS_SPACE_ID, FLAT_AS_ID = ADDRESS_SPACE_ID, PAGED_AS_ID, SEGMENTED_AS_ID, PAGED_SEGMENTED_AS_ID, TASK_ID, SINGLE_TASK_ID = TASK_ID, MULT_TASK_ID, NETwORK_ID, MYRINET_ID = NETwORK_ID, NIC_ID, DUMMY_ID = NIC_ID, MYRINET9_ID, CRYPTER_ID, SIMPLE_ID = CRYPTER_ID, SIMMETRIC_ID, ASSIMETRIC_ID, UNKNOWN_TYPE, LAST_TYPE = UNKNOWN_TYPE - 1, ANY_TYPE = 0xffff }; // Type IDs for system objects template struct Type { static const Type_Id TYPE = UNKNOWN_TYPE; }; template<> struct Type { static const Type_Id TYPE = IA32_ID; }; template<> struct Type { static const Type_Id TYPE = PPC32_ID; }; template<> struct Type { static const Type_Id TYPE = ARM_ID; }; template<> struct Type { static const Type_Id TYPE = LANAI_ID; }; template<> struct Type { static const Type_Id TYPE = H8_ID; }; template<> struct Type { static const Type_Id TYPE = AVR8_ID; }; template<> struct Type { static const Type_Id TYPE = IA32_TSC_ID; }; template<> struct Type { static const Type_Id TYPE = PPC32_TSC_ID; }; template<> struct Type { static const Type_Id TYPE = ARM_TSC_ID; }; template<> struct Type { static const Type_Id TYPE = LANAI_TSC_ID; }; template<> struct Type { static const Type_Id TYPE = H8_TSC_ID; }; template<> struct Type { static const Type_Id TYPE = AVR8_TSC_ID; }; template<> struct Type { static const Type_Id TYPE = IA32_MMU_ID; }; template<> struct Type { static const Type_Id TYPE = PPC32_MMU_ID; }; template<> struct Type { static const Type_Id TYPE = ARM_MMU_ID; }; template<> struct Type { static const Type_Id TYPE = LANAI_MMU_ID; }; template<> struct Type { static const Type_Id TYPE = H8_MMU_ID; }; template<> struct Type { static const Type_Id TYPE = AVR8_MMU_ID; }; template<> struct Type { static const Type_Id TYPE = PC_ID; }; template<> struct Type { static const Type_Id TYPE = KHOMP_ID; }; template<> struct Type { static const Type_Id TYPE = IPAQ_ID; }; template<> struct Type { static const Type_Id TYPE = MYRINET_ID; }; template<> struct Type { static const Type_Id TYPE = RCX_ID; }; template<> struct Type { static const Type_Id TYPE = AT90S_ID; }; template<> struct Type { static const Type_Id TYPE = AT86RF_ID; }; template<> struct Type { static const Type_Id TYPE = PC_IC_ID; }; template<> struct Type { static const Type_Id TYPE = KHOMP_IC_ID; }; template<> struct Type { static const Type_Id TYPE = IPAQ_IC_ID; }; template<> struct Type { static const Type_Id TYPE = MYRINET_IC_ID; }; template<> struct Type { static const Type_Id TYPE = RCX_IC_ID; }; template<> struct Type { static const Type_Id TYPE = AT90S_IC_ID; }; template<> struct Type { static const Type_Id TYPE = AT86RF_IC_ID; }; template<> struct Type { static const Type_Id TYPE = PC_TIMER_ID; }; template<> struct Type { static const Type_Id TYPE = PC_RTC_ID; }; template<> struct Type { static const Type_Id TYPE = KHOMP_RTC_ID; }; template<> struct Type { static const Type_Id TYPE = IPAQ_RTC_ID; }; template<> struct Type { static const Type_Id TYPE = PC_PCI_ID; }; template<> struct Type { static const Type_Id TYPE = KHOMP_PCI_ID; }; template<> struct Type { static const Type_Id TYPE = PC_DISPLAY_ID; }; template<> struct Type { static const Type_Id TYPE = KHOMP_DISPLAY_ID; }; template<> struct Type { static const Type_Id TYPE = IPAQ_DISPLAY_ID; }; template<> struct Type { static const Type_Id TYPE = MYRINET_DISPLAY_ID; }; template<> struct Type { static const Type_Id TYPE = RCX_DISPLAY_ID; }; template<> struct Type { static const Type_Id TYPE = AT90S_DISPLAY_ID; }; template<> struct Type { static const Type_Id TYPE = AT86RF_DISPLAY_ID; }; template<> struct Type<__IMP(Exclusive_Thread)> { static const Type_Id TYPE = EXCLUSIVE_THREAD_ID; }; template<> struct Type<__IMP(Cooperative_Thread)> { static const Type_Id TYPE = COOPERATIVE_THREAD_ID; }; template<> struct Type<__IMP(Concurrent_Thread)> { static const Type_Id TYPE = CONCURRENT_THREAD_ID; }; template<> struct Type<__IMP(Contiguous_Segment)> { static const Type_Id TYPE = CONTIGUOUS_SEGMENT_ID; }; template<> struct Type<__IMP(Static_Segment)> { static const Type_Id TYPE = STATIC_SEGMENT_ID; }; template<> struct Type<__IMP(Dynamic_Segment)> { static const Type_Id TYPE = DYNAMIC_SEGMENT_ID; }; template<> struct Type<__IMP(Flat_AS)> { static const Type_Id TYPE = FLAT_AS_ID; }; template<> struct Type<__IMP(Paged_AS)> { static const Type_Id TYPE = PAGED_AS_ID; }; template<> struct Type<__IMP(Segmented_AS)> { static const Type_Id TYPE = SEGMENTED_AS_ID; }; template<> struct Type<__IMP(Paged_Segmented_AS)> { static const Type_Id TYPE = PAGED_SEGMENTED_AS_ID; }; template<> struct Type<__IMP(Single_Task)> { static const Type_Id TYPE = SINGLE_TASK_ID; }; template<> struct Type<__IMP(Mult_Task)> { static const Type_Id TYPE = MULT_TASK_ID; }; template<> struct Type<__IMP(Myrinet)> { static const Type_Id TYPE = MYRINET_ID; }; template<> struct Type { static const Type_Id TYPE = DUMMY_ID; }; template<> struct Type { static const Type_Id TYPE = MYRINET9_ID; }; template<> struct Type { static const Type_Id TYPE = SIMPLE_ID; }; template<> struct Type { static const Type_Id TYPE = SIMMETRIC_ID; }; template<> struct Type { static const Type_Id TYPE = ASSIMETRIC_ID; }; __END_SYS #endif