WIP: add source contexts, remove debugger-only macros
commit0045e1dc5009b368ac22baf43bd23d70fa05c0fd
authorChristian Thaeter <ct@pipapo.org>
Fri, 22 Jan 2010 20:22:13 +0000 (22 21:22 +0100)
committerChristian Thaeter <ct@pipapo.org>
Fri, 22 Jan 2010 20:22:13 +0000 (22 21:22 +0100)
treea9c8c3558eb972258355b861a5fd1a6ffe0fea98
parentd315c6f5019ddfb3e96cf98af191c23a398a15c9
WIP: add source contexts, remove debugger-only macros

 * a 'struct nobug_context' is used to pass information about sourcefile
   linenumber and function along.
 * many macros have an additional *_CTX variant which takes such a context
   (more to be implemented on demand)
 * general refactoring to more basic cases, less code duplication,
   prepare to move more things from macros to library functions.
 * remove *_DBG variants which where only active when running under a
   debugger, the flags mechanism provides more flexibility and
   superseeded these.
 * change the semantics of thread_id's, each thread gets on unique number
   now which never changes. Resetting the thread identifier increments a
   generation counter for the thread (currently unused)
 * don't depend on gcc's ## __VA_ARGS_ semantics. Found a way to pass
   ""__VA_ARGS__ instead is portable, the only remaining case is
   NOBUG_ASSERT_ which has a conditional fallback for other compilers
   (and then don't print the failed expression anymore)

The above things are not yet in the documentation.
src/nobug.c
src/nobug.h
src/nobug_env.c
src/nobug_resources.c
src/nobug_thread.c
tests/29resourceimpl.tests
tests/30resource.tests
tests/35resourcethreaded.tests
tests/40threadid.tests
tests/test_nobug.c
tests/test_nobug_resources_basic.c