Contains list of textresource_language_t.
slist_t languages
Points to last element (tail) of list.
struct slist_node_t * last
This variables makes syncqueue_t convertible to type queue_t.
struct dlist_node_t * last
Points to last entry in list of waiting threads.
struct slist_node_t * last
The root pointer of the list of waiting threads.
struct slist_node_t * last
Implements dlist_t.last_dlist.
#define last_dlist( list ) ((list)->last)
Returns the last element in the list.
struct dlist_node_t * last_dlist( dlist_t * list )
Implements queue_t.last_queue.
#define last_queue( queue, nodesize ) ( __extension__ ({ typeof(queue) _qu = (queue) ; uint16_t _ns = (nodesize) ; void * _node = 0 ; queue_page_t * _last ; if (_qu->last) { _last = (queue_page_t*)_qu->last ; if ((_last->end_offset - _last->start_offset) >= _ns) { _node = (uint8_t*)_last + _last->end_offset - _ns ; } } _node ; }))
Returns the last element or 0.
void * last_queue( const queue_t * queue, uint16_t nodesize )
Implements slist_t.last_slist.
#define last_slist( list ) ((list)->last)
Returns the last node in the list.
struct slist_node_t * last_slist( const slist_t * list )
Returns pointer to last contained syncevent_t.
struct syncevent_t * last_syncwlist( const syncwlist_t * wlist )
The last memory page in the list of pages.
queue_page_t * lastpage
Points to left subtree.
lrptree_node_t * left
Points to left subtree.
lrtree_node_t * left
Follow left pointer if testet bit at bit_offset is 0.
patriciatrie_node_t * left
Stores size (in bytes) of the unconverted mb character sequence.
size_t len
Implements syncqueue_t.len_syncqueue.
#define len_syncqueue( syncqueue ) ((syncqueue)->nrelements)
Returns the number of elements stored in the queue.
size_t len_syncqueue( const syncqueue_t * syncqueue )
Implements syncwlist_t.len_syncwlist.
#define len_syncwlist( wlist ) ((size_t)(wlist)->nrnodes)
Returns the number of inserted events.
size_t len_syncwlist( const syncwlist_t * wlist )
The maximum length of child array in a trie_node_t.
#define LENCHILDMAX ( (SIZEMAXNODE-sizeof(void*)/*uservalue*/-HEADERSIZE-2/*prefix*/)/(sizeof(trie_node_t*)+1) )
The number of elements stored in this array.
size_t length
The number of elements stored in this array.
size_t length
Length of text data in bytes.
size_t length
Implements arraysf_t.length_arraysf.
#define length_arraysf( array ) ((array)->length)
Returns the number of elements stored in the array.
size_t length_arraysf( arraysf_t * array )
Implements arraystf_t.length_arraystf.
#define length_arraystf( array ) ((array)->length)
Returns the number of elements stored in the array.
size_t length_arraystf( arraystf_t * array )
Returns number of UTF-8 characters encoded in string buffer.
size_t length_utf8( const uint8_t * strstart, const uint8_t * strend )
Returns number of elements of the first dimension of a static array.
#define lengthof( static_array ) (sizeof(static_array) / sizeof(*(static_array)))
Returns the number of syncthreads which are started but not run at least once.
size_t leninitqueue_syncrun( const syncrun_t * srun )
Returns the number of bytes the encoded prefix uses.
static inline uint8_t lenprefix_trienodeoffsets( const trie_nodeoffsets_t * offsets )
Returns the number of syncthreads which are run at least once.
size_t lenrunqueue_syncrun( const syncrun_t * srun )
Returns sizeof(void*) if uservalue is available else 0.
static inline uint8_t lenuservalue_trienodeoffsets( const trie_nodeoffsets_t * offsets )
Returns the number of syncthreads which are waiting for an event.
size_t lenwaitqueue_syncrun( const syncrun_t * srun )
Converts little_endian_val from little-endian byte order to host byte order.
unsigned letoh_int( unsigned little_endian_val )
Determines the hash table size as pow(2,level).
uint8_t level
Interface to adapt the lifetime of an object type.
typeadapt_lifetime_it lifetime
Implements typeadapt_lifetime_it.delete_object.
int lifetime_deleteobj_typeadaptimpl( typeadapt_impl_t * typeadp, struct typeadapt_object_t ** object )
Implements typeadapt_lifetime_it.newcopy_object.
int lifetime_newcopyobj_typeadaptimpl( typeadapt_impl_t * typeadp, /*out*/struct typeadapt_object_t ** destobject, const struct typeadapt_object_t * srcobject )
Line number of the next unread character.
size_t line
Implements textpos_t.line_textpos.
#define line_textpos( txtpos ) ((txtpos)->line)
Returns the current line number beginning from 1.
size_t line_textpos( const textpos_t * txtpos )
Implements utf8reader_t.line_utf8reader.
#define line_utf8reader( utfread ) (line_textpos(&(utfread)->pos))
Returns the line nr of the current readng position.
size_t line_utf8reader( const utf8reader_t * utfread )
Current text line nr.
size_t linenr
Loads content of file and appends it to result.
int load_file( const char * filepath, /*ret*/struct wbuffer_t * result, struct directory_t * relative_to )
Returns local ip address in localaddr.
int localaddr_ipsocket( const ipsocket_t * ipsock, struct ipaddr_t * localaddr )
See objectcache_impl_t.lockiobuffer_objectcacheimpl for an implementation.
void ( * lock_iobuffer ) (struct objectcache_t * cache, /*out*/struct memblock_t ** iobuffer)
Implement mutex_t.lock_mutex as a no op if !defined(KONFIG_SUBSYS_THREAD)
#define lock_mutex( mutex ) (0)
Locks a mutex.
int lock_mutex( mutex_t * mutex )
Locks the mutex.
int lock_thrmutex( thrmutex_t * mutex )
Lock flag used to protect access to data members.
uint8_t lockflag
Lock flag used to protect access to data members.
uint8_t lockflag
Lock flag used to protect access to data members.
uint8_t lockflag
Wait until rwlock->lockflag is cleared and set it atomically.
static inline void lockflag_rwlock( rwlock_t * rwlock )
Implements thread_t.lockflag_thread.
#define lockflag_thread( thread ) do { thread_t * const _thread = (thread) ; while (0 != atomicset_int(&_thread->lockflag)) { yield_thread() ; } } while (0)
Wait until thread->lockflag (lockflag) is cleared and set it atomically.
void lockflag_thread( thread_t * thread )
Waits until mutex->lockflag is cleared and sets it atomically.
static inline void lockflag_thrmutex( thrmutex_t * mutex )
Wait until wlist->lockflag is cleared and set it atomically.
static inline void lockflag_waitlist( waitlist_t * wlist )
The threads which acquired the lock and is allowed to run.
struct thread_t * lockholder
Returns the thread which locked the mutex.
struct thread_t * lockholder_thrmutex( thrmutex_t * mutex )
Locks the io buffer and returns a pointer to it in iobuffer.
#define LOCKIOBUFFER_OBJECTCACHE( /*out*/iobuffer ) (objectcache_maincontext().iimpl->lock_iobuffer(objectcache_maincontext().object, (iobuffer)))
Locks the io buffer and returns a pointer to it in iobuffer.
void lockiobuffer_objectcacheimpl( objectcache_impl_t * objectcache, /*out*/struct memblock_t ** iobuffer )
Acquire entrylock, increment nrofreader and release entrylock.
int lockreader_rwlock( rwlock_t * rwlock )
Acquire entrylock, sets writer to seld and wait until nrofreader == 0.
int lockwriter_rwlock( rwlock_t * rwlock )
Thread local erorr log.
iobj_DECLARE( , log ) log
Contains information for a log header.
struct log_header_t
The function table which describes the log service.
struct log_it
Declares a function table for accessing a log service.
void log_it_DECLARE( TYPENAME declared_it, TYPENAME log_t )
Inline implementation of maincontext_t.log_maincontext.
#define log_maincontext( ) (tcontext_maincontext()->log)
Uses iobj_DECLARE to declare object supporting interface log_it.
iobj_DECLARE( log_t, log )
Declare function pointer which writes a text resource into logbuffer_t.
typedef void ( * log_text_f )(struct logbuffer_t * logbuffer, va_list vargs)
Returns the logarithm to base 2 as integer of an integer value.
unsigned log10_int( unsigned i )
Uses s_pow10 table to decrement result if necessary.
unsigned log10_int32( uint32_t i )
Implements log10_int for 32 bit values.
unsigned log10_int32( uint32_t i )
Uses s_pow10 table to decrement result if necessary.
unsigned log10_int64( uint64_t i )
Implements log10_int for 64 bit values.
unsigned log10_int64( uint64_t i )
Returns the logarithm to base 2 as integer of an integer value.
unsigned log2_int( unsigned i )
The log2 of elements_per_block plus 1 or value 0.
uint8_t log2elements_per_block
Returns log2_int of pagesize_vm.
uint8_t log2pagesize_vm( void )
The log2_int value of pagesize_vm.
uint8_t log2pagesize_vm
The log2 of number of pointer stored in a memory block.
uint8_t log2ptr_per_block
Static initializer.
#define logbuffer_FREE { 0, 0, 0, sys_iochannel_FREE }
Static initializer.
#define logbuffer_INIT( size, addr, io ) { (addr), (size), ((addr)[0] = 0), (io) }
A logbuffer_t writes error messages to a buffer.
struct logbuffer_t
Logs a formatted string.
void logf_unittest( const char * format, ... ) __attribute__ ((__format__ (__printf__, 1, 2)))
Logs “filename:<line_number>: <msg>\n”.
void logfailed_unittest( const char * filename, unsigned line_number, const char * msg )
Logs “filename:<line_number>: UNEXPECTED VALUE <value>\n”.
void logfailedunexpected_unittest( const char * filename, unsigned line_number, const char * format, ... ) __attribute__ ((__format__ (__printf__, 3, 4)))
No object necessary.
struct logmain_t
Logs “OK\n” or “FAILED\n”.
void logresult_unittest( bool isFailed )
Logs “RUN %s: “.
void logrun_unittest( const char * testname )
Stores the size in bytes of the buffered log entries.
uint32_t logsize
Logs how many tests passed and how many failed.
void logsummary_unittest( void )
Writes “varname: [tcp|udp]://[ip]:[port]” to logchannel.
void logurl_ipaddr( const ipaddr_t * addr, const char * varname, uint8_t logchannel )
Static initializer.
#define logwriter_chan_INIT( size, addr, io, logstate ) { logbuffer_INIT(size, addr, io), 0, logstate, false }
Extends logbuffer_t with isappend mode and log_state_e.
struct logwriter_chan_t
Static initializer.
#define logwriter_FREE { 0, 0, 0 }
log_it_DECLARE( logwriter_it, logwriter_t )
A logwriter writes the console channel messages to STDOUT any other channels to STDERR.
struct logwriter_t
Static initializer.
#define lrptree_node_INIT { 0, 0, 0 }
Management overhead of objects which wants to be stored in a redblacktree_t.
struct lrptree_node_t
Static initializer.
#define lrtree_node_INIT { 0, 0 }
Management overhead of objects which wants to be stored in a splaytree_t.
struct lrtree_node_t
Returns the value of all nrbits least significant bits of ptr.
int lsbits_ptr( const ptr_t ptr, unsigned nrbits )