Commit graph

50 commits

Author SHA1 Message Date
Michael Ploujnikov
12a2eed583 fix variable names in the LUMIERA_RECCONDITION_SECTION_CHAIN macro (seems like a copy+paste error from recmutex.h) 2009-12-29 16:52:39 -05:00
Michael Ploujnikov
52e9259e8b this was replaced with tests/backend/test-threadpool.c 2009-11-26 11:15:31 -05:00
Michael Ploujnikov
00eb4eda46 partial code skeleton 2009-11-26 10:24:17 -05:00
Christian Thaeter
f73cc47da6 Fix all things which broke compilation with NoBug 200909.1 2009-09-04 08:53:03 +02:00
Christian Thaeter
58f1fbe3a8 mpool: completion
fix tests, add some benchmarks
finished documentation, cosmetics, cleanup
2009-06-04 18:11:45 +02:00
Christian Thaeter
2a9d59ccd0 WIP: pooled allocator, initial version
* creating and allocating, freeing elements
 * live objects will be destructed when a mpool gets destroyed and a
   destructor was set up
2009-06-04 18:10:25 +02:00
Christian Thaeter
062dbfe82f Merge commit '99b5f8'
* commit '99b5f8':
  adapt the Sync template
  Add reccondition to threads, make its functionality complete
  fix some includes for new mutex/recmutex headers
  weed out reccondition bugs/typos
  New condition and reccondition implementation
  split mutex.h again into mutex.h and recmutex.h
  typo fix in mutex.h
  rename casing of RecMutex to Recmutex to be consistent
  store lumiera_rwlock in sectionlock
  store a lumiera_mutex in a sectionlock, looks cleaner
  add check to chained locking validating that the parent lock is held
  rwlock makeover, locksections etc...
  error code changed to LOCK_DESTROY
  fix: forgotten backcasts in mutex.h
  new mutex and recmutex implementation (breaks sync.hpp for now)
2009-06-03 20:20:41 +02:00
Christian Thaeter
dd9b7a174f Add reccondition to threads, make its functionality complete
With this the threads are now usable, despite still a mockup
implementation.

Some basic tests to show their use included.
2009-06-03 18:22:11 +02:00
Christian Thaeter
d91620a60f New condition and reccondition implementation
Should be working but not thoroughly tested still, docs not complete
2009-06-03 18:22:10 +02:00
Christian Thaeter
4f29f302b2 split mutex.h again into mutex.h and recmutex.h 2009-06-03 18:22:10 +02:00
Christian Thaeter
5c2ac96f35 rwlock makeover, locksections etc...
The CHAINED variant is not tested, what could go wrong anyways :)
2009-06-03 18:22:08 +02:00
Christian Thaeter
a115759128 new mutex and recmutex implementation (breaks sync.hpp for now)
prepares that chained sections if different kinds can be mixed
makes recmutexes typesafe
improves nobug tracking
2009-06-03 18:22:07 +02:00
Anton Yakovlev
87e528bd58 Cyclic L1-list. Implements almost the same set of operations as for L2-list
(except those, which reverse enumeration of elements).
2009-06-03 18:12:35 +04:00
Christian Thaeter
d37bb17566 Add a context string to the error system
lumiera_error_set() now takes an optional extra string which can be used
to pass context relevant data along. This string gets copied into the
error state so one can easily create it by the tmpbuf_snprintf() facility.

Also a lot of places which define errors get fixed according to this.
2009-01-13 21:23:37 +01:00
e921b1658c error.hpp belongs to src/lib 2008-12-27 00:53:35 +01:00
cbbc298fe9 kill some warnings 2008-12-26 23:17:51 +01:00
Christian Thaeter
c9d83d97c3 Moved the resourcecollector from backend to lib 2008-12-24 00:26:32 +01:00
Christian Thaeter
0342e19c12 move the interfaces test to backend, because its going to be stateful 2008-10-15 16:04:32 +02:00
Christian Thaeter
caa5bd10a0 interface update
* remove the data member from the interface structure
 * add a psplay node used in a upcoming interface registry
 * add a INLINE function mapper
2008-10-15 16:01:08 +02:00
Christian Thaeter
feb9ba7db9 provide some example code for the 'interface' system
* test-interfaces.c is just a mockup to show how interfaces are created
 * fix some bugs introduced with a futile refactoring try at the last commit
2008-10-15 16:01:08 +02:00
Christian Thaeter
ed246ab222 Adding recursive mutexes, fix chained mutex to take only one parameter
Recursive mutex can be locked multiple times by a single thread they
are initialitzed by lumiera_recmutex_init() and used by LUMIERA_RECMUTEX_*
macros.

Chained mutex use the mutexacquirer from the outer scope now. Maybe its
later needed to pass acquirers explicit, we will see.
2008-10-15 15:49:35 +02:00
Nicholas Sinnott-Armstrong
7d86367909 Added preliminary support for chained mutex calls. 2008-10-15 15:49:35 +02:00
Christian Thaeter
115620fbb5 FIX: luid tests, forgotten to rename uuid to luid 2008-09-07 03:41:37 +02:00
Christian Thaeter
c4e6cd3c51 Merge branch 'configloader_devel' of git://git.lumiera.org/lumiera/simeon into backend_devel
* 'configloader_devel' of git://git.lumiera.org/lumiera/simeon: (24 commits)
  Added directive-parser and tests for a content-check of a parsed configitem
  Fixed configitem_move, first parsing tests pass now
  FIX: Remove llist_move again and put a note to list_relocate, add test
  WIP: add config_lookup skeleton
  filedescriptor fixup for new copy func in cuckoo
  add a custom copy function to the cuckoo hash
  fixes after the cuckoo update in filedescriptor.c
  Cuckoo hash update
  Added two very simple tests for configitem
  Typo fix
  Fix for section-parser
  added section part to parser
  parser improvements, compiles now
  added CONFIG_SYNTAX errors
  typo fix and redundant comment removal
  add configitem and configentry to the build system
  give the charsets for config keys some constants
  fix to make parser mockup compileable, little simplified
  WIP: started low-level parser
  more functional mockup of the configitem bootstrap
  ...

Conflicts:

	src/backend/config.c
	src/backend/config.h
	src/backend/config_lookup.c
	src/backend/config_lookup.h
	src/backend/configitem.c
	src/backend/configitem.h
	src/backend/filedescriptor.c
	src/lib/cuckoo.c
	src/lib/cuckoo.h
	tests/22config_highlevel.tests
	tests/backend/test-config.c
2008-09-06 13:18:29 +02:00
Christian Thaeter
bc055ab803 Probabilistic Splay Tree implementation
Generalized an older implementation I already had, the splay formulas need
some improvements. Documentation comes next.
2008-09-06 12:22:43 +02:00
Christian Thaeter
e2b7561c76 FIX: put a note to list_relocate, add test
There was a fatal thinko, llist_relocate NUST NOT be called on a empty
list, the pointers will just point to invaildated memory. This cant be
handled by the llist code. The programmer is responsible to take proper
actions.
2008-09-06 12:07:38 +02:00
Christian Thaeter
6c34fc63f1 Move the resource announce/forget into the rwlock init/destroy 2008-09-06 12:07:38 +02:00
Christian Thaeter
2f776858ee FIX: Remove llist_move again and put a note to list_relocate, add test
There was a fatal thinko, llist_relocate NUST NOT be called on a empty
list, the pointers will just point to invaildated memory. This cant be
handled by the llist code. The programmer is responsible to take proper
actions.
2008-08-13 09:21:33 +02:00
Simeon Voelkel
bd2cc4a026 Typo fix 2008-08-13 08:34:44 +02:00
Christian Thaeter
32c1546ec1 Move the resource announce/forget into the rwlock init/destroy 2008-08-10 12:27:47 +02:00
Christian Thaeter
0bd886249b throw away the 'references' implementation, we probably don't need it
(could be reincarnated someday later when we find out that we need it)
2008-08-10 12:19:50 +02:00
Christian Thaeter
dde54ec7b0 Adapt the condition implementation to the macro SECTION based approach 2008-08-10 12:19:50 +02:00
Christian Thaeter
d8f59fb722 Simplyfiy resource management
Move the resource announce/forget into the rwlock init/destroy
Move resource announcement/forget into the mutex init/destroy
2008-08-10 12:19:09 +02:00
Christian Thaeter
c11915a4c4 new locking section macros for RWLocks, old acquirer bites the dust 2008-08-10 12:19:09 +02:00
Christian Thaeter
777458741a moved the locking tests from test/locking/ to test/library/ 2008-08-10 12:19:09 +02:00
Christian Thaeter
f5df65b0a1 add a translation function to tmpbuf
tmpbuf_tr takes an input string and 2 sets of characters plus a
default character. It produces a output string with all
characters from the first set translated to the correspondending
character in the 2nd set, similar to the shell 'tr' util.
2008-08-10 12:19:08 +02:00
Christian Thaeter
9826fd180d renamed the uuid to luid
uuid's are somewhat standardized, we use our uid's slightly differently,
so change the name not to be confused with standards.
 * Small fix for luid generation
 * build a 'luidgen' tool which will be used by the interface gen later
 * add emacs vars
 * include the luidgen tool in automake
2008-08-10 12:18:20 +02:00
Christian Thaeter
2a1d6c6232 Fix: safeclib-test 2008-05-13 21:43:08 +02:00
Christian Thaeter
a9cf2c719d Fix: uuid includes 2008-05-13 21:42:51 +02:00
Christian Thaeter
ecd6ba66b8 safeclib testsuite 2008-05-13 20:57:19 +02:00
Christian Thaeter
646d6fa0d3 Test simplification, plaything
* test.h provides some macros to aid test writing
 * applied that to some tests
2008-05-13 20:57:18 +02:00
Christian Thaeter
0b8b5bf507 uuid functions 2008-05-13 20:54:05 +02:00
c29b6bdd9a fix include for testsuite
(note I did a partial merge and didn't take any of the new sourcefiles,
so probably this is already fixed on cehtehs branch backend)
2008-04-12 03:09:28 +02:00
Christian Thaeter
15bab21da8 Merged the timestuff removal, done by simeon
(cherry picked from commit bc5a301d01ac323bafcc434e33f6043678749f14)
2008-04-12 01:12:18 +02:00
e737b9ef1b Lumiera renaming -- source code 2008-03-10 06:09:44 +01:00
0baf15ca94 Cinelerra-3 renamed to Lumiera -- copyright and documentation 2008-03-10 04:25:03 +01:00
7aca8cdf86 fix test-references 2007-11-27 00:52:26 +01:00
Christian Thaeter
ba716dbda4 better smart references, still raw meat 2007-09-19 07:01:12 +02:00
Christian Thaeter
65ce98c87d enough lists tests for basic functionality, more are added as needed 2007-09-05 22:59:01 +02:00
Christian Thaeter
2aaad10bbd fixed typos and added some basic tests for the llist.h 2007-09-05 07:07:52 +02:00