Fix: race conditions in RESOURCE_ENTER/STATE/LEAVE (API Change!)
commit66928488c40c0d5cd341c3952bee00509949b72b
authorChristian Thaeter <ct@pipapo.org>
Thu, 17 Dec 2009 00:27:09 +0000 (17 01:27 +0100)
committerChristian Thaeter <ct@pipapo.org>
Thu, 17 Dec 2009 00:27:09 +0000 (17 01:27 +0100)
tree0e02f8801f3c1cb727b274850e3504780a7f6cca
parent575fcae6558bc046043076b6b5dfa13141abc29c
Fix: race conditions in RESOURCE_ENTER/STATE/LEAVE (API Change!)

* RESOURCE_ENTER/STATE/LEAVE become Statement heads now and protect the
  user supplied statement with the resource_mutex. This makes resource
  transitions atomic.

* moved all locking into the macros

* refined example code
Makefile.am
doc/resourceexample.txt
src/nobug.h
src/nobug_resources.c
tests/test_nobug_resources_threaded.c