00001 #include "global.h" 00002 #include "MercuryThreads.h" 00003 00004 #include <stdio.h> 00005 /* This file is the cpp file you should include when compiling for EE 00006 arch. It is very different from the normal arch's MercuryThreads. 00007 00008 Note that it uses code that is under the academic free license 2.0. 00009 Please read the readme/license provided with PS2SDK toolchain for 00010 more information. */ 00011 00012 00013 //#include <kernel.h> 00014 00015 MercuryThread::MercuryThread() 00016 { 00017 m_thread = -1; 00018 m_name = "(null)"; 00019 } 00020 00021 MercuryThread::MercuryThread( const MString &name ) 00022 { 00023 m_thread = -1; 00024 m_name = name; 00025 } 00026 00027 MercuryThread::~MercuryThread( ) 00028 { 00029 Close(); 00030 } 00031 00032 int MercuryThread::Create( void * (*fn)(void *), void *data ) 00033 { 00034 char * g = (char*)0xCCCCCCCC; 00035 printf( "CREATE THREAD\n" ); 00036 // delete g; 00037 // (*fn)(data); 00038 return true; 00039 } 00040 00041 int MercuryThread::Halt( bool kill ) 00042 { 00043 return true; 00044 } 00045 00046 int MercuryThread::Resume( ) 00047 { 00048 return 0; 00049 } 00050 00051 int MercuryThread::Wait( long lMilliseconds ) 00052 { 00053 return 0; 00054 } 00055 00056 void MercuryThread::Close( ) 00057 { 00058 } 00059 00060 //Mutex functions 00061 MercuryMutex::MercuryMutex( ) 00062 { 00063 m_name = "(null)"; 00064 Open( ); 00065 UnLock(); 00066 } 00067 00068 MercuryMutex::MercuryMutex( const MString &name ) 00069 { 00070 m_name = name; 00071 Open( ); 00072 UnLock(); 00073 } 00074 00075 MercuryMutex::~MercuryMutex( ) 00076 { 00077 Close( ); 00078 } 00079 00080 int MercuryMutex::Wait( long lMilliseconds ) 00081 { 00082 } 00083 00084 int MercuryMutex::UnLock( ) 00085 { 00086 return 0; 00087 } 00088 00089 int MercuryMutex::Open( ) 00090 { 00091 return 0; 00092 } 00093 00094 int MercuryMutex::Close( ) 00095 { 00096 return 0; 00097 }