]> mj.ucw.cz Git - libucw.git/blob - ucw/doc/relnotes.txt
Mempool: Fixed bug in mp_stats().
[libucw.git] / ucw / doc / relnotes.txt
1 Release notes
2 =============
3
4 6.0 (2014-01-28)
5 ----------------
6
7 * Libucw finally has a clean ABI, which does not pollute namespace, risking
8   collisions with other libraries. However, we did not want to abandon our
9   nicely and simply named functions, so the header files define macros,
10   which translate names of all externally visible symbols to start with `ucw_`.
11   If you don't like this, configure libucw with `CONFIG_UCW_CLEAN_ABI` turned off.
12 * All helper utilities are now installed with names starting with `ucw-` to
13   prevent collisions.
14 * The auxiliary libraries have been renamed to `libucw-charset`, `libucw-images`,
15   `libucw-xml`.
16 * A <<opt:,parser of command-line options>> has been added, similar in spirit to
17   our <<conf:,configuration file parser>>. The <<conf:getopt_h,getopt>> module
18   has been obsoleted
19 * `<stdbool.h>` is automatically included by `<ucw/lib.h>`.
20 * *Incompatible:* It turned out that almost all users of the <<gary:,growing array>>
21   module push/pop individual elements. Therefore, we have removed the second
22   argument (item count) of `GARY_PUSH` and `GARY_POP`. If you want to push/pop
23   multiple elements at once, use `GARY_PUSH_MULTI` and `GARY_POP_MULTI`.
24 * *Incompatible:* The interface of the <<heap:,heap>> module was cleaned up
25   to remove non-systematic side-effects. The `HEAP_INSERT` operation is now
26   a proper insert (previously, it was just cleanup after insertion performed
27   by the caller), similarly `HEAP_INCREASE` and `HEAP_DECREASE`. The `HEAP_DELMIN`
28   operation was renamed to `HEAP_DELETE_MIN`. New operations `HEAP_REPLACE` and
29   `HEAP_REPLACE_MIN` have been added. If you need to track positions of elements
30   in the heap, please check the notes at individual functions.
31 * <<alloc:,Generic allocators>> have been introduced, providing an abstract
32   way of memory allocation. <<gary:,Growing arrays>> are now based on such
33   allocators, which allows for example growing arrays in memory pools.
34 * The <<conf:,configuration file parser>> has been improved:
35 ** Multiple instances of the configuration parser are supported.
36 ** *Incompatible:* As there may be more instances, we can no longer use
37    global variables to control the configuration system. In particular,
38    `cf_need_journal` and `cf_pool` variables have been replaced by
39    functions <<conf:cf_set_journalling()>> and <<conf:cf_get_pool()>>.
40 ** *Incompatible:* Loading of configuration files has been decoupled from
41    the getopt wrapper, so you might need to include `conf.h` for functions
42    which were previously declared in `getopt.h`.
43 ** New functions have been added:
44    <<conf:cf_open_group()>>, <<conf:cf_close_group()>>, and <<conf:cf_revert()>>.
45 ** *Incompatible:* Dynamic configuration arrays have been re-implemented in
46    terms of our generic <<gary:,growing arrays>>. This makes them easier to
47    use and most of the interface has been preserved. The only exception is
48    static allocation via the DARY_ALLOC() macro, which is no longer available.
49 * <<daemon:,Daemon helpers>> have been added including a new `daemon-control`
50   utility. The old `daemon-helper` utility has been obsoleted and it is not
51   compiled by default.
52 * <<signal:,Signal helpers>> for translation between signal names and numbers
53   have been added.
54 * The fastbuf I/O layer received a new back-end <<fastbuf:fbmulti,fb_multi>>,
55   which concatenates several fastbuf streams to form a single virtual stream.
56 * *Incompatible:* The `UCW::CGI` Perl module has its custom error handlers
57   (which override default Perl error handlers) split off to a separate module
58   `UCW::CGI::ErrorHandler`.
59 * Added <<varint:,varint>> module for efficient UTF-8-like encoding of 64-bit
60   integers to byte sequences.
61
62 5.0 (2012-02-21)
63 ----------------
64
65 * *Incompatible:* The `timestamp_t` type has been decoupled from wall clock time.
66   It now specifies the number of milliseconds from an unspecified origin, so that
67   it can for example refer to the system monotonic clock. The `ucw_time_t` type
68   has been removed.
69
70 * The <<mainloop:,mainloop>> module has been rewritten:
71 ** Multiple instances of the main loop are supported (to be used in different
72    threads or locally within a library function).
73 ** The new implementation is more efficient: it uses heaps for timers,
74    epoll() for file descriptors (when available).
75 ** The return value of <<mainloop:struct_main_file,`main_file`>> handlers has been
76    changed to <<mainloop:enum_main_hook_return,`HOOK_IDLE`>> and <<mainloop:enum_main_hook_return,`HOOK_RETRY`>>.
77    However, the numerical values are equal, so old code should keep working.
78 ** *Incompatible:* The main loop time (`main_now`) has been decoupled from wall clock time
79    and moved to a field in the `main_context` structure. It can be accessed either directly
80    or via <<mainloop:main_get_now()>>. The `main_now_seconds` variable has
81    been removed, `main_idle_time` has become a structure field.
82 ** *Incompatible:* The interface for asynchronous reading and writing
83    (file_read() and friends) has been separated from the core of the main loop.
84    Use <<mainloop:struct_main_block_io,`struct main_block_io`>> and related functions instead.
85 ** *Incompatible:* file_close_all() is gone. You have to call <<mainloop:main_teardown()>>
86    or <<mainloop:main_destroy()>> to clean up properly after fork().
87 ** Added support for <<mainloop:signal,synchronous delivery of signals>>.
88 ** Added relative timers: <<mainloop:timer_add_rel()>>.
89 ** Modification of events from a running event handler is always safe.
90 ** Deleting an already deleted event is always safe.
91 ** For any event type, it is possible to ask whether it is active (added to the mainloop) or not: <<mainloop:hook_is_active()>> and friends.
92 ** A new mainloop front-end for asynchronous <<mainloop:recordio,record-based I/O>> has been added.
93
94 * Added support for <<trans:,resource pools and transactions>>, which is a general
95   mechanism for tracking resources and reporting errors. It is still considered
96   experimental, so the API can change in future releases.
97
98 * Added a <<gary:,growing array>> module `gary.h`, similar to `gbuf.h`, but with
99   a much more convenient interface.
100
101 * The <<lists:,Circular linked lists>> can recognize unlinked nodes,
102   see <<lists:clist_unlink()>>.
103
104 * Added `strtonum.h` -- a module for precise parsing of numbers.
105
106 * When compiled by a recent enough GCC, `__thread` is used for thread-local variables,
107   which is more efficient than the POSIX per-thread storage.
108 ** *Incompatible:* `ucwlib_context->thread_id` is no longer available directly,
109   please use <<thread:ucwlib_thread_id()>> instead.
110
111 * *Incompatible:* Several modules have been declared obsolete and removed:
112 ** `sighandler` -- generic signal handling (it still exists internally)
113 ** `qache` -- a mmap-based shared cache
114 ** `prefetch` -- an interface to memory prefetch instructions; superseded by GCC `__builtin_prefetch`
115 ** `randomkey` -- a generator of cryptographically strong pseudo-random tokens; will be replaced
116    by something more generic soon
117 ** `profile` -- a profiling hack
118
119 * *Incompatible:* Several modules now have their own header files:
120 ** `process.h` -- all functions related to processes, previously declared in `lib.h`
121 ** `io.h` -- functions related to files from `lib.h` and `lfs.h`
122 ** `time.h` -- timestamps and interval timers, previously in `lib.h`
123
124 * *Incompatible:* Several configuration options were renamed or removed:
125 ** `CONFIG_FAKE_ELTPOOL` &rarr; `CONFIG_UCW_FAKE_ELTPOOL`
126 ** `CONFIG_LARGE_FILES` &rarr; `CONFIG_UCW_LARGE_FILES`
127 ** `CONFIG_OWN_GETOPT` &rarr; `CONFIG_UCW_OWN_GETOPT`
128 ** `CONFIG_DIRECT_IO` &rarr; `CONFIG_UCW_DIRECT_IO`
129 ** `DEFAULT_CONFIG` &rarr; `CONFIG_UCW_DEFAULT_CONFIG`
130 ** `ENV_VAR_CONFIG` &rarr; `CONFIG_UCW_ENV_VAR_CONFIG`
131 ** `CONFIG_LFS` was removed
132 ** `CONFIG_URL_ESCAPE_COMPAT` was removed
133
134 * `UCW::Configure` supports running of test programs.
135
136 * `UCW::CGI` support multiple argument tables and UTF-8 mode. Also, it uses the
137   proper HTTP status codes when reporting errors.
138
139 * Implementation details of <<fastbuf:,fastbufs>> have changed. The new code checks
140   invariants more carefully, so it is possible that custom fastbuf back-ends which
141   are buggy now fail, although they previously seemed to work.
142
143
144 4.0 (2009-04-13)
145 ----------------
146 This was the first stand-alone release of LibUCW. Before that, LibUCW was developed
147 as a part of the http://www.ucw.cz/holmes/[Sherlock Holmes project].