zerax/nobug
11 years agoadded a pkg-config metadata file for multithreaded nobugmt master
Christian Thaeter [Mon, 18 Aug 2008 23:45:15 +0000 (01:45 +0200)]
added a pkg-config metadata file for multithreaded nobugmt

11 years agoadded a pkg-config metadata file
Michael Ploujnikov [Sun, 17 Aug 2008 01:20:30 +0000 (21:20 -0400)]
added a pkg-config metadata file

11 years agoadd RESOURCE_STATE_RAW for uncooked flags master_signature
Christian Thaeter [Sun, 17 Aug 2008 23:24:49 +0000 (01:24 +0200)]
add RESOURCE_STATE_RAW for uncooked flags

11 years agoadd RESOURCE_ANNOUNCE_RAW and RESOURCE_FORGET_RAW variants
Christian Thaeter [Sat, 9 Aug 2008 14:11:27 +0000 (16:11 +0200)]
add RESOURCE_ANNOUNCE_RAW and RESOURCE_FORGET_RAW variants

These take a pointer to a nobug_flag and not a unmangled name.
This required to change the lowlevel NOBUG_LOG_ to take this raw pointer
too.

11 years agoadd preconditions for resource handling
Christian Thaeter [Sat, 9 Aug 2008 06:50:13 +0000 (08:50 +0200)]
add preconditions for resource handling

ensure that announcements and entering resources get properly initialized
handles else this would be hard to find bugs.

11 years agoadd shortname for RESOURCE_HANDLE_INIT
Christian Thaeter [Sat, 9 Aug 2008 04:44:08 +0000 (06:44 +0200)]
add shortname for RESOURCE_HANDLE_INIT

11 years agoadd a resource handle init macro
Christian Thaeter [Sat, 9 Aug 2008 03:53:41 +0000 (05:53 +0200)]
add a resource handle init macro

resourcetracking is only available in ALPHA builds, this macro provides
a conditional initialization which is also only available in ALPHA.

12 years agoACX_PTHREAD needs LDFLAGS=PTHREAD_CFLAGS
Christian Thaeter [Thu, 22 May 2008 16:37:55 +0000 (18:37 +0200)]
ACX_PTHREAD needs LDFLAGS=PTHREAD_CFLAGS

Problem on etch, works this way at least

12 years agoadd the srcdir to the include directories for building tests
Christian Thaeter [Thu, 22 May 2008 16:15:55 +0000 (18:15 +0200)]
add the srcdir to the include directories for building tests

this got lost with the directory restructuring some time ago,
the tests used a installed version of 'nobug.h' instead the one from
the source.

12 years agosome cosmetics
Christian Thaeter [Wed, 7 May 2008 06:06:52 +0000 (08:06 +0200)]
some cosmetics

12 years agoaccording to POSIX overlapped mmap replaces the old mapping,
Christian Thaeter [Tue, 29 Apr 2008 03:17:52 +0000 (05:17 +0200)]
according to POSIX overlapped mmap replaces the old mapping,
no need for munmap()

12 years agoMeta and documentation update for 0.3rc1 0.3rc1
Christian Thaeter [Thu, 3 Apr 2008 05:19:20 +0000 (07:19 +0200)]
Meta and documentation update for 0.3rc1

Meta and documentation updates

12 years agochanged license to GPLv2 or any later
Christian Thaeter [Thu, 3 Apr 2008 05:15:42 +0000 (07:15 +0200)]
changed license to GPLv2 or any later

Previously it was only GPLv2. This license change should allow anyone
working on a GPLv3 project to use NoBug.

12 years agorbdump must include source header
Christian Thaeter [Thu, 20 Mar 2008 11:21:47 +0000 (12:21 +0100)]
rbdump must include source header

12 years agoreindented rbdump, added/removed some code
Christian Thaeter [Tue, 18 Mar 2008 11:30:56 +0000 (12:30 +0100)]
reindented rbdump, added/removed some code

12 years agoMerge branch 'master' of git://git.pipapo.org/nobug-simeon
Christian Thaeter [Tue, 18 Mar 2008 11:17:09 +0000 (12:17 +0100)]
Merge branch 'master' of git://git.pipapo.org/nobug-simeon

* 'master' of git://git.pipapo.org/nobug-simeon:
  Corrected indenting in Makefile.am
  removed unneded comments
  Added nobug_rbdump to Makefile.am
  Renamed nobug_rbdump.cpp to nobug_rbdump.c
  Added nobug_rbdump - nobug ringbuffer dump
  update of INSTALL

12 years agofix: test strlen(flag->name) after existence of flag->name has be checked
Christian Thaeter [Tue, 18 Mar 2008 11:16:49 +0000 (12:16 +0100)]
fix: test strlen(flag->name) after existence of flag->name has be checked

12 years agoCorrected indenting in Makefile.am
Simeon Voelkel [Tue, 18 Mar 2008 10:41:17 +0000 (11:41 +0100)]
Corrected indenting in Makefile.am

12 years agoremoved unneded comments
Simeon Voelkel [Tue, 18 Mar 2008 10:37:30 +0000 (11:37 +0100)]
removed unneded comments

12 years agoAdded nobug_rbdump to Makefile.am
Simeon Voelkel [Tue, 18 Mar 2008 10:04:02 +0000 (11:04 +0100)]
Added nobug_rbdump to Makefile.am

12 years agoRenamed nobug_rbdump.cpp to nobug_rbdump.c
Simeon Voelkel [Tue, 18 Mar 2008 10:03:39 +0000 (11:03 +0100)]
Renamed nobug_rbdump.cpp to nobug_rbdump.c

12 years agoAdded nobug_rbdump - nobug ringbuffer dump
Simeon Voelkel [Tue, 18 Mar 2008 09:38:11 +0000 (10:38 +0100)]
Added nobug_rbdump - nobug ringbuffer dump
(prints the content of a nobug ringbuffer to stdout)

12 years agoupdate of INSTALL
Simeon Voelkel [Tue, 18 Mar 2008 09:37:01 +0000 (10:37 +0100)]
update of INSTALL

12 years agoadd nobug_log to nobug.h, cleanup
Christian Thaeter [Tue, 18 Mar 2008 08:20:22 +0000 (09:20 +0100)]
add nobug_log to nobug.h, cleanup

12 years agoadd the flag to the callback parameters
Christian Thaeter [Tue, 18 Mar 2008 08:16:59 +0000 (09:16 +0100)]
add the flag to the callback parameters

12 years agoSlightly relaxed locking/counter updates
Christian Thaeter [Tue, 18 Mar 2008 06:27:25 +0000 (07:27 +0100)]
Slightly relaxed locking/counter updates

Update the counter only when some logging is done at least to the ring
buffer. Allows slightly relaxed locking too.

12 years agoAdd a hook for application defined logging
Christian Thaeter [Tue, 18 Mar 2008 06:23:16 +0000 (07:23 +0100)]
Add a hook for application defined logging

An application can set nobug_callback to an application defined function
handling logging. There is also a generic nobug_callback_data pointer
transparently passed around to your logging function.

Important nore: The logging function runs inside the NoBug lock, don't call
any nobug functions from it (this might be fixed with a recursive mutex
when needed)

12 years agoAdd a global event counter
Christian Thaeter [Tue, 18 Mar 2008 05:35:33 +0000 (06:35 +0100)]
Add a global event counter

Each logging event increments this counter by one. Its value is printed
first at each logging line (format change!).

This couter allows to associate event orders when diffrent target logfiles
are used.

12 years agoadd options parser to envvar parsing
Christian Thaeter [Mon, 17 Mar 2008 22:23:26 +0000 (23:23 +0100)]
add options parser to envvar parsing

targets can now be configured with (key[=value]) in NOBUG_LOG

@ringbuffer
(file=filename) set filename backing the ringbuffer
(size=nnn) set size of the ringbuffer
(append) don't erase existing ringbuffer
(keep) keep file after application end
(temp) unlink file instantly at creation

@console
(fd=n) redirect console output to fd n

@file
(name=filename) log to filename
(append) append to (existing) log

@syslog
(ident=name) global prefix for syslog
(cons) log to system console if syslog is down
(pid) include pid in log
(perror) log to stderr as well

12 years agoAdd ringbuffer_new/delete() for dynamic ringbuffer allocation
Christian Thaeter [Mon, 17 Mar 2008 19:39:44 +0000 (20:39 +0100)]
Add ringbuffer_new/delete() for dynamic ringbuffer allocation

12 years agoRefactored the logging macro to a helper function
Christian Thaeter [Sun, 16 Mar 2008 10:33:30 +0000 (11:33 +0100)]
Refactored the logging macro to a helper function

This was a long outstanding optimization which should reduce bloat
considerably

12 years agoDirectory reorganization
Christian Thaeter [Sun, 16 Mar 2008 08:23:06 +0000 (09:23 +0100)]
Directory reorganization

created src/ and tests/ subdirs

12 years agocleanup checks only in ALPHA build level
Christian Thaeter [Sun, 16 Mar 2008 06:33:04 +0000 (07:33 +0100)]
cleanup checks only in ALPHA build level

12 years agoMerge commit 'mob/master'
Christian Thaeter [Sat, 28 Jul 2007 22:47:59 +0000 (00:47 +0200)]
Merge commit 'mob/master'

12 years agoupdated documentation, ChangeLog and some cosmetics
Christian Thaeter [Sat, 28 Jul 2007 22:47:27 +0000 (00:47 +0200)]
updated documentation, ChangeLog and some cosmetics

12 years agoBuild all test programs in all variants (and run them at "make check").
Peter Simons [Sat, 28 Jul 2007 20:59:20 +0000 (22:59 +0200)]
Build all test programs in all variants (and run them at "make check").

12 years agonobug_resources.c: fixed "unused variable" compiler warning
Peter Simons [Sat, 28 Jul 2007 12:06:29 +0000 (14:06 +0200)]
nobug_resources.c: fixed "unused variable" compiler warning

The static symbol nobug_resource_errbuf[] is used in pthread
builds only. Moving it into nobug_resource_enter_check() fixes a
warning in non-threading builds.

12 years ago.gitignore: Ignore example program and other generated files.
Peter Simons [Sat, 28 Jul 2007 11:31:53 +0000 (13:31 +0200)]
.gitignore: Ignore example program and other generated files.

12 years agoMakefile.am: Added build targets for example program.
Peter Simons [Sat, 28 Jul 2007 11:31:43 +0000 (13:31 +0200)]
Makefile.am: Added build targets for example program.

A "make check" will now build (and run) the example program in
all different variants. For the multi-threaded version, the
results of ACX_PTHREAD are used. The 'changelog' target has been
renamed to 'ChangeLog' to fix "make distcheck" error.

12 years agoexample.c: return 0 to avoid compiler warning.
Peter Simons [Sat, 28 Jul 2007 11:29:48 +0000 (13:29 +0200)]
example.c: return 0 to avoid compiler warning.

12 years agonobug_ringbuffer.c: Include <stdlib.h> to define mkstemp().
Peter Simons [Sat, 28 Jul 2007 11:29:19 +0000 (13:29 +0200)]
nobug_ringbuffer.c: Include <stdlib.h> to define mkstemp().

12 years agonobug.c: Silenced gcc warning about a lost const qualifier in the free() call.
Peter Simons [Sat, 28 Jul 2007 11:29:02 +0000 (13:29 +0200)]
nobug.c: Silenced gcc warning about a lost const qualifier in the free() call.

12 years agonobug_thread.c: cosmetic fixes
Peter Simons [Sat, 28 Jul 2007 11:28:04 +0000 (13:28 +0200)]
nobug_thread.c: cosmetic fixes

pthread.h is included by nobug.h already. Moved static thread
counter into nobug_thread_id_set(); no-one else accesses it.

12 years agonobug_resources.c: Use %lu to snprintf() an unsigned long value.
Peter Simons [Sat, 28 Jul 2007 11:27:20 +0000 (13:27 +0200)]
nobug_resources.c: Use %lu to snprintf() an unsigned long value.

Also removed unused 'node' variable from nobug_resource_tree_dump_all().

12 years agonobug_env.c: Initialize nobug_limits[] as array of anonymous structures.
Peter Simons [Sat, 28 Jul 2007 11:26:44 +0000 (13:26 +0200)]
nobug_env.c: Initialize nobug_limits[] as array of anonymous structures.

12 years agonobug.h: Take advantage of ACX_PTHREAD.
Peter Simons [Sat, 28 Jul 2007 11:26:27 +0000 (13:26 +0200)]
nobug.h: Take advantage of ACX_PTHREAD.

The newly added Autoconf macro defines HAVE_PTHREAD instead of HAVE_PTHREAD_H.
Also, corrected use of  syslog's LOG_ERR symbol.

12 years agoconfigure.ac, acinclude.m4: Use ACX_PTHREAD to detect thread support.
Peter Simons [Sat, 28 Jul 2007 11:24:36 +0000 (13:24 +0200)]
configure.ac, acinclude.m4: Use ACX_PTHREAD to detect thread support.

12 years agoINSTALL: Updated by automake 1.10.
Peter Simons [Sat, 28 Jul 2007 11:23:26 +0000 (13:23 +0200)]
INSTALL: Updated by automake 1.10.

13 years agoshorten message
Christian Thaeter [Fri, 6 Jul 2007 06:50:18 +0000 (08:50 +0200)]
shorten message

13 years agofixed deadlock detector, report offening other lock now
Christian Thaeter [Fri, 6 Jul 2007 06:43:07 +0000 (08:43 +0200)]
fixed deadlock detector, report offening other lock now

13 years agoversion bump 0.3pre1
Christian Thaeter [Wed, 4 Jul 2007 17:53:59 +0000 (19:53 +0200)]
version bump 0.3pre1

13 years agometa update for 0.3pre1 snapshot_0.3pre1
Christian Thaeter [Wed, 4 Jul 2007 12:03:35 +0000 (14:03 +0200)]
meta update for 0.3pre1

13 years agotest code for the deadlock checker, not complete
Christian Thaeter [Sat, 16 Jun 2007 22:21:33 +0000 (00:21 +0200)]
test code for the deadlock checker, not complete

13 years agocosmetics
Christian Thaeter [Sat, 16 Jun 2007 22:20:59 +0000 (00:20 +0200)]
cosmetics

13 years agodeadlock checker, fixed implementation
Christian Thaeter [Sat, 16 Jun 2007 22:20:16 +0000 (00:20 +0200)]
deadlock checker, fixed implementation

13 years agodeadlock checker basic implementation, not yet integrated
Christian Thaeter [Tue, 5 Jun 2007 04:11:24 +0000 (06:11 +0200)]
deadlock checker basic implementation, not yet integrated

13 years agostart of lock checker in C
Christian Thaeter [Fri, 1 Jun 2007 01:04:20 +0000 (03:04 +0200)]
start of lock checker in C

13 years ago#ifdef should be #if
Christian Thaeter [Fri, 1 Jun 2007 00:46:41 +0000 (02:46 +0200)]
#ifdef should be #if

13 years agouse a struct to accumulate nobug thread local storage, already with members for lock...
Christian Thaeter [Fri, 1 Jun 2007 00:40:46 +0000 (02:40 +0200)]
use a struct to accumulate nobug thread local storage, already with members for lock checking

13 years agoremoved nobuglockalyzer, lock checking will be done in at runtime
Christian Thaeter [Fri, 1 Jun 2007 00:38:59 +0000 (02:38 +0200)]
removed nobuglockalyzer, lock checking will be done in at runtime

13 years agoupdated diagram
Christian Thaeter [Mon, 28 May 2007 23:28:41 +0000 (01:28 +0200)]
updated diagram

13 years agostart of a script analyzing debug logs for locking inconsistencies and deadlock causes
Christian Thaeter [Mon, 28 May 2007 23:28:03 +0000 (01:28 +0200)]
start of a script analyzing debug logs for locking inconsistencies and deadlock causes

13 years agomore consistent log formatting, always use ': ' as field delimiter
Christian Thaeter [Mon, 28 May 2007 23:26:09 +0000 (01:26 +0200)]
more consistent log formatting, always use ': ' as field delimiter

13 years agoadd an optional PARENT to log control flags
Christian Thaeter [Sat, 19 May 2007 18:38:10 +0000 (20:38 +0200)]
add an optional PARENT to log control flags

Flags can now be defined with a pointer to another flag which serves defaults.
With this it is possible to build flag hierachies/groups leading in much easier logging control

13 years agofinal 0.2 release release_0.2
Christian Thaeter [Thu, 31 May 2007 20:24:14 +0000 (22:24 +0200)]
final 0.2 release

13 years agolittle cleanup
Christian Thaeter [Thu, 31 May 2007 19:58:37 +0000 (21:58 +0200)]
little cleanup

13 years agomaking the string members of the resource registry non-const was stupid
Christian Thaeter [Mon, 21 May 2007 11:59:50 +0000 (13:59 +0200)]
making the string members of the resource registry non-const was stupid

13 years agolet the resource tracker log before doing actions
Christian Thaeter [Sun, 20 May 2007 06:57:02 +0000 (08:57 +0200)]
let the resource tracker log before doing actions

13 years agofix some stupid bugs release_0.2rc1
Christian Thaeter [Wed, 16 May 2007 13:18:27 +0000 (15:18 +0200)]
fix some stupid bugs

13 years agometa update for the 0.2rc1 release
Christian Thaeter [Wed, 16 May 2007 11:51:31 +0000 (13:51 +0200)]
meta update for the 0.2rc1 release

13 years agocleanup remove disabled gdb stuff
Christian Thaeter [Wed, 16 May 2007 09:14:36 +0000 (11:14 +0200)]
cleanup remove disabled gdb stuff

13 years agoadd logging by flags to the resource registry, better formatted log messages,
Christian Thaeter [Wed, 16 May 2007 09:09:37 +0000 (11:09 +0200)]
add logging by flags to the resource registry, better formatted log messages,

13 years agolocks are not needed for thread_id_set, they are rather a deadlocking bug
Christian Thaeter [Fri, 11 May 2007 22:41:21 +0000 (00:41 +0200)]
locks are not needed for thread_id_set, they are rather a deadlocking bug

13 years agowaiting for a RECURSIVE resource we already own is a no-op
Christian Thaeter [Fri, 11 May 2007 06:14:27 +0000 (08:14 +0200)]
waiting for a RECURSIVE resource we already own is a no-op

13 years agofix RESOURCE_LEAVE_LOOKUP to take only 2 parameters
Christian Thaeter [Fri, 11 May 2007 05:38:17 +0000 (07:38 +0200)]
fix RESOURCE_LEAVE_LOOKUP to take only 2 parameters

13 years agofix state array access in RESOURCE_LEAVE_LOOKUP
Christian Thaeter [Thu, 10 May 2007 03:17:57 +0000 (05:17 +0200)]
fix state array access in RESOURCE_LEAVE_LOOKUP

13 years agoimprove makefile meta generation, preparation for 0.2rc1 release
Christian Thaeter [Thu, 10 May 2007 02:45:23 +0000 (04:45 +0200)]
improve makefile meta generation, preparation for 0.2rc1 release

13 years agotest fix
Christian Thaeter [Thu, 10 May 2007 02:44:18 +0000 (04:44 +0200)]
test fix

13 years agoadd resource state diagram
Christian Thaeter [Thu, 10 May 2007 00:46:15 +0000 (02:46 +0200)]
add resource state diagram

13 years agocounter should only be initialized to 0 when state == WAITING
Christian Thaeter [Wed, 9 May 2007 20:24:08 +0000 (22:24 +0200)]
counter should only be initialized to 0 when state == WAITING

13 years agouse object_id and a thread_id to identify resources
Christian Thaeter [Wed, 9 May 2007 20:23:14 +0000 (22:23 +0200)]
use object_id and a thread_id to identify resources

13 years agonew resource state handling, WAITING, RECURSIVE and EXCLUSIVE
Christian Thaeter [Mon, 7 May 2007 04:27:45 +0000 (06:27 +0200)]
new resource state handling, WAITING, RECURSIVE and EXCLUSIVE

13 years agofill NOBUG_LOCATION only in ALPHA and BETA builds and resolve to a empty string in...
Christian Thaeter [Wed, 25 Apr 2007 03:14:05 +0000 (05:14 +0200)]
fill NOBUG_LOCATION only in ALPHA and BETA builds and resolve to a empty string in RELEASE builds

13 years agofixed INIT_FLAG_LIMIT, old version was still around
Christian Thaeter [Wed, 25 Apr 2007 01:25:56 +0000 (03:25 +0200)]
fixed INIT_FLAG_LIMIT, old version was still around

13 years agorename CPPINIT to CPP_DEFINE, make it conditionally only available in C++ compilers
Christian Thaeter [Wed, 25 Apr 2007 01:19:16 +0000 (03:19 +0200)]
rename CPPINIT to CPP_DEFINE, make it conditionally only available in C++ compilers

13 years agomust call INIT before first TRACE
Christian Thaeter [Tue, 24 Apr 2007 02:21:07 +0000 (04:21 +0200)]
must call INIT before first TRACE

13 years agoadd CPPINIT_FLAG macros to ease flag initialization from C++ programs
Christian Thaeter [Tue, 24 Apr 2007 02:20:47 +0000 (04:20 +0200)]
add CPPINIT_FLAG macros to ease flag initialization from C++ programs

13 years agofix DUMP and INVARIANT calls with new LOCATION_ARGS
Christian Thaeter [Tue, 24 Apr 2007 02:17:56 +0000 (04:17 +0200)]
fix DUMP and INVARIANT calls with new LOCATION_ARGS

13 years agojust __func__ suffices
Christian Thaeter [Sun, 22 Apr 2007 08:16:35 +0000 (10:16 +0200)]
just __func__ suffices

13 years agorename LOCATION macros
Christian Thaeter [Sun, 22 Apr 2007 08:14:58 +0000 (10:14 +0200)]
rename LOCATION macros

13 years agoadd build/ dir to gitignore
Christian Thaeter [Sun, 22 Apr 2007 07:50:29 +0000 (09:50 +0200)]
add build/ dir to gitignore

13 years agoabstract source location information into a file/line/function tuple
Christian Thaeter [Sun, 22 Apr 2007 05:29:10 +0000 (07:29 +0200)]
abstract source location information into a file/line/function tuple

13 years agouse only the id (void*) for identifying resources, name, type become optional
Christian Thaeter [Mon, 2 Apr 2007 17:02:26 +0000 (19:02 +0200)]
use only the id (void*) for identifying resources, name, type become optional

13 years agodump list of resources only
Christian Thaeter [Mon, 2 Apr 2007 14:40:45 +0000 (16:40 +0200)]
dump list of resources only

13 years agofallback to stderr when console target is not yet set
Christian Thaeter [Mon, 2 Apr 2007 14:40:14 +0000 (16:40 +0200)]
fallback to stderr when console target is not yet set

13 years agoadd a void* to resource tracker records which are useable as dynamic identifier ...
Christian Thaeter [Sun, 1 Apr 2007 16:16:27 +0000 (18:16 +0200)]
add a void* to resource tracker records which are useable as dynamic identifier (type/name have to be static), make name optional for resource records

13 years agosimplify and fix default ringbuffer handling
Christian Thaeter [Sat, 31 Mar 2007 17:01:39 +0000 (19:01 +0200)]
simplify and fix default ringbuffer handling

13 years agoadd extern "C" for C++ programs
Christian Thaeter [Sat, 31 Mar 2007 00:25:49 +0000 (02:25 +0200)]
add extern "C" for C++ programs

13 years agoadd RESOURCE_LEAVE_LOOKUP which does not need a handle to the holder resource_registry_signature
Christian Thaeter [Fri, 30 Mar 2007 23:58:47 +0000 (01:58 +0200)]
add RESOURCE_LEAVE_LOOKUP which does not need a handle to the holder

13 years agoadd tree parameter to resource_find
Christian Thaeter [Fri, 30 Mar 2007 23:57:39 +0000 (01:57 +0200)]
add tree parameter to resource_find