]> mj.ucw.cz Git - libucw.git/log
libucw.git
12 years agoUCW::CGI: Implemented UTF-8 mode (compatible with `use utf8')
Martin Mares [Sun, 31 Jul 2011 12:55:17 +0000 (14:55 +0200)]
UCW::CGI: Implemented UTF-8 mode (compatible with `use utf8')

12 years agoMerge branch 'dev-mainloop'
Martin Mares [Sun, 31 Jul 2011 12:44:25 +0000 (14:44 +0200)]
Merge branch 'dev-mainloop'

12 years agoMain recio: Constants seem to be OK, deleted FIXME
Martin Mares [Sun, 31 Jul 2011 12:42:59 +0000 (14:42 +0200)]
Main recio: Constants seem to be OK, deleted FIXME

13 years agoMain: Introduce functions for telling whether an object is active
Martin Mares [Thu, 9 Jun 2011 16:16:33 +0000 (18:16 +0200)]
Main: Introduce functions for telling whether an object is active

This is an useful idiom and it helps avoid calling clist_is_linked()
on private parts of the objects.

13 years agoMain recio: Allow rec_io_(start|stop)_read from the read_handler
Martin Mares [Thu, 9 Jun 2011 16:04:26 +0000 (18:04 +0200)]
Main recio: Allow rec_io_(start|stop)_read from the read_handler

This involves rescanning the read buffer on rec_io_start_read()
as there might be leftover data from previous invokations of the
read_handler.

However, we have to be careful to avoid arbitrarily deep recursion
of various handlers. We do that by deferring the actual start of
reading to a main_hook.

13 years agoMain: Moved hooks before recio
Martin Mares [Thu, 9 Jun 2011 15:15:08 +0000 (17:15 +0200)]
Main: Moved hooks before recio

13 years agoMain record-based I/O: documentation
Martin Mares [Thu, 9 Jun 2011 15:12:22 +0000 (17:12 +0200)]
Main record-based I/O: documentation

13 years agoMain record-based I/O: allow freeing of recio from read handlers
Martin Mares [Thu, 9 Jun 2011 14:51:15 +0000 (16:51 +0200)]
Main record-based I/O: allow freeing of recio from read handlers

13 years agoRemoved invalid usage on .NOTPARALLEL keyword in makefiles.
Pavel Charvat [Mon, 6 Jun 2011 08:49:31 +0000 (10:49 +0200)]
Removed invalid usage on .NOTPARALLEL keyword in makefiles.

13 years agoWhitespace cleanup.
Pavel Charvat [Wed, 18 May 2011 09:46:18 +0000 (11:46 +0200)]
Whitespace cleanup.

13 years agoMain record I/O: Flow control and a few bits of documentation
Martin Mares [Sun, 1 May 2011 23:49:59 +0000 (01:49 +0200)]
Main record I/O: Flow control and a few bits of documentation

13 years agoMain: Preliminary implementation of record-based I/O
Martin Mares [Sun, 1 May 2011 23:23:42 +0000 (01:23 +0200)]
Main: Preliminary implementation of record-based I/O

13 years agoDocs: Let eltpool and mempool refer to the corresponding resource functions
Martin Mares [Tue, 19 Apr 2011 13:55:41 +0000 (15:55 +0200)]
Docs: Let eltpool and mempool refer to the corresponding resource functions

13 years agoResources: Renamed respool.* -> resource.*
Martin Mares [Tue, 19 Apr 2011 13:47:34 +0000 (15:47 +0200)]
Resources: Renamed respool.* -> resource.*

13 years agoDoc: Note that gary.h is undocumented
Martin Mares [Tue, 19 Apr 2011 13:44:14 +0000 (15:44 +0200)]
Doc: Note that gary.h is undocumented

13 years agoResources: Added eltpool class
Martin Mares [Tue, 19 Apr 2011 13:42:58 +0000 (15:42 +0200)]
Resources: Added eltpool class

13 years agoEltpool: Fixed a doc typo
Martin Mares [Tue, 19 Apr 2011 13:42:41 +0000 (15:42 +0200)]
Eltpool: Fixed a doc typo

13 years agoResources: Added mempool class
Martin Mares [Tue, 19 Apr 2011 13:39:13 +0000 (15:39 +0200)]
Resources: Added mempool class

13 years agoFastbufs: More exceptions
Martin Mares [Tue, 19 Apr 2011 13:29:58 +0000 (15:29 +0200)]
Fastbufs: More exceptions

13 years agoTrans: Document which modules have to be resourcified
Martin Mares [Tue, 19 Apr 2011 13:20:21 +0000 (15:20 +0200)]
Trans: Document which modules have to be resourcified

13 years agoResources: res_new() requires an active pool
Martin Mares [Tue, 19 Apr 2011 13:16:33 +0000 (15:16 +0200)]
Resources: res_new() requires an active pool

The old behavior of returning NULL if called without an active pool
caused more fuss than it saved.

13 years agoTrans: Documented naming of exceptions
Martin Mares [Tue, 19 Apr 2011 13:14:24 +0000 (15:14 +0200)]
Trans: Documented naming of exceptions

13 years agoFastbufs: Clean up exception handling
Martin Mares [Tue, 19 Apr 2011 13:07:15 +0000 (15:07 +0200)]
Fastbufs: Clean up exception handling

All exceptions now reside in the "ucw.fb" namespace, bthrow() takes
care of adding this prefix.

"ucw.fb.eof" is used systematically, even at places when a read error
was reported previously.

Exceptions have been documented.

13 years agoFastbufs are not tied to resources automatically any longer
Martin Mares [Tue, 19 Apr 2011 12:46:26 +0000 (14:46 +0200)]
Fastbufs are not tied to resources automatically any longer

Explicit tying by fb_tie() should be used instead.

13 years agoResources: Allow res_free(NULL) and res_detach(NULL)
Martin Mares [Tue, 19 Apr 2011 12:44:46 +0000 (14:44 +0200)]
Resources: Allow res_free(NULL) and res_detach(NULL)

13 years agoTrans: trans_commit() calls rp_commit()
Martin Mares [Tue, 19 Apr 2011 12:34:44 +0000 (14:34 +0200)]
Trans: trans_commit() calls rp_commit()

13 years agoResources: Document that resource class callbacks are optional
Martin Mares [Tue, 19 Apr 2011 12:33:17 +0000 (14:33 +0200)]
Resources: Document that resource class callbacks are optional

13 years agoImplemented temporary resources
Martin Mares [Tue, 19 Apr 2011 12:32:05 +0000 (14:32 +0200)]
Implemented temporary resources

13 years agoDocumented ucw/string.h.
Martin Mares [Mon, 18 Apr 2011 21:05:21 +0000 (23:05 +0200)]
Documented ucw/string.h.

13 years agoAdded string functions for matching of prefixes and suffixes
Martin Mares [Mon, 18 Apr 2011 20:48:21 +0000 (22:48 +0200)]
Added string functions for matching of prefixes and suffixes

13 years agofb-grow: Updated documentation, so that our doc tools can digest it
Martin Mares [Mon, 18 Apr 2011 19:51:06 +0000 (21:51 +0200)]
fb-grow: Updated documentation, so that our doc tools can digest it

13 years agofb-grow: Fixed a stupid typo.
Pavel Charvat [Mon, 18 Apr 2011 13:08:37 +0000 (15:08 +0200)]
fb-grow: Fixed a stupid typo.

13 years agofb-grow: Renamed fbgrow_read_all() to fbgrow_get_buf().
Pavel Charvat [Mon, 18 Apr 2011 12:51:15 +0000 (14:51 +0200)]
fb-grow: Renamed fbgrow_read_all() to fbgrow_get_buf().

13 years agofb-grow: Added a function to read the whole buffer anytime.
Pavel Charvat [Mon, 18 Apr 2011 11:34:08 +0000 (13:34 +0200)]
fb-grow: Added a function to read the whole buffer anytime.

13 years agoTrans: more documentation
Martin Mares [Sun, 17 Apr 2011 19:00:33 +0000 (21:00 +0200)]
Trans: more documentation

13 years agoResource pools documented
Martin Mares [Sun, 17 Apr 2011 18:38:26 +0000 (20:38 +0200)]
Resource pools documented

13 years agoTrans: Fixed a couple of bugs in the previous commit
Martin Mares [Sun, 17 Apr 2011 17:24:04 +0000 (19:24 +0200)]
Trans: Fixed a couple of bugs in the previous commit

13 years agoTrans: New semantics of exceptions
Martin Mares [Sun, 17 Apr 2011 17:06:54 +0000 (19:06 +0200)]
Trans: New semantics of exceptions

Changed exception propagation rules according to the new semantics
documented in ucw/doc/trans.txt, which is based on transaction folding.

We avoid the (partially implemented) exception pool altogether, all
exceptions are just allocated from the pool of the current transaction,
and clever re-throwing rules make the pools last as long as they should.

Also, the current exception is kept track of in the current transaction
instead of the thread context.

13 years agoTrans: First bits of documentation
Martin Mares [Sun, 17 Apr 2011 16:26:37 +0000 (18:26 +0200)]
Trans: First bits of documentation

I have tried to document the complete logic of transactions,
including memory management details. It is however still far from
a complete documentation and the AsciiDoc formatting is also somewhat
obscure at the moment.

13 years agoResources: Implemented subpools
Martin Mares [Sun, 17 Apr 2011 15:21:53 +0000 (17:21 +0200)]
Resources: Implemented subpools

I also had to extend the pool/resource dumping functions, so that
they can print complex structures. All functions pass the amount
of indent to apply and the resource->dump callback is expected
to include a `\n' after its output.

13 years agoTrans: trans_open_rp() removed
Martin Mares [Sun, 17 Apr 2011 15:16:38 +0000 (17:16 +0200)]
Trans: trans_open_rp() removed

It did never make much sense, since the resource pool is automatically
destroyed when the transaction is over.

13 years agoResources: Simplified use of fb_tie()
Martin Mares [Sun, 17 Apr 2011 11:15:12 +0000 (13:15 +0200)]
Resources: Simplified use of fb_tie()

13 years agoResource pools: use LIKE_MALLOC attribute
Martin Mares [Sun, 17 Apr 2011 10:58:00 +0000 (12:58 +0200)]
Resource pools: use LIKE_MALLOC attribute

13 years agoAutomatic tests can't run in parallel.
Pavel Charvat [Tue, 29 Mar 2011 13:54:56 +0000 (15:54 +0200)]
Automatic tests can't run in parallel.

13 years ago* Fixed several bugs in fastbufs. * Implemented vdie(). * fb-grow can be allocated...
Pavel Charvat [Thu, 13 Nov 2008 14:21:44 +0000 (15:21 +0100)]
* Fixed several bugs in fastbufs. * Implemented vdie(). * fb-grow can be allocated from mempool... also added support for mixed R/W access

13 years agoFixes in fb-mmap.
Pavel Charvat [Wed, 29 Oct 2008 12:30:59 +0000 (13:30 +0100)]
Fixes in fb-mmap.

13 years agoFixed fb-atomic.
Pavel Charvat [Wed, 29 Oct 2008 12:21:57 +0000 (13:21 +0100)]
Fixed fb-atomic.

13 years agoImplemented first bits of transactions on fastbufs.
Pavel Charvat [Wed, 29 Oct 2008 12:10:19 +0000 (13:10 +0100)]
Implemented first bits of transactions on fastbufs.

13 years agoImplemented trans_vthrow().
Pavel Charvat [Wed, 3 Sep 2008 13:14:19 +0000 (15:14 +0200)]
Implemented trans_vthrow().

13 years agoImplemented exceptions.
Martin Mares [Wed, 3 Sep 2008 11:27:10 +0000 (13:27 +0200)]
Implemented exceptions.

13 years agoFirst rough implementation of transactions (no exceptions yet).
Martin Mares [Tue, 2 Sep 2008 21:17:53 +0000 (23:17 +0200)]
First rough implementation of transactions (no exceptions yet).

13 years agoAdded res_detach().
Martin Mares [Tue, 2 Sep 2008 21:17:33 +0000 (23:17 +0200)]
Added res_detach().

13 years agores_malloc() fails if there is no respool active.
Martin Mares [Tue, 2 Sep 2008 21:16:49 +0000 (23:16 +0200)]
res_malloc() fails if there is no respool active.

13 years agoWhitespace fixes.
Martin Mares [Tue, 2 Sep 2008 20:07:36 +0000 (22:07 +0200)]
Whitespace fixes.

13 years agoAutomatic tying of fastbufs to resources.
Martin Mares [Tue, 2 Sep 2008 20:07:18 +0000 (22:07 +0200)]
Automatic tying of fastbufs to resources.

13 years agoResources for file descriptors and memory blocks.
Martin Mares [Tue, 2 Sep 2008 20:06:58 +0000 (22:06 +0200)]
Resources for file descriptors and memory blocks.

13 years agoMore work on resource pools.
Martin Mares [Mon, 1 Sep 2008 23:22:55 +0000 (01:22 +0200)]
More work on resource pools.

I really do not like that the respools use two different types of memory
allocation, but I really want them to be as efficient as possible inside
transactions and we do not have a good thread-local allocator yet.

13 years agoCleaned up thread context
Martin Mares [Mon, 1 Sep 2008 23:21:38 +0000 (01:21 +0200)]
Cleaned up thread context

13 years agoWe will need to remember the current transaction in per-thread data.
Martin Mares [Sat, 30 Aug 2008 17:25:21 +0000 (19:25 +0200)]
We will need to remember the current transaction in per-thread data.

13 years agoFirst bones of the transaction system's skeleton.
Martin Mares [Sat, 30 Aug 2008 17:24:59 +0000 (19:24 +0200)]
First bones of the transaction system's skeleton.

13 years agoMerge branch 'master' of ssh://git.ucw.cz/projects/libucw/GIT/libucw
Martin Mares [Tue, 29 Mar 2011 10:53:37 +0000 (12:53 +0200)]
Merge branch 'master' of ssh://git.ucw.cz/projects/libucw/GIT/libucw

13 years agolibucw: OFFSETOF returns an unsigned int again
Pavel Charvat [Wed, 10 Sep 2008 09:56:19 +0000 (11:56 +0200)]
libucw: OFFSETOF returns an unsigned int again

13 years agoucwlib: -- use offsetof() from C99
Pavel Charvat [Wed, 10 Sep 2008 09:27:32 +0000 (11:27 +0200)]
ucwlib: -- use offsetof() from C99

13 years agoUse size_t in xmalloc_zero.
Pavel Charvat [Wed, 3 Sep 2008 13:10:38 +0000 (15:10 +0200)]
Use size_t in xmalloc_zero.

13 years agoUse size_t in xmalloc() and xrealloc().
Martin Mares [Tue, 2 Sep 2008 20:09:44 +0000 (22:09 +0200)]
Use size_t in xmalloc() and xrealloc().

13 years agoFixed a typo in guard macro name.
Martin Mares [Sun, 31 Aug 2008 16:59:57 +0000 (18:59 +0200)]
Fixed a typo in guard macro name.

13 years agoredblack: Improved customization of memory allocator
Pavel Charvat [Wed, 9 Mar 2011 21:29:46 +0000 (22:29 +0100)]
redblack: Improved customization of memory allocator

13 years agoMain: Add main_step()
Martin Mares [Tue, 1 Mar 2011 13:07:51 +0000 (14:07 +0100)]
Main: Add main_step()

13 years agoMain: Allow main_loop() to be re-entered after shutdown
Martin Mares [Tue, 1 Mar 2011 12:59:26 +0000 (13:59 +0100)]
Main: Allow main_loop() to be re-entered after shutdown

13 years agoMerge branch 'dev-mainloop'
Martin Mares [Sun, 27 Feb 2011 12:13:18 +0000 (13:13 +0100)]
Merge branch 'dev-mainloop'

13 years agoMain: One more relnote
Martin Mares [Sun, 27 Feb 2011 12:12:42 +0000 (13:12 +0100)]
Main: One more relnote

13 years agoPreliminary release notes for LibUCW 4.1
Martin Mares [Sun, 27 Feb 2011 12:11:47 +0000 (13:11 +0100)]
Preliminary release notes for LibUCW 4.1

13 years agoMain: Updated documentation
Martin Mares [Sun, 27 Feb 2011 11:30:18 +0000 (12:30 +0100)]
Main: Updated documentation

13 years agoMain: file_recalc_list need not be empty upon main_destroy()
Martin Mares [Sun, 27 Feb 2011 10:57:13 +0000 (11:57 +0100)]
Main: file_recalc_list need not be empty upon main_destroy()

13 years agoMain: Separate debug functions for all types of objects
Martin Mares [Sun, 27 Feb 2011 10:54:35 +0000 (11:54 +0100)]
Main: Separate debug functions for all types of objects

13 years agoMain: Proofreading docs
Martin Mares [Sat, 26 Feb 2011 23:09:13 +0000 (00:09 +0100)]
Main: Proofreading docs

13 years agoMain: Let main-block use HOOK_RETRY / HOOK_IDLE as suggested by the docs
Martin Mares [Sat, 26 Feb 2011 22:51:53 +0000 (23:51 +0100)]
Main: Let main-block use HOOK_RETRY / HOOK_IDLE as suggested by the docs

13 years agoMain: Add block_io_set_timeout() as promised in the docs
Martin Mares [Sat, 26 Feb 2011 22:50:16 +0000 (23:50 +0100)]
Main: Add block_io_set_timeout() as promised in the docs

13 years agoMain: Renamed MFERR_xxx to BIO_ERR_xxx
Martin Mares [Sat, 26 Feb 2011 22:45:18 +0000 (23:45 +0100)]
Main: Renamed MFERR_xxx to BIO_ERR_xxx

13 years agoMain: Update documentation
Martin Mares [Sat, 26 Feb 2011 22:44:06 +0000 (23:44 +0100)]
Main: Update documentation

Needs proof-reading.

13 years agoMain: Added main_teardown() and main_destroy()
Martin Mares [Sat, 26 Feb 2011 11:11:16 +0000 (12:11 +0100)]
Main: Added main_teardown() and main_destroy()

There are now two possibilities how to get rid of a main loop
context. Either you call main_delete(), which is gentle and fails
whenever there are any active files/hooks/etc. Or you call main_destroy(),
which forcibly removes all such objects; it also closes all files.

main_teardown() just calls main_destroy() on the current context,
just as main_cleanup() calls main_delete().

Also, file_close_all() is no longer available -- the only known use
cases are after fork(), but closing files is no longer sufficient
there. All calls to file_close_all() should be therefore replaced
by main_teardown().

13 years agoMain: Internal operations on non-current contexts
Martin Mares [Sat, 26 Feb 2011 10:26:19 +0000 (11:26 +0100)]
Main: Internal operations on non-current contexts

Introduced an (internal) *_ctx() variant of several functions, working
on an explicit context which need not be current.

Changed main_delete(), so that it does not make the context temporarily
current.

13 years agoMain: Tests now include main_cleanup()
Martin Mares [Fri, 25 Feb 2011 23:32:21 +0000 (00:32 +0100)]
Main: Tests now include main_cleanup()

13 years agoMain: Plugged memory leaks of internal structures
Martin Mares [Fri, 25 Feb 2011 23:26:22 +0000 (00:26 +0100)]
Main: Plugged memory leaks of internal structures

13 years agoMain: main_delete() must make the soon-to-be-deleted context current
Martin Mares [Fri, 25 Feb 2011 23:23:25 +0000 (00:23 +0100)]
Main: main_delete() must make the soon-to-be-deleted context current

Otherwise, it might call signal_del() and file_del() on another
(or even undefined) context.

13 years agoMain: Moved testing code to a separate file
Martin Mares [Fri, 25 Feb 2011 18:33:59 +0000 (19:33 +0100)]
Main: Moved testing code to a separate file

13 years agoMain: Fixed a bug in looping over files that need not exist any longer
Martin Mares [Fri, 25 Feb 2011 18:14:15 +0000 (19:14 +0100)]
Main: Fixed a bug in looping over files that need not exist any longer

13 years agoMain: Update copyrights and remove debug dumps
Martin Mares [Fri, 25 Feb 2011 18:07:43 +0000 (19:07 +0100)]
Main: Update copyrights and remove debug dumps

13 years agolibcharset: Added missing picsuffix to libcharset.pc.
Pavel Charvat [Sun, 7 Nov 2010 23:04:06 +0000 (00:04 +0100)]
libcharset: Added missing picsuffix to libcharset.pc.

13 years agohashtable: Bugfix.
Pavel Charvat [Sun, 7 Nov 2010 18:41:03 +0000 (19:41 +0100)]
hashtable: Bugfix.

13 years agoSimplified stdupping of NULL strings.
Pavel Charvat [Sun, 7 Nov 2010 14:08:01 +0000 (15:08 +0100)]
Simplified stdupping of NULL strings.

13 years agohashtable: Updated docs.
Pavel Charvat [Sun, 7 Nov 2010 13:39:46 +0000 (14:39 +0100)]
hashtable: Updated docs.

13 years agohashtable: Corrections.
Pavel Charvat [Sun, 7 Nov 2010 12:10:58 +0000 (13:10 +0100)]
hashtable: Corrections.

13 years agohashtable: More options about memory management.
Pavel Charvat [Sun, 7 Nov 2010 12:00:50 +0000 (13:00 +0100)]
hashtable: More options about memory management.

13 years agohashtable: Documented HASH_TABLE_VARS.
Pavel Charvat [Sun, 7 Nov 2010 10:45:19 +0000 (11:45 +0100)]
hashtable: Documented HASH_TABLE_VARS.

13 years agohashtable: Implemented new HASH_TABLE_VARS parameter.
Pavel Charvat [Sun, 7 Nov 2010 10:42:25 +0000 (11:42 +0100)]
hashtable: Implemented new HASH_TABLE_VARS parameter.

13 years agohashtable: Only fixed whitespace.
Pavel Charvat [Sun, 7 Nov 2010 10:36:36 +0000 (11:36 +0100)]
hashtable: Only fixed whitespace.

13 years agoThreads: The master mutex was not initialized in some cases
Martin Mares [Mon, 1 Nov 2010 19:18:27 +0000 (20:18 +0100)]
Threads: The master mutex was not initialized in some cases

13 years agoMain: No more calls to GARY_SIZE on an empty timer array
Martin Mares [Fri, 8 Oct 2010 13:01:12 +0000 (15:01 +0200)]
Main: No more calls to GARY_SIZE on an empty timer array

13 years agoUCW::Configure::C: de-reference CPU_ARCH in COPT
Martin Mares [Thu, 7 Oct 2010 14:58:43 +0000 (16:58 +0200)]
UCW::Configure::C: de-reference CPU_ARCH in COPT

Originally, when CONFIG_EXACT_CPU was enabled, COPT contained `-march=$(CPU_ARCH)',
which worked when it was used in a Makefile, but not when doing a test
compile in the configure script.

I changed it to dereference the variable immediately.