Pavel Pisa [Sun, 25 Nov 2012 22:08:13 +0000 (23:08 +0100)]
Simplify CBUFF tail/consumer attachment.
Consumer does receives only messages which are allocated
later than tail is attached. CBUFF requires at least
one consumer/tail reader before buffer is filled.
The previous attempt to allow special handling
of zero readers situation was nor used nor tested
and was not correct. Code removed.
Pavel Pisa [Sun, 19 Feb 2012 16:09:02 +0000 (17:09 +0100)]
uLUt: Get rid of compiler warnings in custom GAVL delete functions.
Based on Michal Sojka's request but this solution is consistent
with other functions and allows to propagate errors
form gavl_delete_primitive if they would be detected
even there in future.
Pavel Pisa [Fri, 21 Jan 2011 23:41:28 +0000 (00:41 +0100)]
uLUt library header files can be moved to include/ulut subdirectory.
If the option
CONFIG_OC_ULUT_INCDIR=y
is selected, the copy of uLUt library header files
is added into "ulut" subdirectory of include location
but copy in commonly used top level location is
provided as well.
If the
CONFIG_OC_ULUT_INCDIRONLY=y
option is enabled the the uLUt header files are placed
only in "ulut" subdirectory location.
Pavel Pisa [Wed, 30 Dec 2009 21:09:53 +0000 (22:09 +0100)]
uLUt: UL_NOPSTATEMENT defined
This construct can be used as macro parameter,
when macro argument is used as C language statement
inserted into generated code and in concrete
macro instantiation is no use for the functionality.
Pavel Pisa [Wed, 30 Dec 2009 21:05:38 +0000 (22:05 +0100)]
uLUt extended by experimental hash table support.
The code is based on combination of array indexed
by masked value computed by hash function and GAVL
tree for each of array indexes. This combination
should provide good performance even if the hash
function distribute items non-uniformly for same cases.
Solution has drawback in relatively big memory
overhead required in each inserted item to provide
space for tree node.
The API, above all parameters to UL_HASTAB_CUST_NODE_INT_IMP,
will change probably.
Pavel Pisa [Tue, 1 Dec 2009 17:45:39 +0000 (18:45 +0100)]
Updated ul_htimer callback data type to be portable to 64 bit Windows.
The 64-bit Windows use LLP64 where pointer value does not
fit in long type variable. On the other hand, on 8 and 16
bit machines uintptr_t can be smaller than long so conditional
type definition is used now.
ppisa [Tue, 20 Oct 2009 09:55:29 +0000 (09:55 +0000)]
Add possibility to specify GAVL, GSA and HTIMER generated symbols scope.
This allows to GSA_CUST_DEC_SCOPE declaration macro variant
where the first argument can select static scope or explicit
functions visibility
UL_ATTR_UNUSED static
UL_EXPORT
UL_DLLLOCAL
UL_DLLPUBLIC
The DLL symbol visibility macros are defined in ul_udexport.h
header file. Same GAVL, GSA and HTIMER implementation macro
is used as for case of declaration with default functions scope.
wentasah [Mon, 10 Aug 2009 12:06:01 +0000 (12:06 +0000)]
Added ul_logreg_for_each_domain()
This functions walks through the list of all registered log domains and
calls a callback on it. It can be used to print the list of domains for
a user.
ppisa [Fri, 19 Jun 2009 11:00:32 +0000 (11:00 +0000)]
Added support for static GSA arrays with insert/delete functionality.
Such array can utilize preallocated items pointers array.
This means, that GSA_STATIC_CUST_DEC can be used with limited
insert/delete functionality. The GSA_CONST_CUST_DEC should
be used for strictly constant arrays with compile time filled data
instead.
ppisa [Sun, 17 May 2009 09:33:49 +0000 (09:33 +0000)]
Data queue FIFO included in uLUt.
The FIFO support functions and type for custom element
can be declared by UL_DQFIFO_CUST_DEC. The static
instances can be declared by UL_DQFIFO_STATIC_INSTANCE.
The FIFO size has to be power of two, because sequential
numbers are masked when index into buffer is computed.
Queue allows to iterate over last N elements in addition
to usual put and get operations which is significant
for FIR filters implementation.
ppisa [Tue, 27 Jan 2009 20:34:04 +0000 (20:34 +0000)]
The uLUt root htimer can be redirected through ul_root_htimer_ops.
These changes are necessary to allow integration into another
root main loop and events processing framework in future.
The types ul_mstime_t/ul_msdiff_t and ul_htim_time_t/ul_htim_diff_t
are not intermixed in the code and they could be separated in the
future if there appears need to do so.
ppisa [Thu, 18 Dec 2008 07:33:51 +0000 (07:33 +0000)]
Addec const attribute to some generic GAVL iterator functions.
This is NOT conversion of custom seatch functions to the
const key pointer. This conversion needs more checking
and could cause problems when multiple consts attributes
are accumulated.
smolik [Wed, 14 Nov 2007 13:30:58 +0000 (13:30 +0000)]
ul_ethd - reimplementation working with sockets - now sending uses fdopen
- under windows now is possible to run ul_ethd like windows service
ulut - disable compilation of utils_PROGRAMS under win32 - some error occures
libulan - implemeted new command - fd_wait_recv
- fdopen
a lot of bug fixes regarding ul_eth implementation
ppisa [Tue, 13 Feb 2007 11:29:42 +0000 (11:29 +0000)]
uLUt library updated from other projects.
Added support for cyclic variables comparison
ul_cyclic_gt
ul_cyclic_ge
This is usable mainly to compare time counters and other
variables which are expected to overflow and support overflow
arithmetics.
Conversion to new logging support finished.
It is now possible to selectively enable and set verbosity
for different logging domains from commandline.
The option "-g" argument syntax is same for all tools.
Number without domain specifier or with symbol "all"
select log level for all domains. Domain name followed
by "." or "=" character selects level for specified domain.
More specifications can be concatenated by symbol ":" or ",".
Usage example:
-g 1:domone.5:domtwo.6
Requires to select level 1 for all but two listed two specified
domains. Log levels for "domone" and "domtwo" domains are set
to 5 or 6 respectively.
Custom GSA array can be preinitialized by static intems list now.
The functions gsa_cust_insert_at() and gsa_cust_delete_at()
recognizes such case when alloc_count is zero and do array copy
instead of items array free or realloc.
Added implementation of multi-tail circular buffer with O1 head space
allocation.
This intended for situation, where more asynchronous sources
need to write data into queue. Because of uLUt is intended
to not enforce any policy to its users, the locking is not
part of the code and operations are divided to the shorter sequences.
Some of these has to be called with lock, spinlock or even IRQ
protection. Synchronization selection is fully in client hands.
ppisa [Thu, 9 Dec 2004 00:24:27 +0000 (00:24 +0000)]
Fixed bug in evaluation of return value in gavl_search_node() function.
Bug reported by Neal H. Walfield. It slipped into code
23 Oct 2003 and has been unnoticed until now, because all CAN
code switched to custom tree version before bug introduction.