00001
00029
00030 #ifndef MACHINE_H
00031 #define MACHINE_H
00032
00033
00034 #if 0 && CMK_SHARED_VARS_UNAVAILABLE
00035 # define MACHLOCK_DEBUG
00036 # define MACHLOCK_ASSERT(l,str) \
00037 if (!(l)) \
00038 CmiAbort("Lock assertation failed: " __FILE__ " " str);
00039 #else
00040 # define MACHLOCK_ASSERT(l,str)
00041 #endif
00042
00046 #define MACHINE_DEBUG 0
00047 #if MACHINE_DEBUG
00048
00053 #define MACHINE_DEBUG_PRIO 3
00054 #define MACHINE_DEBUG_LOG 1
00056 extern FILE *debugLog;
00057 # define MACHSTATE_I(prio,args) if ((debugLog)&&(prio)>=MACHINE_DEBUG_PRIO) {\
00058 CmiMemLock(); fprintf args ; fflush(debugLog); CmiMemUnlock(); }
00059 # define MACHSTATE(prio,str) \
00060 MACHSTATE_I(prio,(debugLog,"[%d %.6f]> "str"\n",CmiMyRank(),CmiWallTimer()))
00061 # define MACHSTATE1(prio,str,a) \
00062 MACHSTATE_I(prio,(debugLog,"[%d %.6f]> "str"\n",CmiMyRank(),CmiWallTimer(),a))
00063 # define MACHSTATE2(prio,str,a,b) \
00064 MACHSTATE_I(prio,(debugLog,"[%d %.6f]> "str"\n",CmiMyRank(),CmiWallTimer(),a,b))
00065 # define MACHSTATE3(prio,str,a,b,c) \
00066 MACHSTATE_I(prio,(debugLog,"[%d %.6f]> "str"\n",CmiMyRank(),CmiWallTimer(),a,b,c))
00067 # define MACHSTATE4(prio,str,a,b,c,d) \
00068 MACHSTATE_I(prio,(debugLog,"[%d %.6f]> "str"\n",CmiMyRank(),CmiWallTimer(),a,b,c,d))
00069 # define MACHSTATE5(prio,str,a,b,c,d,e) \
00070 MACHSTATE_I(prio,(debugLog,"[%d %.6f]> "str"\n",CmiMyRank(),CmiWallTimer(),a,b,c,d,e))
00071 #else
00072 # define MACHINE_DEBUG_LOG 0
00073 # define MACHSTATE(n,x)
00074 # define MACHSTATE1(n,x,a)
00075 # define MACHSTATE2(n,x,a,b)
00076 # define MACHSTATE3(n,x,a,b,c)
00077 # define MACHSTATE4(n,x,a,b,c,d)
00078 # define MACHSTATE5(n,x,a,b,c,d,e)
00079 #endif
00080
00081
00082 #define COMM_SERVER_FROM_SMP 0
00083 #define COMM_SERVER_FROM_INTERRUPT 1
00084 #define COMM_SERVER_FROM_WORKER 2
00085
00086 #endif
00087