Exits the whole process in a controlled manner.
void abort_maincontext( int err )
Aborts the calling thread.
void abort_thread( void )
Aborts all running and waiting threads.
int abortall_syncrun( syncrun_t * srun )
Sets the state of the running thread to syncrun_state_ABORT and returns 0.
void abortthread_syncrun( syncrun_t * srun )
Returns the absolute value as unsigned value from a signed integer.
uint32_t abs_int32( int32_t i )
Returns the absolute value as unsigned value from a signed.
uint64_t abs_int64( int64_t i )
Returns access mode (read and or write) for a io channel.
accessmode_e accessmode_file( const file_t fileobj )
Returns accessmode_e for an io channel.
uint8_t accessmode_iochannel( const iochannel_t ioc )
Adds a new root ptrblock_t and sets ptrblock_t.childs[0] to old root.
static int adaptdepth_blockarray( blockarray_t * barray, uint8_t depth )
Adds the last two parameters and returns the sum in the first.
int add_bigint( bigint_t *restrict * result, const bigint_t * lbig, const bigint_t * rbig )
Adds two integers.
static int add_biginthelper( bigint_t *restrict * result, const bigint_t * lbig, const bigint_t * rbig )
Adds the last two parameters and returns the sum in the first.
int add_decimal( decimal_t *restrict * result, const decimal_t * ldec, const decimal_t * rdec )
Implements adding of two decimal numbers.
static int add_decimalhelper( decimal_t *restrict * result, const decimal_t * ldec, const decimal_t * rdec )
This function process the next input character in state->suffix.
static int addchar_suffixtree( suffixtree_t * tree, suffixtree_addstate_t * state )
Adds increment to the column number.
size_t addcolumn_textpos( textpos_t * txtpos, size_t increment )
Returns start (lowest) address of memory block.
uint8_t * addr_memblock( const memblock_t * mblock )
Returns the lowest address of the mapped memory.
uint8_t * addr_mmfile( const mmfile_t * mfile )
Returns the start address of a part of the string at index stridx.
const uint8_t * addr_splitstring( const splitstring_t * spstr, uint8_t stridx )
Returns the start address of the string in memory.
const uint8_t * addr_string( const string_t * str )
Implements adding of two positive decimal numbers.
static void addsplit_decimalhelper( decimal_t * restrict result, uint8_t digitsoffset, uint8_t lsize, const uint32_t * ldigits, uint8_t rsize, const uint32_t * rdigits )
Adds elem to freelist.
void addtofreelist_syncqueue( syncqueue_t * syncqueue, struct dlist_t * freelist, IDNAME * elem )
Add header_USERVALUE to offsets->header and adapts offsets.
static void adduservalue_trienodeoffsets( trie_nodeoffsets_t * offsets )
Expects data not to be accessed in the near future.
int advisedontneed_file( file_t fileobj, off_t offset, off_t length )
Expects data to be accessed sequentially and in the near future.
int advisereadahead_file( file_t fileobj, off_t offset, off_t length )
Returns the size of the mapped memory.
size_t alignedsize_mmfile( const mmfile_t * mfile )
Returns sizeof(staticpage_t) aligned to KONFIG_MEMALIGN.
static inline size_t alignedsize_staticpage( void )
Returns the difference between decimal_exponent and the aligned exponent.
static inline int alignexponent_decimalhelper( /*out*/uint32_t * exponent_correction, int32_t decimal_exponent )
Aligns offset to architecture specific pointer alignment.
static inline unsigned alignoffset_trienode( unsigned offset )
Aligns a value to the next multiple of KONFIG_MEMALIGN.
static inline size_t alignsize_testmmblock( size_t bytesize )
Resizes cstring_t if necessary and returns additional memory in memstr.
static int alloc_cstring_wbuffer( void * impl, size_t new_size, /*inout*/memstream_t * memstr )
Resizes memblock_t if necessary and returns additional memory in memstr.
static int alloc_memblock_wbuffer( void * impl, size_t new_size, /*inout*/memstream_t * memstr )
Returns always ENOMEM.
static int alloc_static_wbuffer( void * impl, size_t new_size, /*inout*/memstream_t * memstr )
Makes sure cstr has at least allocate_size preallocated bytes.
int allocate_cstring( cstring_t * cstr, size_t allocate_size )
Does the real allocation / reallocation.
static int allocate_decimalhelper( decimal_t *restrict * dec, uint32_t size_allocate )
Preallocates blocks on disk filled with 0 bytes.
int allocate_file( file_t fileobj, off_t file_size )
Allocates a block of memory.
static int allocateblock_binarystack( binarystack_t * stack, uint32_t size )
Reserves some memory pages for internal buffer.
static int allocatebuffer_logwriter( /*out*/memblock_t * buffer )
Returns the allocated buffer size in bytes.
size_t allocatedsize_cstring( const cstring_t * cstr )
Returns allocated number of bytes which are not freed.
int allocatedsize_malloc( /*out*/size_t * number_of_allocated_bytes )
Allocate new pageblock_block_t and add it to freelist.
static inline int allocblock_pagecacheimpl( pagecache_impl_t * pgcache, pagesize_e pgsize, /*out*/pagecache_block_t ** block )
Allocates a single memory page of size pgsize.
int ( * allocpage ) (pagecache_t * pgcache, uint8_t pgsize, /*out*/struct memblock_t * page)
Calls pgcache->iimpl->allocpage with pgcache->object as first parameter.
int allocpage_pagecache( const pagecache_t pgcache, uint8_t pgsize, /*out*/struct memblock_t * page )
Allocates a single memory page of size pgsize.
int allocpage_pagecacheimpl( pagecache_impl_t * pgcache, uint8_t pgsize, /*out*/struct memblock_t * page )
Allocates static memory which should live as long as pgcache.
int ( * allocstatic ) (pagecache_t * pgcache, size_t bytesize, /*out*/struct memblock_t * memblock)
Allocates size bytes of memory and returns the start address.
void * allocstatic_maincontext( uint8_t size )
Calls pgcache->iimpl->allocstatic with pgcache->object as first parameter.
int allocstatic_pagecache( const pagecache_t pgcache, size_t bytesize, /*out*/struct memblock_t * memblock )
Allocates static memory which should live as long as pgcache.
int allocstatic_pagecacheimpl( pagecache_impl_t * pgcache, size_t bytesize, /*out*/struct memblock_t * memblock )
Returns in api the client rendering API the context supports.
int api_eglcontext( const eglcontext_t eglcont, struct opengl_display_t * egldisp, /*out*/uint8_t * api )
Returns in api the client rendering API cont supports.
int api_gcontext( const gcontext_t * cont, struct display_t * disp, /*out*/uint8_t * api )
Appends str with len str_len to cstr.
int append_cstring( cstring_t * cstr, size_t str_len, const char str[str_len] )
Appends 1 byte to the buffer.
int appendbyte_wbuffer( wbuffer_t * wbuf, const uint8_t c )
Appends buffer_size bytes of unitilaized memory to wbuf.
int appendbytes_wbuffer( wbuffer_t * wbuf, size_t buffer_size, uint8_t ** buffer )
Appends the first buffer_size bytes from buffer to wbuf.
int appendcopy_wbuffer( wbuffer_t * wbuf, size_t buffer_size, const uint8_t * buffer )
Returns an array index for an addr located in a pagecache_block_t.pageblock.
static inline size_t arrayindex_pagecacheblock( const void * addr )
Converts value returned by eglerr_egl into a system/application specific error code.
int aserrcode_egl( int eglerr )
Exits the whole process in a controlled manner.
void assertfail_maincontext( const char * condition, const char * file, int line, const char * funcname )
Assigns memory to an element at position arrayindex and returns its address in elemaddr.
int assign_blockarray( blockarray_t * barray, size_t arrayindex, /*out*/void ** elemaddr )
Implements at_blockarray and assign_blockarray.
int assign2_blockarray( blockarray_t * barray, size_t arrayindex, bool is_allocate, /*out*/void ** elemaddr )
Returns contained node at position pos.
struct arraysf_node_t * at_arraysf( const arraysf_t * array, size_t pos )
Returns node with same key as *keydata*[size].
struct arraystf_node_t * at_arraystf( const arraystf_t * array, size_t size, const uint8_t keydata[size] )
Returns the memory address of element at position arrayindex.
void * at_blockarray( blockarray_t * barray, size_t arrayindex )
TODO: describe During trie traversal two nodes are merged into one if this saves space.
void ** at_trie( trie_t * trie, uint16_t keylen, const uint8_t key[keylen] )
Add increment to i and return old value atomically.
int atomicadd_int( int * i, uint32_t increment )
Sets flag to value 0.
void atomicclear_int( uint8_t * flag )
Reads last written value from memory location i.
int atomicread_int( int * i )
Sets flag to value != 0 and returns previous value.
int atomicset_int( uint8_t * flag )
Sub decrement from i and return old value atomically.
int atomicsub_int( int * i, uint32_t decrement )
If *i is equal to oldval change it into newval atomically else do nothing.
int atomicswap_int( int * i, int oldval, int newval )
Writes newval into memory located at i.
void atomicwrite_int( int * i, int newval )
Checks that a certain user / password combination is valid.
int authenticate_sysuser( const char * username, const char * password )
Function called back from PAM library during authentication of user.
static int authenticatecallback_sysuser( int num_msg, const struct pam_message ** msg, struct pam_response ** resp, void * appdata_ptr )