Increments the column number.
void incrcolumn_textpos( textpos_t * txtpos )
Increments the line number.
void incrline_textpos( textpos_t * txtpos )
Initializes a new branch node.
void init_arraysfmwaybranch( /*out*/arraysf_mwaybranch_t * branch, unsigned shift, size_t pos1, arraysf_unode_t * childnode1, size_t pos2, arraysf_unode_t * childnode2 )
Loads next key data byte at offset from node into keyval.
static void init_arraystfkeyval( /*out*/arraystf_keyval_t * keyval, size_t offset, arraystf_node_t * node )
Initializes a new branch node.
void init_arraystfmwaybranch( /*out*/arraystf_mwaybranch_t * branch, size_t offset, unsigned shift, size_t data1, arraystf_unode_t * childnode1, size_t data2, arraystf_unode_t * childnode2 )
Initializes stack object and reserves at least preallocate_size bytes.
int init_binarystack( /*out*/binarystack_t * stack, uint32_t preallocate_size )
Initializes barray to use blocks of memory of size pagesize (see pagesize_e).
int init_blockarray( /*out*/blockarray_t * barray, uint8_t pagesize, uint16_t elementsize )
Inits convert_wchar_t with a pointer to a mbs string.
extern int init_convertwchar( /*out*/convert_wchar_t * conv, size_t input_len, const char * input_string )
Initializes object of type crc32_t.
void init_crc32( /*out*/crc32_t * crc )
Inits cstring_t and preallocates memory.
int init_cstring( /*out*/cstring_t * cstr, size_t preallocate_size )
Opens file and reads all contained values.
int init_csvfilereader( /*out*/csvfilereader_t * csvfile, const char * filepath )
Initializes a dlist_t object.
void init_dlist( /*out*/dlist_t * list )
Returns a configuration which matches the given attributes.
int init_eglconfig( /*out*/eglconfig_t * eglconf, struct opengl_display_t * egldisp, const int32_t config_attributes[] )
Initializes eglcont with a graphic context.
int init_eglcontext( /*out*/eglcontext_t * eglcont, struct opengl_display_t * egldisp, struct opengl_config_t * eglconf, uint8_t api )
Allocates a pixel buffer with size (width, height) in pixels and returns it in eglpbuf.
int init_eglpbuffer( /*out*/eglpbuffer_t * eglpbuf, struct opengl_display_t * egldisp, struct opengl_config_t * eglconf, uint32_t width, uint32_t height )
Initializes errcontext with static system error string table.
int init_errorcontext( /*out*/errorcontext_t * errcontext )
Allocates a hash table of at least size 1.
int init_exthash( /*out*/exthash_t * htable, size_t initial_size, size_t max_size, const typeadapt_member_t * nodeadp )
Opens a file identified by its path and name.
int init_file( /*out*/file_t * fileobj, const char * filepath, accessmode_e iomode, const struct directory_t * relative_to/*0 = > current working dir*/ )
Initializes fpath with the path of working directory workdir and filename.
void init_filepathstatic( /*out*/filepath_static_t * fpath, const struct directory_t * workdir, const char * filename )
Opens file for reading into a double buffer.
int init_filereader( /*out*/filereader_t * frd, const char * filepath, const struct directory_t * relative_to/*0 = > current working dir*/ )
Returns an OpenGL surface configuration for display.
int init_gconfig( /*out*/gconfig_t * gconf, struct display_t * display, const int32_t config_attributes[] )
Creates a new native OpenGL graphic context.
int init_gcontext( /*out*/gcontext_t * cont, struct display_t * disp, struct gconfig_t * gconf, uint8_t api )
Initialize initentry with mainfct and initarg.
static inline void init_initqueueentry( initqueue_entry_t * initentry, syncrun_f mainfct, void * initarg )
Generic initialization.
void init_iobj( /*out*/iobj_t * iobj, void * object, void * iimpl )
Creates epoll event notification facility.
int init_iopoll( /*out*/iopoll_t * iopoll )
Creates system specific event queue to query for io events (ioevent_t).
int init_iopoll( /*out*/iopoll_t * iopoll )
Creates a new unconnected UDP network communication endpoint.
int init_ipsocket( /*out*/ipsocket_t * ipsock, const struct ipaddr_t * localaddr )
Initializes object.
int init_logbuffer( /*out*/logbuffer_t * logbuf, uint32_t buffer_size, uint8_t buffer_addr[buffer_size], sys_iochannel_t io )
Allocates memory for the structure and initializes all variables to default values.
int init_logwriter( /*out*/logwriter_t * lgwrt )
Initializes global program context.
int init_maincontext( const maincontext_e context_type, int argc, const char ** argv )
Opens a new file and maps it to memory.
int init_mmfile( /*out*/mmfile_t * mfile, const char * file_path, off_t file_offset, size_t size, accessmode_e mode, const struct directory_t * relative_to /*0 = >current_working_directory*/ )
Initializes a new memory manager.
int init_mmimpl( /*out*/mm_impl_t * mman )
Maps a file as binary executable into memory whose filename is modulename.
int init_module( /*out*/module_t * mod, const char * modulename )
Initializer for a mutex with error checking.
int init_mutex( /*out*/mutex_t * mutex )
Inits objectcache_impl_t and all contained objects.
int init_objectcacheimpl( /*out*/objectcache_impl_t * objectcache )
Allocates a shared hash table of size pagecache_blockmap_FREE.
int init_pagecacheblockmap( /*out*/pagecache_blockmap_t * blockmap )
Preallocates at least 1MB of memory and initializes pgcache.
int init_pagecacheimpl( /*out*/pagecache_impl_t * pgcache )
Inits an empty tree object.
void init_patriciatrie( /*out*/patriciatrie_t * tree, const typeadapt_member_t * nodeadp )
Creates a new native OpenGL off-screen pixel buffer.
int init_pixelbuffer( /*out*/pixelbuffer_t * pbuf, struct display_t * disp, struct gconfig_t * gconf, uint32_t width, uint32_t height )
Initialize system context and calls main_thread.
int init_platform( mainthread_f main_thread, void * user )
Creates child process which executes a function.
int init_process( /*out*/process_t * process, process_task_f child_main, void * start_arg, process_stdio_t * stdfd )
Initializes the current process context.
int init_processcontext( /*out*/processcontext_t * pcontext )
Initializes process_stdfd2_t with process_stdio_t and opens devnull.
static int init_processstdio2( /*out*/process_stdfd2_t * stdfd2, process_stdio_t * stdfd )
Sets al fields to 0.
int init_queue( /*out*/queue_t * queue )
Inits an empty tree object.
int init_redblacktree( /*out*/redblacktree_t * tree, const typeadapt_member_t * nodeadp )
Stores the number of resources currently in use.
int init_resourceusage( /*out*/resourceusage_t * usage )
Initializes runentry with thread and exitevent.
static inline void init_run2queueentry( /*out*/run2queue_entry_t * runentry, syncthread_t * thread, syncevent_t * exitevent )
Initializes runentry with thread.
static inline void init_runqueueentry( /*out*/runqueue_entry_t * runentry, const syncthread_t * thread )
Initializes data members.
void init_rwlock( /*out*/rwlock_t * rwlock )
Initializes a semaphore.
int init_semaphore( /*out*/semaphore_t * semaobj, uint16_t init_signal_count )
Inits internal fields to start values.
void init_sha1hash( /*out*/sha1_hash_t * sha1 )
Initializes a single linked list object.
void init_slist( /*out*/slist_t * list )
Inits an empty tree object.
void init_splaytree( /*out*/splaytree_t * tree )
Initializes a staticpage_t as head of page and returns a pointer to it.
static inline void init_staticpage( staticpage_t ** staticpage, memblock_t * page )
Implements string_t.init_string.
static inline void init_string( /*out*/string_t * str, size_t size, const uint8_t string[size] )
Assigns constant string buffer to str.
static inline void init_string( /*out*/string_t * str, size_t size, const uint8_t string[size] )
Initializes stringstream with start and end address.
int init_stringstream( /*out*/stringstream_t * strstream, const uint8_t * startaddr, const uint8_t * endaddr )
Initializes syncqueue.
void init_syncqueue( /*out*/syncqueue_t * syncqueue )
Initializes a set of queues.
int init_syncrun( /*out*/syncrun_t * srun )
Initializes sthread with { mainfct, state } .
void init_syncthread( /*out*/syncthread_t * sthread, syncthread_f mainfct, void * state )
Initializes syncwait and registers itself at event.
void init_syncwait( /*out*/syncwait_t * syncwait, const syncthread_t * thread, syncevent_t * event, void * continuelabel )
The double linked list dlist_t will not be stored.
void init_syncwlist( /*out*/syncwlist_t * wlist )
Initializes wlist to an empty list.
void init_syncwlist( /*out*/syncwlist_t * wlist )
Allocates a new system timer.
int init_systimer( /*out*/systimer_t * timer, sysclock_e clock_type )
Initializes system user of process at process start.
int init_sysuser( /*out*/sysuser_t * sysusr )
Inits errtimer with timercount and errcode.
void init_testerrortimer( /*out*/test_errortimer_t * errtimer, uint32_t timercount, int errcode )
Initializes a new test memory manager.
int init_testmm( /*out*/testmm_t * mman )
Sets column and line numbers to arbitrary values.
void init_textpos( /*out*/textpos_t * txtpos, size_t colnr, size_t linenr )
Initializes textresource_t object.
static int init_textresource( /*out*/textresource_t * textres, const char * read_from_filename )
Opens file and reads header for the version information.
static int init_textresourcereader( /*out*/textresource_reader_t * reader, const char * filename )
Creates all top level services which are bound to a single thread.
int init_threadcontext( /*out*/threadcontext_t * tcontext, struct processcontext_t * pcontext, uint8_t context_type )
Allocates a memory block big enoug to hold all thread local storage data.
int init_threadtls( /*out*/thread_tls_t * tls )
Sets mutex to thrmutex_INIT.
void init_thrmutex( /*out*/thrmutex_t * mutex )
Initializes trie with 0 pointer.
int init_trie( /*out*/trie_t * trie )
Initializes offsets from prefixlen, optional uservalue, and number of child pointers nrchild.
static void init_trienodeoffsets( /*out*/trie_nodeoffsets_t * offsets, uint16_t prefixlen, bool isuservalue, const uint16_t nrchild )
Initializes implementation to support objectes of size objectsize.
int init_typeadaptimpl( /*out*/typeadapt_impl_t * typeadp, size_t objectsize )
Inits typeadapt_nodeoffset_t structure with offset to struct member.
void init_typeadaptnodeoffset( /*out*/typeadapt_nodeoffset_t * nodeoff, uint16_t nodeoffset )
Opens file at filepath for reading as UTF-8 encoded text.
int init_utf8reader( /*out*/utf8reader_t * utfread, const char * filepath, const struct directory_t * relative_to/*0 = > current working dir*/ )
Sets all data members to 0.
int init_utf8scanner( /*out*/utf8scanner_t * scan )
Same as assigning utf8validator_INIT.
void init_utf8validator( /*out*/utf8validator_t * utf8validator )
Sets values of valuecache.
int init_valuecache( /*out*/valuecache_t * valuecache )
Returns in mappedregions the descriptions of all current virtual memory mappings.
int init_vmmappedregions( /*out*/vm_mappedregions_t * mappedregions )
Map memory into the virtual address space of the calling process.
int init_vmpage( /*out*/vmpage_t * vmpage, size_t size_in_bytes )
Initializes waitentry with thread and exitevent and uses srun->waitinfo to read the event and the continuelabel.
static inline void init_wait2queueentry( /*out*/wait2queue_entry_t * waitentry, syncrun_t * srun, syncthread_t * thread, syncevent_t * exitevent )
Inits a waiting list.
int init_waitlist( /*out*/waitlist_t * wlist )
Initializes waitentry with thread and uses srun->waitinfo to read the event and the continuelabel.
static inline void init_waitqueueentry( /*out*/waitqueue_entry_t * waitentry, syncrun_t * srun, syncthread_t * thread )
Creates a new native window and its OpenGL extension/wrapper type.
int init_window( /*out*/window_t * win, struct display_t * disp, uint32_t screennr, const struct window_evh_t * eventhandler, struct gconfig_t * gconf, struct windowconfig_t * winattr )
Tries to allocate a double buffer associated with window.
int init_x11dblbuffer( /*out*/x11dblbuffer_t * dblbuf, struct x11window_t * x11win )
Connects to a X11 display server and returns the newly created connection.
int init_x11display( /*out*/x11display_t * x11disp, const char * display_server_name )
Initializes x11screen_t with reference to x11display_t and screen number.
int init_x11screen( /*out*/x11screen_t * x11screen, struct x11display_t * display, uint32_t nrscreen )
Returns an iterator to a list of all video modes supported by x11screen_t.
int init_x11videomodeiterator( /*out*/x11videomode_iterator_t * xvidit, struct x11screen_t * x11screen )
Create a native X11 window on x11screen and assign it to x11win.
int init_x11window( /*out*/x11window_t * x11win, struct x11display_t * x11disp, uint32_t screennr, const struct x11window_evh_t * eventhandler, const int32_t * gconf_attrib, const struct windowconfig_t * winconf_attrib )
Initialize initentry with mainfct and initarg and initargsize.
static inline void init2_initqueueentry( initqueue_entry_t * initentry, syncrun_f mainfct, uint8_t initargsize )
Map memory into the virtual address space of the calling process.
int init2_vmpage( /*out*/vmpage_t * vmpage, size_t size_in_bytes, const accessmode_e access_mode )
Same as init_x11display but allows to not initialize any X11 extension.
int init2_x11display( /*out*/x11display_t * x11disp, const char * display_server_name, bool isInitExtension )
Waits for an incoming connection request from a peer (client).
int initaccept_ipsocket( /*out*/ipsocket_t * ipsock, ipsocket_t * listensock, struct ipaddr_t * remoteaddr/*0 = > ignored*/ )
Map new memory into the virtual address space of the calling process.
int initaligned_vmpage( /*out*/vmpage_t * vmpage, size_t powerof2_size_in_bytes )
Inits ipaddr_storage_t as an ip addr of type ipaddr_t with given ipversion_e.
ipaddr_t * initany_ipaddrstorage( ipaddr_storage_t * addr, ipprotocol_e protocol, ipport_t port, ipversion_e version )
Opens or creates a file to append only.
int initappend_file( /*out*/file_t * fileobj, const char * filepath, const struct directory_t * relative_to/*0 = > current working dir*/ )
Calls init_testmm and wraps object into interface object mm_t.
int initasmm_testmm( /*out*/struct mm_t * testmm )
Creates a connected network communication endpoint.
int initconnect_ipsocket( /*out*/ipsocket_t * ipsock, const struct ipaddr_t * remoteaddr, const struct ipaddr_t * localaddr/*0 = newany_ipaddr*/ )
Same as initconnect_ipsocket except for async operation.
int initconnect_ipsocketasync( /*out*/ipsocket_async_t * ipsockasync, const struct ipaddr_t * remoteaddr, const struct ipaddr_t * localaddr )
Copies state from source to dest.
extern int initcopy_convertwchar( /*out*/convert_wchar_t * restrict dest, const convert_wchar_t * restrict source )
Generic initialization.
void initcopy_iobj( /*out*/iobj_t * destiobj, const iobj_t * srciobj )
Makes ioc a duplicate of from_ioc.
int initcopy_iochannel( /*out*/iochannel_t * ioc, iochannel_t from_ioc )
Implements string_t.initcopy_string.
static inline void initcopy_string( /*out*/string_t * str, const string_t * restrict srcstr )
Copies content of srcstr to str.
static inline void initcopy_string( /*out*/string_t * str, const string_t * restrict srcstr )
Creates a file identified by its path and name.
int initcreate_file( /*out*/file_t * fileobj, const char * filepath, const struct directory_t * relative_to/*0 = > current working dir*/ )
Returns the current active video mode of the default screen.
int initcurrent_x11videomode( /*out*/x11videomode_t * current_xvidmode, struct x11screen_t * x11screen )
Init offsets from decoded information stored in header.
static int initdecode_trienodeoffsets( /*out*/trie_nodeoffsets_t * offsets, const trie_nodedata_t * data )
Initializes disp with a connection to the default display.
int initdefault_display( /*out*/display_t * disp )
Initializes egldisp with the default display connection.
int initdefault_egldisplay( /*out*/egldisplay_t * egldisp )
Searches the first position where the two keys differ.
static int initdiff_arraystfkeyval( /*out*/arraystf_keyval_t * keyval, arraystf_node_t * node, arraystf_node_t * key )
Inits string_field_t describing a double value.
int initdouble_stringfield( /*out*/string_field_t * strfield, double dval )
Executes another program with same environment.
int initexec_process( /*out*/process_t * process, const char * filename, const char * const * arguments, process_stdio_t * stdfd /*0 = > /dev/null*/ )
Opens file for reading.
static int initfile_filereader( /*out*/file_t * fd, /*out*/off_t * filesize, const char * filepath, const struct directory_t * relative_to/*0 = > current working dir*/ )
Same as init_eglconfig except that more than one possible configuration is considered.
int initfiltered_eglconfig( /*out*/eglconfig_t * eglconf, struct opengl_display_t * egldisp, const int32_t config_attributes[], eglconfig_filter_f filter, void * user )
Same as init_gconfig except that more than one possible configuration is considered.
int initfiltered_gconfig( /*out*/gconfig_t * gconf, struct display_t * display, const int32_t config_attributes[], gconfig_filter_t * filter )
Initializes an iterator for arraysf_t.
int initfirst_arraysfiterator( /*out*/arraysf_iterator_t * iter, arraysf_t * array )
Initializes an iterator for an arraystf_t.
int initfirst_arraystfiterator( /*out*/arraystf_iterator_t * iter, arraystf_t * array )
Initializes an iterator for dlist_t.
int initfirst_dlistiterator( /*out*/dlist_iterator_t * iter, dlist_t * list )
Initializes an iterator for exthash_t.
int initfirst_exthashiterator( /*out*/exthash_iterator_t * iter, exthash_t * htable )
Initializes an iterator for patriciatrie_t.
int initfirst_patriciatrieiterator( /*out*/patriciatrie_iterator_t * iter, patriciatrie_t * tree )
Initializes an iterator for patriciatrie_t for nodes with prefix prefixkey.
int initfirst_patriciatrieprefixiter( /*out*/patriciatrie_prefixiter_t * iter, patriciatrie_t * tree, size_t keylength, const uint8_t prefixkey[keylength] )
Initializes an iterator for queue_t.
int initfirst_queueiterator( /*out*/queue_iterator_t * iter, queue_t * queue, uint16_t nodesize )
Initializes an iterator for redblacktree_t.
int initfirst_redblacktreeiterator( /*out*/redblacktree_iterator_t * iter, redblacktree_t * tree )
Initializes an iterator for slist_t.
int initfirst_slistiterator( /*out*/slist_iterator_t * iter, slist_t * list )
Initializes an iterator for splaytree_t.
int initfirst_splaytreeiterator( /*out*/splaytree_iterator_t * iter, splaytree_t * tree, uint16_t nodeoffset, typeadapt_t * typeadp )
Initializes an iterator for syncwlist_t.
int initfirst_syncwlistiterator( /*out*/syncwlist_iterator_t * iter, syncwlist_t * wlist )
Assigns static string buffer to str.
int initfl_string( /*out*/string_t * str, const uint8_t * first, const uint8_t * last )
Inits string_field_t describing a float value.
int initfloat_stringfield( /*out*/string_field_t * strfield, float fval )
Returns a configuration with ID id.
int initfromconfigid_eglconfig( /*out*/eglconfig_t * eglconf, struct opengl_display_t * egldisp, const uint32_t id )
Returns an OpenGL surface configuration whose ID matches configid.
int initfromconfigid_gconfig( /*out*/gconfig_t * gconf, struct display_t * display, const uint32_t configid )
Maps a file referenced by sys_iochannel_t into memory.
int initfromio_mmfile( /*out*/mmfile_t * mfile, sys_iochannel_t fd, off_t file_offset, size_t size, accessmode_e mode )
Inits cstring_t and copies data from string_t.
int initfromstring_cstring( /*out*/cstring_t * cstr, const struct string_t * copiedfrom )
Initializes stringstream from string_t.
int initfromstring_string( /*out*/stringstream_t * strstream, const struct string_t * str )
Initializes str with content of stringstream_t.
void initfromstringstream_string( /*out*/string_t * str, const struct stringstream_t * strstream )
Initializes xvidmode with the parameter values.
void initfromvalues_x11videomode( /*out*/x11videomode_t * xvidmode, uint32_t width_in_pixel, uint32_t height_in_pixel, uint16_t modeid )
Same as init_process except that it accepts functions with generic argument type.
int initgeneric_process( /*out*/process_t * process, process_task_f child_main, void * start_arg, process_stdio_t * stdfd )
Initializes an iterator for dlist_t.
int initlast_dlistiterator( /*out*/dlist_iterator_t * iter, dlist_t * list )
Initializes an iterator of patriciatrie_t.
int initlast_patriciatrieiterator( /*out*/patriciatrie_iterator_t * iter, patriciatrie_t * tree )
Initializes an iterator of redblacktree_t.
int initlast_redblacktreeiterator( /*out*/redblacktree_iterator_t * iter, redblacktree_t * tree )
Initializes an iterator of splaytree_t.
int initlast_splaytreeiterator( /*out*/splaytree_iterator_t * iter, splaytree_t * tree, uint16_t nodeoffset, typeadapt_t * typeadp )
Creates a TCP server socket for accepting connections from peers (clients).
int initlisten_ipsocket( /*out*/ipsocket_t * ipsock, const struct ipaddr_t * localaddr, uint16_t max_outstanding_connections )
Initializes main thread.
int initmain_thread( /*out*/thread_t * thread )
Same as init_threadtls but calls no other functions of C-kern system.
int initmain_threadtls( /*out*/thread_tls_t * tls, /*out*/struct memblock_t * threadstack, /*out*/struct memblock_t * signalstack )
Inits dest with content of source and sets source to cstring_FREE.
void initmove_cstring( /*out*/cstring_t * restrict dest, cstring_t * restrict source )
Implements file_t.initmove_file.
static inline void initmove_file( file_t * restrict destfile, file_t * restrict sourcefile )
Moves content of sourcefile to destfile.
static inline void initmove_file( /*out*/file_t * restrict destfile, file_t * restrict sourcefile )
Moves content of sourcemfile to destmfile.
void initmove_mmfile( /*out*/mmfile_t * restrict destmfile, mmfile_t * restrict sourcemfile )
Moves the object to another memory address.
void initmove_queue( /*out*/queue_t * dest, queue_t * src )
Initializes dest with src.
static inline void initmove_run2queueentry( /*out*/run2queue_entry_t * dest, run2queue_entry_t * src )
Initializes dest with src.
static inline void initmove_runqueueentry( /*out*/runqueue_entry_t * dest, runqueue_entry_t * src )
Moves initialized srcsyncevent to destsyncevent.
void initmove_syncevent( /*out*/syncevent_t * destsyncevent, const syncevent_t * srcsyncevent )
Moves initialized (!)
void initmove_syncwait( /*out*/syncwait_t * destsyncwait, const syncwait_t * srcsyncwait )
Initializes destwlist with content of scrwlist and clears srcwlist.
void initmove_syncwlist( /*out*/syncwlist_t * destwlist, syncwlist_t * srcwlist )
Moves content of initialized src to dest.
static inline void initmove_wait2queueentry( /*out*/wait2queue_entry_t * dest, wait2queue_entry_t * src )
Moves content of initialized src to dest.
static inline void initmove_waitqueueentry( /*out*/waitqueue_entry_t * dest, waitqueue_entry_t * src )
Moves src to dest.
void initmove_wlistentry( /*out*/wlistentry_t * dest, wlistentry_t * src )
Must be called if address of x11display_t changes.
int initmove_x11display( /*out*/x11display_t * destination, x11display_t * source )
Must be called if address of x11window_t changes.
int initmove_x11window( /*out*/x11window_t * dest_x11win, x11window_t * src_x11win )
Moves initialized or free srcsyncevent to destsyncevent.
void initmovesafe_syncevent( /*out*/syncevent_t * destsyncevent, const syncevent_t * srcsyncevent )
Returns the tcp and udp port numbers of a named IP service.
int initnamed_ipport( /*out*/ipport_t * port, const char * servicename, ipprotocol_e protocol )
Called from maincontext_t.init_maincontext.
int initonce_errorcontext( /*out*/errorcontext_t * error )
Called from maincontext_t.init_maincontext.
int initonce_locale( void )
Sets up a process wide signal handler and signal masks at process initialization.
int initonce_signalhandler( void )
Init Xlib such that calling into it is thread safe.
int initonce_X11( void )
Allocates resources of pagecache_block_t stored in pagecache_block_t.pageblock.
static inline int initpageblock_pagecacheblock( vmpage_t * pageblock, size_t blocksize )
Sets *progname to (strrchr(argv0, “/”)+1).
static void initprogname_maincontext( const char ** progname, const char * argv0 )
Initializes a set of realtime signals which can be waited upon.
int initrealtime_signalwait( /*out*/signalwait_t * signalwait, signalrt_t minrt, signalrt_t maxrt )
Assigns static string buffer to str.
int initse_string( /*out*/string_t * str, const uint8_t * start, const uint8_t * end )
Inits egldisp with display.
static inline int initshared_egldisplay( egldisplay_t * egldisp, EGLDisplay display )
Opens file for reading into a single buffer.
int initsingle_filereader( /*out*/filereader_t * frd, const char * filepath, const struct directory_t * relative_to/*0 = > current working dir*/ )
Initializes a single linked list object containing a single node.
void initsingle_slist( /*out*/slist_t * list, slist_node_t * node )
Prepares the single instance of unittest_t to execute tests.
int initsingleton_unittest( const char * log_files_directory )
Split a memory mapping into two.
int initsplit_mmfile( /*out*/mmfile_t * destheadmfile, /*out*/mmfile_t * desttailmfile, size_t headsize, mmfile_t * sourcemfile )
Calls platform_t.init_platform, maincontext_t.init_maincontext and runs main_thread.
int initstart_maincontext( const maincontext_startparam_t * startparam )
Inits string_field_t describing a string value.
int initstring_stringfield( /*out*/string_field_t * strfield, struct string_t * strval )
Initializes str with substring of fromstr.
int initsubstr_string( /*out*/string_t * str, const string_t * restrict fromstr, size_t start_offset, size_t size )
Calls init_pagecacheimpl and adds interface pagecache_it to object.
int initthread_pagecacheimpl( /*out*/struct pagecache_t * pagecache )
Called from x11window_t.init_x11window.
int initvid_x11window( out struct x11display_t * x11disp, uint32_t screennr, const struct x11window_evh_t * eventhandler, (X11) VisualID const struct windowconfig_t * winconf_attrib )
Create a native X11 window on x11screen and assign it to x11win.
int initvid_x11window( /*out*/x11window_t * x11win, struct x11display_t * x11disp, uint32_t screennr, const struct x11window_evh_t * eventhandler, /*(X11) VisualID*/uint32_t config_visualid, const struct windowconfig_t * winconf_attrib )
Initializes egldisp with x11disp.
int initx11_egldisplay( /*out*/egldisplay_t * egldisp, struct x11display_t * x11disp )
Initializes eglwin with x11win.
int initx11_eglwindow( /*out*/eglwindow_t * eglwin, struct opengl_display_t * egldisp, struct opengl_config_t * eglconf, struct x11window_t * x11win )
Inserts new node at position pos into array.
int insert_arraysf( arraysf_t * array, struct arraysf_node_t * node, /*out*/struct arraysf_node_t ** inserted_node/*0 = >not returned*/, struct typeadapt_member_t * nodeadp/*0 = >no copy is made*/ )
Inserts new node with string key into array.
int insert_arraystf( arraystf_t * array, struct arraystf_node_t * node, /*out*/struct arraystf_node_t ** inserted_node/*0 = >copy not returned*/, struct typeadapt_member_t * nodeadp/*0 = >no copy is made*/ )
Inserts a new node into the hash table if it is unique.
int insert_exthash( exthash_t * htable, exthash_node_t * new_node )
Inserts a new node into the tree only if it is unique.
int insert_patriciatrie( patriciatrie_t * tree, patriciatrie_node_t * newnode )
Inserts a new node into the tree only if it is unique.
int insert_redblacktree( redblacktree_t * tree, redblacktree_node_t * new_node )
Inserts a new node into the tree only if it is unique.
int insert_splaytree( splaytree_t * tree, splaytree_node_t * new_node, uint16_t nodeoffset, typeadapt_t * typeadp )
Add new element of type IDNAME to end of queue (last).
int insert_syncqueue( syncqueue_t * syncqueue, IDNAME ** newelem )
Allocates new wlist node and inserts it into wlist.
int insert_syncwlist( syncwlist_t * wlist, struct syncqueue_t * queue, /*out*/struct syncevent_t ** newevent )
TODO: describe
int insert_trie( trie_t * trie, uint16_t keylen, const uint8_t key[keylen], void * uservalue )
Add new element to end of queue (last).
int insert2_syncqueue( syncqueue_t * syncqueue, uint8_t elemsize, IDNAME ** newelem )
TODO: describe
int insert2_trie( trie_t * trie, uint16_t keylen, const uint8_t key[keylen], void * uservalue, bool islog )
Inserts new_node after prev_node into the list.
void insertafter_dlist( dlist_t * list, struct dlist_node_t * prev_node, struct dlist_node_t * new_node )
Adds new_node after prev_node into list.
void insertafter_slist( slist_t * list, struct slist_node_t * prev_node, struct slist_node_t * new_node )
Adds thread to list of waiting threads in rwlock.
static inline void insertandwait_rwlock( rwlock_t * rwlock, slist_t * waitlist, thread_t * self )
Inserts new_node before next_node into the list.
void insertbefore_dlist( struct dlist_node_t * next_node, struct dlist_node_t * new_node )
Inserts child into node.
static int insertchild_trienode( trie_node_t * node, uint8_t digit, trie_nodedata_t * child, uint8_t childindex )
Makes new_node the new first element of list.
void insertfirst_dlist( dlist_t * list, struct dlist_node_t * new_node )
Allocates nodesize bytes on the first memory page.
int insertfirst_queue( queue_t * queue, /*out*/void ** nodeaddr, uint16_t nodesize )
Makes new_node the new first element of list.
void insertfirst_slist( slist_t * list, struct slist_node_t * new_node )
Makes new_node the new last element of list.
void insertlast_dlist( dlist_t * list, struct dlist_node_t * new_node )
Allocates nodesize bytes on the last memory page.
int insertlast_queue( queue_t * queue, /*out*/void ** nodeaddr, uint16_t nodesize )
Makes new_node the new last element of list.
void insertlast_slist( slist_t * list, struct slist_node_t * new_node )
Registers an object under an objectid.
int insertobject_x11display( x11display_t * x11disp, struct x11window_t * object, uint32_t objectid )
Installs mm_t which must be of type testmm_t.
static int installnew_testmm( const mm_t * testmm )
Installs the previous mm_t if the current mm is of type testmm_t.
static int installold_testmm( /*out*/mm_t * testmm )
This function is called from init_threadcontext.
struct log_it * interface_logwriter( void )
This function is called from init_threadcontext.
struct mm_it * interface_mmimpl( void )
This function is called from init_threadcontext.
struct objectcache_it * interface_objectcacheimpl( void )
Checks that every bucket points to a correct red black tree.
int invariant_exthash( const exthash_t * htable )
Checks that this tree meets 5 conditions of red-black trees.
int invariant_redblacktree( redblacktree_t * tree )
Checks that nodes of left subtree are smaller and nodes in right subtree are higher than root node.
int invariant_splaytree( splaytree_t * tree, uint16_t nodeoffset, typeadapt_t * typeadp )
Checks that all nodes are stored in correct search order.
int invariant_splaytree( splaytree_t * tree, uint16_t nodeoffset, typeadapt_t * typeadp )
Returns iochannel_t (file descriptor) of the opened directory.
sys_iochannel_t io_directory( const directory_t * dir )
Returns iochannel_t for a file.
sys_iochannel_t io_file( const file_t fileobj )
Returns the file descriptor sys_iochannel_t of the socket.
sys_iochannel_t io_ipsocket( const ipsocket_t * ipsock )
Returns the iochannel_t the content of the buffer is written to.
sys_iochannel_t io_logbuffer( const logbuffer_t * logbuf )
Returns the iochannel_t of signalwait.
sys_iochannel_t io_signalwait( const signalwait_t signalwait )
Returns file descriptor of network connection.
sys_iochannel_t io_x11display( const x11display_t * x11disp )
Declares an interfaceable object of type declared_t.
void iobj_DECLARE( TYPENAME declared_t, IDNAME typenameprefix )
Returns the I/0 error (>0) or 0 if no error occurred.
int ioerror_filereader( const filereader_t * frd )
Returns true if this user is administrator (== root).
bool isadmin_sysuserid( sysuser_id_t uid )
Returns true if all nrbits least significant bits of ptr are zero.
int isaligned_ptr( const ptr_t ptr, unsigned nrbits )
Returns true in case node is pointer to arraysf_mwaybranch_t.
int isbranchtype_arraysfunode( const arraysf_unode_t * node )
Returns true in case node is pointer to arraystf_mwaybranch_t.
int isbranchtype_arraystfunode( const arraystf_unode_t * node )
Returns true if typeadapt_lifetime_it.delete_object is not NULL.
bool iscalldelete_typeadapt( const typeadapt_t * typeadp )
Return true in case child and digit array are encoded in trie_node_t.
static inline int ischild_header( const header_t header )
Return true in case ischild_header or issubnode_header returns true.
static inline int ischildorsubnode_header( const header_t header )
Returns if the socket is connected to a peer.
bool isconnected_ipsocket( const ipsocket_t * ipsock )
Returns true if stack contains no more data.
int isempty_binarystack( const binarystack_t * stack )
Returns true if list contains no elements else false.
int isempty_dlist( const dlist_t * list )
Returns true if the table contains no element.
bool isempty_exthash( const exthash_t * htable )
Returns true if tree contains no elements.
bool isempty_patriciatrie( const patriciatrie_t * tree )
Returns true if queue contains no elements.
bool isempty_queue( const queue_t * queue )
Returns true if tree contains no elements.
bool isempty_redblacktree( const redblacktree_t * tree )
Returns true if list contains no nodes.
int isempty_slist( const slist_t * list )
Returns true if tree contains no elements.
bool isempty_splaytree( const splaytree_t * tree )
Returns true if string has size 0.
bool isempty_string( const string_t * str )
Returns true if wlist contains no elements.
bool isempty_syncwlist( const syncwlist_t * wlist )
Returns true if no thread is waiting else false.
bool isempty_waitlist( waitlist_t * wlist )
Returns true if timer has not fired.
bool isenabled_testerrortimer( const test_errortimer_t * errtimer )
Returns true if end of file is reached.
bool iseof_filereader( const filereader_t * frd )
Returns true if lsysusr equals rsysusr.
bool isequal_sysuser( const sysuser_t * lsysusr, const sysuser_t * rsysusr )
Compares two sysuser_id_t for equality.
bool isequal_sysuserid( sysuser_id_t luid, sysuser_id_t ruid )
Returns true if both typeadapt_t are equal.
bool isequal_typeadapt( const typeadapt_t * ltypeadp, const typeadapt_t * rtypeadp )
Returns true if two typeadapt_gethash_it objects are equal.
bool isequal_typeadaptgethash( const typeadapt_gethash_it * lgethash, const typeadapt_gethash_it * rgethash )
Returns true if both typeadapt_member_ts are equal.
bool isequal_typeadaptmember( const typeadapt_member_t * ltypeadp, const typeadapt_member_t * rtypeadp )
Returns true if both typeadapt_nodeoffset_ts are equal.
bool isequal_typeadaptnodeoffset( const typeadapt_nodeoffset_t lnodeoff, const typeadapt_nodeoffset_t rnodeoff )
Returns true if the two objects refer to the same screen.
bool isequal_x11screen( const x11screen_t * lx11screen, const x11screen_t * rx11screen )
Returns true if two strings compare equal in a case insensitive way.
bool isequalasciicase_string( const string_t * str, const string_t * str2 )
Returns true if the nodesize is lower than maximum size.
static inline int isexpandable_trienodeoffsets( const trie_nodeoffsets_t * offsets )
Returns true if xrandr extension is supported.
bool isextxrandr_x11display( const x11display_t * x11disp )
Returns true if this byte is a possible first (start) byte of an utf-8 encoded multibyte sequence.
bool isfirstbyte_utf8( const uint8_t firstbyte )
Returns true if barray equals blockarray_FREE.
bool isfree_blockarray( const blockarray_t * barray )
Implements file_t.isfree_file.
static inline bool isfree_file( file_t fileobj )
Returns true if the file was opened with init_file.
static inline bool isfree_file( const file_t fileobj )
Returns true in case frd == filereader_FREE.
bool isfree_filereader( const filereader_t * frd )
Implements iochannel_t.isfree_iochannel.
static inline bool isfree_iochannel( iochannel_t ioc )
Returns true if ioc equals iochannel_FREE.
static inline bool isfree_iochannel( const iochannel_t ioc )
Returns true if mblock equals memblock_FREE.
bool isfree_memblock( const memblock_t * mblock )
Returns true if mfile == mmfile_FREE.
bool isfree_mmfile( const mmfile_t * mfile )
Returns true if pgcache equals pagecache_impl_FREE.
bool isfree_pagecacheimpl( const pagecache_impl_t * pgcache )
Returns true if spstr equals splitstring_FREE.
bool isfree_splitstring( const splitstring_t * spstr )
Returns true if string has address and size of 0.
bool isfree_string( const string_t * str )
Returns true if surf->glsurface is set to 0.
bool isfree_surface( const surface_t * surf )
Returns true if syncevent equals to syncevent_FREE.
bool isfree_syncevent( const syncevent_t * syncevent )
Returns true if syncqueue is equal to syncqueue_FREE.
bool isfree_syncqueue( const syncqueue_t * syncqueue )
Returns true if *srun equals to syncrun_FREE.
bool isfree_syncrun( const syncrun_t * srun )
Returns true if sthread is intialized with syncthread_FREE.
bool isfree_syncthread( const syncthread_t * sthread )
Returns true if wlist equals syncwlist_FREE.
bool isfree_syncwlist( const syncwlist_t * wlist )
Returns true if mutex equals thrmutex_FREE.
bool isfree_thrmutex( thrmutex_t * mutex )
Returns true if scan is initialized with utf8scanner_FREE.
bool isfree_utf8scanner( const utf8scanner_t * scan )
Returns true if vmpage equals vmpage_FREE.
bool isfree_vmpage( vmpage_t * vmpage )
Returns true if x11disp is set to x11display_FREE.
static inline bool isfree_x11display( const x11display_t * x11disp )
Returns true if x11win is set to x11window_FREE.
static inline bool isfree_x11window( const x11window_t * x11win )
Uses node to check if last child entry is empty.
static inline bool isfreechild_trienode( trie_node_t * node )
Returns true if iocallback_t.iimpl is not 0.
bool isinit_iocallback( const iocallback_t * iocb )
Returns true if node is stored in a list else false.
bool isinlist_dlist( const struct dlist_node_t * node )
Returns true if node is stored in a list else false.
bool isinlist_slist( struct slist_node_t * node )
Returns true if test memory manager is installed.
bool isinstalled_testmm( void )
Returns true if the socket listens for incoming connections.
bool islisten_ipsocket( const ipsocket_t * ipsock )
Returns true if a thread locked the mutex.
bool islocked_thrmutex( thrmutex_t * mutex )
Returns true if the calling thread is the main thread.
bool ismain_thread( const thread_t * thread )
Returns true is vmpage is mapped whose accessmode equals protection.
bool ismapped_vm( const vmpage_t * vmpage, accessmode_e protection )
Returns true if mappedregions contains a memory region with correct protection.
bool ismapped_vmmappedregions( vm_mappedregions_t * mappedregions, const vmpage_t * mblock, accessmode_e protection )
Returns true if big is negative else false.
bool isnegative_bigint( const bigint_t * big )
Returns true if dec is negative else false.
bool isnegative_decimal( const decimal_t * dec )
Returns true if there is a free buffer available.
bool isnext_filereader( const filereader_t * frd )
Returns true if there are is at least one more unread bytes.
bool isnext_stringstream( const stringstream_t * strstream )
Returns true if there is at least one byte to read.
bool isnext_utf8reader( const utf8reader_t * utfread )
Returns true if the buffer contains at least one more byte.
bool isnext_utf8scanner( const utf8scanner_t * scan )
Returns true if member pagecache_t.object of pgcache is not null.
bool isobject_pagecache( const pagecache_t * pgcache )
Determines if argument is of power of 2 or 0.
int ispowerof2_int( unsigned i )
Returns true if pcontext equals processcontext_INIT_STATIC.
bool isstatic_processcontext( const processcontext_t * pcontext )
Returns true if tcontext == threadcontext_INIT_STATIC.
bool isstatic_threadcontext( const threadcontext_t * tcontext )
Returns true if at least one suffix begins with searchstr.
bool isstring_suffixtree( suffixtree_t * tree, size_t length, const uint8_t searchstr[length] )
Return true in case child array points to trie_subnode_t.
static inline int issubnode_header( const header_t header )
Returns true if memory at vmpage is not mapped.
bool isunmapped_vm( const vmpage_t * vmpage )
Returns true if mappedregions contains no memory region which overlaps with mblock.
bool isunmapped_vmmappedregions( vm_mappedregions_t * mappedregions, const vmpage_t * mblock )
Return true in case node contains member uservalue.
static inline int isuservalue_header( const header_t header )
Uses fcntl to query file descriptor flags (FD_CLOEXEC).
bool isvalid_file( file_t fileobj )
Returns true if fileobj is valid.
bool isvalid_file( const file_t fileobj )
Returns true if ioc is initialized and valid.
bool isvalid_iochannel( const iochannel_t ioc )
Checks that internal fields are ok.
bool isvalid_ipaddr( const ipaddr_t * addr )
Returns true if mblock->addr != 0 and block->size != 0.
bool isvalid_memblock( const memblock_t * mblock )
Returns true if tv contains a valid value.
bool isvalid_timevalue( timevalue_t * tv )
Returns true if the byte is a legal first byte of an utf8 encoded multibyte sequence.
bool isvalidfirstbyte_utf8( const uint8_t firstbyte )
Returns true if window is visible on the screen.
bool isvisible_window( const window_t * win )
Returns true if there is already a waiting thread.
bool iswaiting_syncevent( const syncevent_t * syncevent )
Returns true if mutex is locked and wait list is not empty.
bool iswaiting_thrmutex( thrmutex_t * mutex )
Returns true if there is a single writer holding the lock.
bool iswriter_rwlock( rwlock_t * rwlock )
Returns true in case big has value 0 else false.
bool iszero_bigint( const bigint_t * big )
Returns true if dec has value 0 else false.
bool iszero_decimal( const decimal_t * dec )