In general, applications should be run in DEBUG mode on a regular basis because Cafe OS includes numerous important runtime checks that can help find bugs earlier and more easily than in NDEBUG mode.
Further checks must be enabled explicitly when an application is invoked.
For example, the data structure sanity checks below are enabled by
running the application with "
caferun -v 2".
Applications should also be run in this mode on a regular basis.
Beginning with SDK 2.08.04, Cafe OS includes new sanity checks for its data structures, many of which can be directly or indirectly manipulated by the application. The sanity checks cause assertion failures when they fail, making it easier to pinpoint the source of the issue.
In SDK 2.08.04, these sanity checks were always enabled in the DEBUG builds of Cafe OS.
Beginning with SDK 2.08.05, the checks are disabled by default, but can be enabled by
invoking the application with "
caferun -v 2".
The checks are always disabled in NDEBUG builds of Cafe OS.
When enabled, the data structure sanity checks cause assertion failures when certain types of corruption are detected. The checks include:
OSSemaphorewas initialized with the appropriate
OSInit*function call before use.
OSContextis not corrupted before resuming the thread via the user-mode scheduler.
OSCheckActiveThreadsfunction on Core 2 to ensure that the global thread list has not been corrupted and that items referenced by the thread list are also intact.
2013/05/08 Automated cleanup pass.
2012/11/01 Initial version.