1 /*---------------------------------------------------------------------------* 2 Project: Dolphin OS Error Messages 3 File: OSAssert.h 4 5 Copyright 1998-2001 Nintendo. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Log: OSAssert.h,v $ 14 Revision 1.1.1.1 2005/12/29 06:53:27 hiratsu 15 Initial import. 16 17 Revision 1.1.1.1 2005/05/12 02:15:49 yasuh-to 18 Ported from dolphin source tree. 19 20 21 14 2002/08/26 11:58 Shiki 22 Added OS_ERR_CANCELALARMS_INVTAG. 23 24 13 2001/10/02 9:17 Shiki 25 Fixed SI_ERR_SETXY_INVX message. 26 27 12 2001/04/06 16:41 Shiki 28 Fixed SI_ERR_SETXY_INVX message. 29 30 11 2001/03/22 9:18 Shiki 31 Added SI_ERR_GETCOMMAND_INVCHAN. 32 33 10 2001/03/08 15:14 Shiki 34 Removed OS_ERR_INITAUDIOSYSTEM_CHKSUMERR. 35 36 9 2001/03/02 14:36 Shiki 37 Added OSAudioSystem messages. 38 39 8 2001/01/30 10:14 Shiki 40 Added OS_ERR_SETABSALARM_HANDLER. 41 42 7 2000/05/17 5:35p Shiki 43 Added more error messages for OSMutex.c 44 45 6 2000/03/21 5:01p Shiki 46 Added two more SI error messages. 47 48 5 2000/03/16 4:31p Shiki 49 Added mutex API assert messages. 50 51 4 2000/03/15 6:26p Shiki 52 Added thread assert messages. 53 54 3 1/21/00 11:04a Shiki 55 Fixed OS_ERR_GETARENAHI_INVALID message. 56 57 2 12/02/99 7:53p Tian 58 Locked cache asserts added 59 60 12 1999/09/15 4:56p Shiki 61 Added OSSerial.c assert messages. 62 63 11 8/02/99 2:35p Shiki 64 Added more OSException.c assert messages. 65 66 10 1999/08/02 2:17p Shiki 67 Added more OSInterrupt.c assert messages. 68 69 9 8/02/99 2:10p Shiki 70 Added OSInterrupt.c assert messages. 71 72 8 1999/07/28 9:21p Shiki 73 Added OSSetPeriodicAlarm() assert messages. 74 75 7 1999/07/28 5:56p Shiki 76 Added OSAlarm.c assert messages. 77 78 6 1999/07/27 4:46p Shiki 79 Added OSAddress.c assert messages. 80 81 5 1999/07/22 7:31p Shiki 82 Added OSArena.c assert messages. 83 84 4 1999/07/21 2:54p Shiki 85 Added OS.c assert messages. 86 87 3 1999/07/16 4:29p Shiki 88 Added OSTimer.c assert messages. 89 90 2 1999/07/12 9:04p Shiki 91 Added OS_ERR_SETERRORHANDLER_INVERR. 92 93 1 6/03/99 6:36p Shiki 94 95 2 5/11/99 10:18a Shiki 96 Refreshed include tree. 97 98 1 1999/04/30 12:47p Tianli01 99 100 1 1999/04/12 7:47p Tianli01 101 Changed from OSInit.h, added some private utility functions. 102 103 1 4/06/99 3:07p Tianli01 104 Initial check-in. Private header file with init routines for OS 105 modules. 106 $NoKeywords: $ 107 *---------------------------------------------------------------------------*/ 108 109 #ifndef __OSASSERT_H__ 110 #define __OSASSERT_H__ 111 112 #ifdef __cplusplus 113 extern "C" { 114 #endif 115 116 /*---------------------------------------------------------------------------* 117 Error messages of OS.c 118 *---------------------------------------------------------------------------*/ 119 #define OS_ERR_EXCEPTIONINIT_TOOBIG "OSExceptionInit(): too big exception vector code." 120 #define OS_ERR_SETEXCEPTIONHANDLER_UNKNOWN "__OSSetExceptionHandler(): unknown exception." 121 #define OS_ERR_GETEXCEPTIONHANDLER_UNKNOWN "__OSGetExceptionHandler(): unknown exception." 122 123 /*---------------------------------------------------------------------------* 124 Error messages of OSAddress.c 125 *---------------------------------------------------------------------------*/ 126 #define OS_ERR_PHYSICALTOCACHED_INVADDR "OSPhysicalToCached(): illegal address." 127 #define OS_ERR_PHYSICALTOUNCACHED_INVADDR "OSPhysicalToUncached(): illegal address." 128 #define OS_ERR_CACHEDTOPHYSICAL_INVADDR "OSCachedToPhysical(): illegal address." 129 #define OS_ERR_UNCACHEDTOPHYSICAL_INVADDR "OSUncachedToPhysical(): illegal address." 130 #define OS_ERR_CACHEDTOUNCACHED_INVADDR "OSCachedToUncached(): illegal address." 131 #define OS_ERR_UNCACHEDTOCACHED_INVADDR "OSUncachedToCached(): illegal address." 132 133 /*---------------------------------------------------------------------------* 134 Error messages of OSAlarm.c 135 *---------------------------------------------------------------------------*/ 136 #define OS_ERR_SETALARM_TICK "OSSetAlarm(): tick was less than zero." 137 #define OS_ERR_SETALARM_HANDLER "OSSetAlarm(): null handler was specified." 138 #define OS_ERR_SETABSALARM_HANDLER "OSSetAbsAlarm(): null handler was specified." 139 #define OS_ERR_SETPERIODICALARM_PERIOD "OSSetPeriodicAlarm(): period was less than zero." 140 #define OS_ERR_SETPERIODICALARM_HANDLER "OSSetPeriodicAlarm(): null handler was specified." 141 #define OS_ERR_CANCELALARMS_INVTAG "OSCancelAlarms(): invalid tag. (tag zero is used by the operating system.)" 142 143 /*---------------------------------------------------------------------------* 144 Error messages of OSAlloc.c 145 *---------------------------------------------------------------------------*/ 146 #define OS_ERR_ALLOCFROMHEAP_NOHEAP "OSAllocFromHeap(): heap is not initialized." 147 #define OS_ERR_ALLOCFROMHEAP_INVSIZE "OSAllocFromHeap(): invalid size." 148 #define OS_ERR_ALLOCFROMHEAP_INVHEAP "OSAllocFromHeap(): invalid heap handle." 149 #define OS_ERR_ALLOCFROMHEAP_BROKENHEAP "OSAllocFromHeap(): heap is broken." 150 #define OS_ERR_ALLOCFIXED_NOHEAP "OSAllocFixed(): heap is not initialized." 151 #define OS_ERR_ALLOCFIXED_INVRANGE "OSAllocFixed(): invalid range." 152 #define OS_ERR_FREETOHEAP_NOHEAP "OSFreeToHeap(): heap is not initialized." 153 #define OS_ERR_FREETOHEAP_INVPTR "OSFreeToHeap(): invalid pointer." 154 #define OS_ERR_FREETOHEAP_INVHEAP "OSFreeToHeap(): invalid heap handle." 155 #define OS_ERR_SETCURRENTHEAP_NOHEAP "OSSetCurrentHeap(): heap is not initialized." 156 #define OS_ERR_SETCURRENTHEAP_INVHEAP "OSSetCurrentHeap(): invalid heap handle." 157 #define OS_ERR_INITALLOC_INVNUMHEAPS "OSInitAlloc(): invalid number of heaps." 158 #define OS_ERR_INITALLOC_INVRANGE "OSInitAlloc(): invalid range." 159 #define OS_ERR_INITALLOC_INSRANGE "OSInitAlloc(): too small range." 160 #define OS_ERR_CREATEHEAP_NOHEAP "OSCreateHeap(): heap is not initialized." 161 #define OS_ERR_CREATEHEAP_INVRANGE "OSCreateHeap(): invalid range." 162 #define OS_ERR_CREATEHEAP_INSRANGE "OSCreateHeap(): too small range." 163 #define OS_ERR_DESTROYHEAP_NOHEAP "OSDestroyHeap(): heap is not initialized." 164 #define OS_ERR_DESTROYHEAP_INVHEAP "OSDestroyHeap(): invalid heap handle." 165 #define OS_ERR_ADDTOHEAP_NOHEAP "OSAddToHeap(): heap is not initialized." 166 #define OS_ERR_ADDTOHEAP_INVHEAP "OSAddToHeap(): invalid heap handle." 167 #define OS_ERR_ADDTOHEAP_INVRANGE "OSAddToHeap(): invalid range." 168 #define OS_ERR_ADDTOHEAP_INSRANGE "OSAddToHeap(): too small range." 169 #define OS_ERR_REFERENT_NOHEAP "OSReferentSize(): heap is not initialized." 170 #define OS_ERR_REFERENT_INVPTR "OSReferentSize(): invalid pointer." 171 #define OS_ERR_DUMPHEAP_NOHEAP "OSDumpHeap(): heap is not initialized." 172 #define OS_ERR_DUMPHEAP_INVHEAP "OSDumpHeap(): invalid heap handle." 173 #define OS_ERR_DUMPHEAP_BROKENHEAP "OSDumpHeap(): heap is broken." 174 175 /*---------------------------------------------------------------------------* 176 Error messages of OSArena.c 177 *---------------------------------------------------------------------------*/ 178 #define OS_ERR_GETARENAHI_INIT "OSGetArenaHi(): OSInit() must be called in advance." 179 #define OS_ERR_GETARENAHI_INVALID "OSGetArenaHi(): invalid arena (hi < lo)." 180 #define OS_ERR_GETARENALO_INIT "OSGetArenaLo(): OSInit() must be called in advance." 181 #define OS_ERR_GETARENALO_INVALID "OSGetArenaLo(): invalid arena (hi < lo)." 182 183 /*---------------------------------------------------------------------------* 184 Error messages of OSAudioSystem.c 185 *---------------------------------------------------------------------------*/ 186 #define OS_ERR_INITAUDIOSYSTEM_ARAMDMAPROGRESS "__OSInitAudioSystem(): ARAM DMA already in progress" 187 #define OS_ERR_INITAUDIOSYSTEM_DSPDMAPROGRESS "__OSInitAudioSystem(): DSP DMA already in progress" 188 #define OS_ERR_INITAUDIOSYSTEM_DSPWORKING "__OSInitAudioSystem(): DSP already working" 189 #define OS_ERR_INITAUDIOSYSTEM_INVALIDMSG "__OSInitAudioSystem(): DSP returns invalid message" 190 191 /*---------------------------------------------------------------------------* 192 Error messages of OSError.c 193 *---------------------------------------------------------------------------*/ 194 #define OS_ERR_SETERRORHANDLER_INVERR "OSSetErrorHandler(): unknown error." 195 196 /*---------------------------------------------------------------------------* 197 Error messages of OSInterrupt.c 198 *---------------------------------------------------------------------------*/ 199 #define OS_ERR_SETINTERRUPTHANDLER_INIT "__OSSetInterruptHandler(): OSInit() must be called in advance." 200 #define OS_ERR_SETINTERRUPTHANDLER_UNKNOWN "__OSSetInterruptHandler(): unknown interrupt." 201 #define OS_ERR_GETINTERRUPTHANDLER_INIT "__OSGetInterruptHandler(): OSInit() must be called in advance." 202 #define OS_ERR_GETINTERRUPTHANDLER_UNKNOWN "__OSGetInterruptHandler(): unknown interrupt." 203 204 /*---------------------------------------------------------------------------* 205 Error messages of OSSerial.c 206 *---------------------------------------------------------------------------*/ 207 #define SI_ERR_TRANSFER_INVCHAN "SITransfer(): invalid channel." 208 #define SI_ERR_TRANSFER_INVOUTBYTES "SITransfer(): output size is out of range (must be 1 to 128)." 209 #define SI_ERR_TRANSFER_INVINBYTES "SITransfer(): input size is out of range (must be 1 to 128)." 210 #define SI_ERR_SYNC_CALLBACK "SISync(): asynchronous SITransfer() is in progress." 211 #define SI_ERR_SYNC_NOTRANSFER "SISync(): no SITransfer() is in progress." 212 #define SI_ERR_SETCOMMAND_INVCHAN "SISetCommand(): invalid channel." 213 #define SI_ERR_GETCOMMAND_INVCHAN "SIGetCommand(): invalid channel." 214 #define SI_ERR_SETXY_INVX "SISetXY(): x is out of range (8 <= x <= 1023)." 215 #define SI_ERR_SETXY_INVY "SISetXY(): y is out of range (0 <= y <= 255)." 216 #define SI_ERR_GETRESPONSE_INVCHAN "SIGetResponse(): invalid channel." 217 #define SI_ERR_ENABLEPOLLING_INVCHAN "SIEnablePolling(): invalid chan bit(s)." 218 #define SI_ERR_DISABLEPOLLING_INVCHAN "SIDisablePolling(): invalid chan bit(s)." 219 220 /*---------------------------------------------------------------------------* 221 Error messages of OSThread.c 222 *---------------------------------------------------------------------------*/ 223 #define OS_ERR_CREATETHREAD_BADPRIO "OSCreateThread(): priority out of range (0 <= priority <= 31)." 224 #define OS_ERR_CREATETHREAD_STILLACTIVE "OSCreateThread(): thread %p is still active." 225 #define OS_ERR_EXITTHREAD_NOCURRENT "OSExitThread(): current thread does not exist." 226 #define OS_ERR_EXITTHREAD_NOTRUNNING "OSExitThread(): current thread is not running." 227 #define OS_ERR_EXITTHREAD_NOTACTIVE "OSExitThread(): current thread is not active." 228 #define OS_ERR_CANCELTHREAD_NOTACTIVE "OSExitThread(): thread %p is not active." 229 #define OS_ERR_JOINTHREAD_NOTACTIVE "OSJoinThread(): thread %p is not active." 230 #define OS_ERR_DETACHTHREAD_NOTACTIVE "OSDetachThread(): thread %p is not active." 231 #define OS_ERR_RESUMETHREAD_NOTACTIVE "OSResumeThread(): thread %p is not active." 232 #define OS_ERR_RESUMETHREAD_MORIBUND "OSResumeThread(): thread %p is terminated." 233 #define OS_ERR_SUSPENDTHREAD_NOTACTIVE "OSSuspendThread(): thread %p is not active." 234 #define OS_ERR_SUSPENDTHREAD_MORIBUND "OSSuspendThread(): thread %p is terminated." 235 #define OS_ERR_SLEEPTHREAD_NOCURRENT "OSSleepThread(): current thread does not exist." 236 #define OS_ERR_SLEEPTHREAD_NOTACTIVE "OSSleepThread(): current thread %p is not active." 237 #define OS_ERR_SLEEPTHREAD_NOTRUNNING "OSSleepThread(): current thread %p is not running." 238 #define OS_ERR_SLEEPTHREAD_SUSPENDED "OSSleepThread(): current thread %p is suspended." 239 #define OS_ERR_SETTHREADPRIORITY_BADPRIO "OSSetThreadPriority(): priority out of range (0 <= priority <= 31)." 240 #define OS_ERR_SETTHREADPRIORITY_NOTACTIVE "OSSetThreadPriority(): thread %p is not active." 241 #define OS_ERR_SETTHREADPRIORITY_MORIBUND "OSSetThreadPriority(): thread %p is terminated." 242 243 /*---------------------------------------------------------------------------* 244 Error messages of OSTimer.c 245 *---------------------------------------------------------------------------*/ 246 #define OS_ERR_SETTIMERCALLBACK_INIT "OSSetTimerCallback(): timer is not initialized." 247 #define OS_ERR_INITTIMER_INVTIME "OSInitTimer(): time param must be less than 0x80000000." 248 #define OS_ERR_STARTTIMER_INIT "OSStartTimer(): timer is not initialized." 249 #define OS_ERR_STOPTIMER_INIT "OSStopTimer(): timer is not initialized." 250 251 /*---------------------------------------------------------------------------* 252 Error messages of OSMutex.c 253 *---------------------------------------------------------------------------*/ 254 #define OS_ERR_LOCKMUTEX_NOCURRENT "OSLockMutex(): current thread does not exist." 255 #define OS_ERR_LOCKMUTEX_NOTRUNNING "OSLockMutex(): current thread is not running." 256 #define OS_ERR_LOCKMUTEX_DEADLOCK "OSLockMutex(): detected deadlock: current thread %p, mutex %p." 257 #define OS_ERR_UNLOCKMUTEX_NOCURRENT "OSUnlockMutex(): current thread does not exist." 258 #define OS_ERR_UNLOCKMUTEX_NOTRUNNING "OSUnlockMutex(): current thread is not running." 259 #define OS_ERR_UNLOCKMUTEX_NOTOWNER "OSUnlockMutex(): current thread %p is not the owner of mutex %p." 260 #define OS_ERR_TRYLOCKMUTEX_NOCURRENT "OSTryLockMutex(): current thread does not exist." 261 #define OS_ERR_TRYLOCKMUTEX_NOTRUNNING "OSTryLockMutex(): current thread is not running." 262 #define OS_ERR_WAITCOND_NOCURRENT "OSWaitCond(): current thread does not exist." 263 #define OS_ERR_WAITCOND_NOTRUNNING "OSWaitCond(): current thread is not running." 264 #define OS_ERR_WAITCOND_NOTOWNER "OSWaitCond(): current thread %p is not the owner of mutex %p." 265 266 /*---------------------------------------------------------------------------* 267 Locked cache error messages 268 *---------------------------------------------------------------------------*/ 269 #define LC_ERR_ALLOC_ADDR "LCAlloc(): addr must be 32 byte aligned" 270 #define LC_ERR_ALLOC_NBYTES "LCAlloc(): nBytes must be 32 byte aligned" 271 #define LC_ERR_ALLOCNF_ADDR "LCAllocNoFlush(): addr must be 32 byte aligned" 272 #define LC_ERR_ALLOCNF_NBYTES "LCAllocNoFlush(): nBytes must be 32 byte aligned" 273 274 #define LC_ERR_FREE_ADDR "LCFree(): addr must be 32 byte aligned" 275 #define LC_ERR_FREE_NBYTES "LCFree(): nBytes must be 32 byte aligned" 276 277 #define LC_ERR_LOAD_SRCADDR "LCLoadData(): srcAddr not 32 byte aligned" 278 #define LC_ERR_LOAD_DESTADDR "LCLoadData(): destAddr not 32 byte aligned" 279 #define LC_ERR_LOAD_NBYTES "LCLoadData(): nBytes not 32 byte aligned" 280 281 #define LC_ERR_STORE_SRCADDR "LCStoreData(): srcAddr not 32 byte aligned" 282 #define LC_ERR_STORE_DESTADDR "LCStoreData(): destAddr not 32 byte aligned" 283 #define LC_ERR_STORE_NBYTES "LCStoreData(): nBytes not 32 byte aligned" 284 285 286 #ifdef __cplusplus 287 } 288 #endif 289 290 #endif // __OSPRIVATE_H__ 291