System memory page where free pages are located.
vmpage_t pageblock
Thread local virtual memory page manager.
iobj_DECLARE( , pagecache ) pagecache
Stores information about a block of memory pages.
struct pagecache_block_t
Static configuration of number of bytes used for the hash table.
#define pagecache_blockmap_ARRAYSIZE ( 2*1024*1024 )
Static initializer.
#define pagecache_blockmap_FREE { 0, 0, 0, 0 }
A simple shared hash map which maps an index pagecache_block_t.
struct pagecache_blockmap_t
Size of pages resourceusage_t uses itself.
size_t pagecache_correction
Static initializer.
#define pagecache_FREE iobj_FREE
Static initializer.
#define pagecache_impl_FREE { { 0 }, { { 0 } }, { 0 }, 0, 0 }
pagecache_it_DECLARE( pagecache_impl_it, pagecache_impl_t )
Allocates and frees virtual memory pages and caches them.
struct pagecache_impl_t
Static initializer.
#define pagecache_INIT( object, iimpl ) iobj_INIT(object, iimpl)
Interface which allows to allocate and relase pages of memory.
struct pagecache_it
Implements pagecache_it.pagecache_it_DECLARE.
#define pagecache_it_DECLARE( declared_it, pagecache_t ) typedef struct declared_it declared_it ; struct declared_it { int (*allocpage) (pagecache_t * pgcache, uint8_t pgsize, /*out*/struct memblock_t * page) ; int (*releasepage) (pagecache_t * pgcache, struct memblock_t * page) ; size_t (*sizeallocated) (const pagecache_t * pgcache) ; int (*allocstatic) (pagecache_t * pgcache, size_t bytesize, /*out*/struct memblock_t * memblock) ; int (*freestatic) (pagecache_t * pgcache, struct memblock_t * memblock) ; size_t (*sizestatic) (const pagecache_t * pgcache) ; int (*emptycache) (pagecache_t * pgcache) ; } ;
Declares an interface function table for accessing pagecache.
void pagecache_it_DECLARE( TYPENAME declared_it, TYPENAME pagecache_t )
Static initializer.
#define pagecache_it_FREE { 0, 0, 0, 0, 0, 0, 0 }
Static initializer.
#define pagecache_it_INIT( allocpage_f, releasepage_f, sizeallocated_f, allocstatic_f, sizestatic_f, freestatic_f, emptycache_f ) { (allocpage_f), (releasepage_f), (sizeallocated_f), (allocstatic_f), (sizestatic_f), (freestatic_f), (emptycache_f) }
Implements maincontext_t.pagecache_maincontext.
#define pagecache_maincontext( ) (tcontext_maincontext()->pagecache)
Size of static memory allocated in pagecache_t.
size_t pagecache_staticusage
Uses iobj_DECLARE to declare interfaceable object.
iobj_DECLARE( pagecache_t, pagecache )
Sum of size of all cache memory pages.
size_t pagecache_usage
The size of a memory block.
uint8_t pagesize
Size of a single page stored in freepagelist.
size_t pagesize
Returns the virtual memory page size supported by the underlying system.
uint32_t pagesize_vm( void )
The size of a virtual memory page in bytes.
uint32_t pagesize_vm
Translates enum pagesize_e into size in bytes.
size_t pagesizeinbytes_pagecacheit( pagesize_e pagesize )
Implements queue_t.pagesizeinbytes_queue.
#define pagesizeinbytes_queue( ) (4096u)
Returns the static size of a memory page the queue uses.
uint32_t pagesizeinbytes_queue( void )
Converts error codes from pam lib to errno error codes.
static int pamerr2errno_sysuser( int pamerr )
Points to parent node.
lrptree_node_t * parent
The parent of node.
suffixtree_node_t * parent
Access parent pointer from node.
#define PARENT( node ) ((redblacktree_node_t*) (((uintptr_t)-2) & (uintptr_t)((node)->parent)))
Parses content of “textresource version=’3’ /textresource”.
static int parse_contentversion3_textresourcereader( textresource_reader_t * reader )
Parses all header information.
static int parse_header_textresourcereader( textresource_reader_t * reader )
Parses control information for generated output.
static int parse_outconfigC_utf8reader( textresource_reader_t * reader )
Parses control information for generated output.
static int parse_outconfigCtable_utf8reader( textresource_reader_t * reader )
Skips comments until “textresource version=’4’” is found.
static int parse_version_textresourcereader( textresource_reader_t * reader )
Expects the next character to be of value chr.
static int parsechar_csvfilereaderparsestate( csvfilereader_parsestate_t * state, uint8_t chr )
Parses value between two double quotes.
static int parsedatafield_csvfilereaderparsestate( csvfilereader_parsestate_t * state, /*out*/string_t * value )
Counts the number of data fields of the first line.
static int parsenrcolumns_csvfilereaderparsestate( csvfilereader_parsestate_t * state, /*out*/size_t * nrcolumns )
Implements url_t.passwd_url.
#define passwd_url( url ) getpart_url(url, url_part_PASSWD)
Returns password or NULL if undefined.
const char * passwd_url( const url_t * url )
Returns absolute real path of directory dir in path.
int path_directory( const directory_t * dir, /*ret*/struct wbuffer_t * path )
Implements url_t.path_url.
#define path_url( url ) getpart_url(url, url_part_PATH)
Returns password or NULL if undefined.
const char * path_url( const url_t * url )
Static initializer.
#define patriciatrie_FREE patriciatrie_INIT( 0, typeadapt_member_FREE )
Implements patriciatrie_t.patriciatrie_IMPLEMENT.
#define patriciatrie_IMPLEMENT( _fsuffix, object_t, nodename ) typedef patriciatrie_iterator_t iteratortype##_fsuffix ; typedef object_t * iteratedtype##_fsuffix ; static inline int initfirst##_fsuffix##iterator(patriciatrie_iterator_t * iter, patriciatrie_t * tree) __attribute__ ((always_inline)) ; static inline int initlast##_fsuffix##iterator(patriciatrie_iterator_t * iter, patriciatrie_t * tree) __attribute__ ((always_inline)) ; static inline int free##_fsuffix##iterator(patriciatrie_iterator_t * iter) __attribute__ ((always_inline)) ; static inline bool next##_fsuffix##iterator(patriciatrie_iterator_t * iter, object_t ** node) __attribute__ ((always_inline)) ; static inline bool prev##_fsuffix##iterator(patriciatrie_iterator_t * iter, object_t ** node) __attribute__ ((always_inline)) ; static inline void init##_fsuffix(/*out*/patriciatrie_t * tree, const typeadapt_member_t * nodeadp) __attribute__ ((always_inline)) ; static inline int free##_fsuffix(patriciatrie_t * tree) __attribute__ ((always_inline)) ; static inline void getinistate##_fsuffix(const patriciatrie_t * tree, /*out*/object_t ** root, /*out*/typeadapt_member_t * nodeadp) __attribute__ ((always_inline)) ; static inline bool isempty##_fsuffix(const patriciatrie_t * tree) __attribute__ ((always_inline)) ; static inline int find##_fsuffix(patriciatrie_t * tree, size_t keylength, const uint8_t searchkey[keylength], /*out*/object_t ** found_node) __attribute__ ((always_inline)) ; static inline int insert##_fsuffix(patriciatrie_t * tree, object_t * new_node) __attribute__ ((always_inline)) ; static inline int remove##_fsuffix(patriciatrie_t * tree, size_t keylength, const uint8_t searchkey[keylength], /*out*/object_t ** removed_node) __attribute__ ((always_inline)) ; static inline int removenodes##_fsuffix(patriciatrie_t * tree) __attribute__ ((always_inline)) ; static inline patriciatrie_node_t * asnode##_fsuffix(object_t * object) { static_assert(&((object_t*)0)->nodename == (patriciatrie_node_t*)offsetof(object_t, nodename), "correct type") ; return (patriciatrie_node_t *) ((uintptr_t)object + offsetof(object_t, nodename)) ; } static inline object_t * asobject##_fsuffix(patriciatrie_node_t * node) { return (object_t *) ((uintptr_t)node - offsetof(object_t, nodename)) ; } static inline object_t * asobjectnull##_fsuffix(patriciatrie_node_t * node) { return node ? (object_t *) ((uintptr_t)node - offsetof(object_t, nodename)) : 0 ; } static inline void init##_fsuffix(/*out*/patriciatrie_t * tree, const typeadapt_member_t * nodeadp) { init_patriciatrie(tree, nodeadp) ; } static inline int free##_fsuffix(patriciatrie_t * tree) { return free_patriciatrie(tree) ; } static inline void getinistate##_fsuffix(const patriciatrie_t * tree, /*out*/object_t ** root, /*out*/typeadapt_member_t * nodeadp) { patriciatrie_node_t * rootnode ; getinistate_patriciatrie(tree, &rootnode, nodeadp) ; *root = asobjectnull##_fsuffix(rootnode) ; } static inline bool isempty##_fsuffix(const patriciatrie_t * tree) { return isempty_patriciatrie(tree) ; } static inline int find##_fsuffix(patriciatrie_t * tree, size_t keylength, const uint8_t searchkey[keylength], /*out*/object_t ** found_node) { int err = find_patriciatrie(tree, keylength, searchkey, (patriciatrie_node_t**)found_node) ; if (err == 0) *found_node = asobject##_fsuffix(*(patriciatrie_node_t**)found_node) ; return err ; } static inline int insert##_fsuffix(patriciatrie_t * tree, object_t * new_node) { return insert_patriciatrie(tree, asnode##_fsuffix(new_node)) ; } static inline int remove##_fsuffix(patriciatrie_t * tree, size_t keylength, const uint8_t searchkey[keylength], /*out*/object_t ** removed_node) { int err = remove_patriciatrie(tree, keylength, searchkey, (patriciatrie_node_t**)removed_node) ; if (err == 0) *removed_node = asobject##_fsuffix(*(patriciatrie_node_t**)removed_node) ; return err ; } static inline int removenodes##_fsuffix(patriciatrie_t * tree) { return removenodes_patriciatrie(tree) ; } static inline int initfirst##_fsuffix##iterator(patriciatrie_iterator_t * iter, patriciatrie_t * tree) { return initfirst_patriciatrieiterator(iter, tree) ; } static inline int initlast##_fsuffix##iterator(patriciatrie_iterator_t * iter, patriciatrie_t * tree) { return initlast_patriciatrieiterator(iter, tree) ; } static inline int free##_fsuffix##iterator(patriciatrie_iterator_t * iter) { return free_patriciatrieiterator(iter) ; } static inline bool next##_fsuffix##iterator(patriciatrie_iterator_t * iter, object_t ** node) { bool isNext = next_patriciatrieiterator(iter, (patriciatrie_node_t**)node) ; if (isNext) *node = asobject##_fsuffix(*(patriciatrie_node_t**)node) ; return isNext ; } static inline bool prev##_fsuffix##iterator(patriciatrie_iterator_t * iter, object_t ** node) { bool isNext = prev_patriciatrieiterator(iter, (patriciatrie_node_t**)node) ; if (isNext) *node = asobject##_fsuffix(*(patriciatrie_node_t**)node) ; return isNext ; }
Generates interface of patriciatrie_t storing elements of type object_t.
void patriciatrie_IMPLEMENT( IDNAME _fsuffix, TYPENAME object_t, IDNAME nodename ) ;
Static initializer.
#define patriciatrie_INIT( root, nodeadp ) { root, nodeadp }
Static initializer.
#define patriciatrie_iterator_FREE { 0, 0 }
Iterates over elements contained in patriciatrie_t.
struct patriciatrie_iterator_t
Static initializer.
#define patriciatrie_node_INIT { 0, 0, 0 }
Management overhead of objects which wants to be stored in a patriciatrie_t.
struct patriciatrie_node_t
Static initializer.
#define patriciatrie_prefixiter_FREE { 0, 0, 0 }
Iterates over elements contained in patriciatrie_t.
struct patriciatrie_prefixiter_t
Implements a trie with path compression.
struct patriciatrie_t
Points to shared processcontext_t.
struct processcontext_t * pcontext
Inline implementation of maincontext_t.pcontext_maincontext.
#define pcontext_maincontext( ) (tcontext_maincontext()->pcontext)
Returns processcontext_t of the current process.
processcontext_t * pcontext_maincontext( void )
Converts the next char_count characters without modifying conv.
extern int peek_convertwchar( const convert_wchar_t * conv, size_t char_count, wchar_t * wchar_array )
Implements utf8reader_t.peekascii_utf8reader.
#define peekascii_utf8reader( utfread, nextascii ) ( __extension__ ({ int _err2 ; typeof(utfread) _rd2 = (utfread) ; if (isnext_utf8reader(_rd2)) { *(nextascii) = *_rd2->next ; _err2 = 0 ; } else { _err2 = ENODATA ; } _err2 ; }))
Returns next ascii character.
int peekascii_utf8reader( const utf8reader_t * utfread, uint8_t * nextascii )
Implements utf8reader_t.peekasciiatoffset_utf8reader.
#define peekasciiatoffset_utf8reader( utfread, offset, nextascii ) ( __extension__ ({ typeof(utfread) _rd2 = (utfread) ; int _err2 ; size_t _off2 = (offset) ; size_t _size = unreadsize_utf8reader(_rd2) ; if (_size > _off2) { *(nextascii) = _rd2->next[_off2] ; _err2 = 0 ; } else { _err2 = ENODATA ; } _err2 ; }))
Returns next ascii character with an offset if offset bytes.
int peekasciiatoffset_utf8reader( const utf8reader_t * utfread, size_t offset, uint8_t * nextascii )
Returns any byte from the buffer without changing the read pointer.
uint8_t peekbyte_utf8scanner( utf8scanner_t * scan, size_t offset )
Implements stringstream_t.peekutf8_stringstream.
#define peekutf8_stringstream( strstream, uchar ) ( __extension__ ({ stringstream_t * _strstr = (strstream) ; nextutf8_stringstream( &(stringstream_t) stringstream_INIT( _strstr->next, _strstr->end), uchar) ; }))
Same as nextutf8_stringstream except the strstream is not changed.
int peekutf8_stringstream( const struct stringstream_t * strstream, /*out*/char32_t * uchar )
Static initializer.
#define pixelbuffer_FREE surface_FREE
Wraps a native OpenGL off-screen pixel buffer.
struct pixelbuffer_t
Dummy type which represents the operating system platform.
struct platform_t
Implements binarystack_t.pop_binarystack.
#define pop_binarystack( stack, size ) ( __extension__ ({ int _err ; binarystack_t * _stack = (stack) ; uint32_t _size = (size) ; if (_stack->blocksize - _stack->freeblocksize > _size) { _stack->freeblocksize += _size ; _err = 0 ; } else { _err = pop2_binarystack(_stack, _size) ; } _err ; }))
Removes the last pushed object from the stack.
int pop_binarystack( binarystack_t * stack, size_t size )
Same functionality as pop_binarystack.
int pop2_binarystack( binarystack_t * stack, size_t size )
Returns the port number of the address.
ipport_t port_ipaddr( const ipaddr_t * addr )
Implements url_t.port_url.
#define port_url( url ) getpart_url(url, url_part_PORT)
Returns port or NULL if undefined.
const char * port_url( const url_t * url )
Index of node stored in arraysf_t.
size_t pos
Position in suffixtree_t where the next character is added.
suffixtree_pos_t pos
Implements window_t.pos_window.
#define pos_window( win, screen_x, screen_y ) pos_x11window(os_window(win), screen_x, screen_y)
Returns the position of the window in screen coordinates.
int pos_window( const window_t * win, /*out*/int32_t * screen_x, /*out*/int32_t * screen_y )
Implements x11window_t.pos_x11window.
#define pos_x11window( x11win, screen_x, screen_y ) (geometry_x11window(x11win, screen_x, screen_y, 0, 0))
Returns the position of the window in screen coordinates.
int pos_x11window( const x11window_t * x11win, /*out*/int32_t * screen_x, /*out*/int32_t * screen_y )
The number of bits pos index of arraysf_node_t is shifted right before it is used modulo toplevelsize to access root.
uint32_t posshift:8
Calculates pow(10, exponent) for 0 <= exponent <= 9.
static inline uint32_t power10_decimalhelper( unsigned exponent )
Implements hwcache_t.prefetchdata_hwcache.
#define prefetchdata_hwcache( addr ) (__builtin_prefetch((addr), 0/*read*/, 3/*put data in all cache levels*/))
Prefetches data into all levels of hw cache.
void prefetchdata_hwcache( void * addr )
Returns ptr to digit array.
static inline uint8_t * prefix_trienode( trie_node_t * node )
Sum of length of strings on the path from root up to next_child.
size_t prefixlen
Inits test of system-malloc.
int prepare_malloc( void )
Sets all values in srun->running (syncrun_t.running).
static inline int preparerun_syncrun( syncrun_t * srun, syncthread_t * running_thread )
Sets all values in srun->wakeup (syncrun_t.wakeup).
static inline void preparewakeup_syncrun( syncrun_t * srun, void * continuelabel, int retcode )
Points to previous node in the list.
dlist_node_t * prev
PRev memory page in list of pages.
struct dlist_node_t * prev
Implements dlist_t.prev_dlist.
#define prev_dlist( node ) ((node)->prev)
Returns the node coming before this node.
struct dlist_node_t * prev_dlist( struct dlist_node_t * node )
Implements dlist_iterator_t.prev_dlistiterator.
#define prev_dlistiterator( iter, node ) ( __extension__ ({ typeof(iter) _iter = (iter) ; bool _isNext = (0 != _iter->next) ; if (_isNext) { *(node) = _iter->next ; _iter->next = prev_dlist(_iter->next) ; if (_iter->list->last == _iter->next) { _iter->next = 0 ; } } _isNext ; }))
Returns all elements from last to first node of list.
bool prev_dlistiterator( dlist_iterator_t * iter, /*out*/struct dlist_node_t ** node )
Returns next node of tree in descending order.
bool prev_patriciatrieiterator( patriciatrie_iterator_t * iter, /*out*/patriciatrie_node_t ** node )
Returns next node of tree in descending order.
bool prev_redblacktreeiterator( redblacktree_iterator_t * iter, /*out*/redblacktree_node_t ** node )
Returns next node of tree in descending order.
bool prev_splaytreeiterator( splaytree_iterator_t * iter, /*out*/splaytree_node_t ** node )
Column number of the last character on the previous line.
size_t prevlastcolumn
Implements textpos_t.prevlastcolumn_textpos.
#define prevlastcolumn_textpos( txtpos ) ((txtpos)->prevlastcolumn)
Returns the column number of the last character of the previous line (number).
size_t prevlastcolumn_textpos( const textpos_t * txtpos )
Prints formatted error string.
static void print_error( const char * format, ... )
Prints usage information.
static void print_usage( void )
Prints version information
static void print_version( void )
Log value of variable stored in array at offset i.
#define PRINTARRAYFIELD_ERRLOG( format, arrname, index ) PRINTARRAYFIELD_LOG(log_channel_ERR, format, arrname, index)
Log value of variable stored in array at offset i.
#define PRINTARRAYFIELD_LOG( LOGCHANNEL, format, arrname, index ) PRINTF_LOG(LOGCHANNEL, log_flags_NONE, 0, #arrname "[%d]=%" format "\n", i, (arrname)[i])
Log “name=value” of string variable.
#define PRINTCSTR_ERRLOG( varname ) PRINTCSTR_LOG(log_channel_ERR, varname)
Log “name=value” of string variable.
#define PRINTCSTR_LOG( LOGCHANNEL, varname ) PRINTVAR_LOG(LOGCHANNEL, "s", varname, )
Log “name=value” of double or float variable.
#define PRINTDOUBLE_ERRLOG( varname ) PRINTDOUBLE_LOG(log_channel_ERR, varname)
Log “name=value” of double or float variable.
#define PRINTDOUBLE_LOG( LOGCHANNEL, varname ) PRINTVAR_LOG(LOGCHANNEL, "g", varname, )
Writes a new log entry to in internal buffer.
void ( * printf ) (void * log, uint8_t channel, uint8_t flags, const log_header_t * header, const char * format, ... ) __attribute__ ((__format__ (__printf__, 5, 6)))
Logs a generic printf type format string as error.
#define PRINTF_ERRLOG( ... ) PRINTF_LOG(log_channel_ERR, log_flags_NONE, 0, __VA_ARGS__)
Logs a generic printf type format string.
#define PRINTF_LOG( LOGCHANNEL, FLAGS, HEADER, ... ) do { log_maincontext().iimpl->printf( log_maincontext().object, LOGCHANNEL, FLAGS, HEADER, __VA_ARGS__ ) ; } while(0)
Writes new log entry to log buffer.
void printf_logbuffer( logbuffer_t * logbuf, const char * format, ... ) __attribute__ ((__format__ (__printf__, 2, 3)))
Writes new log entry to internal buffer.
void printf_logwriter( logwriter_t * lgwrt, uint8_t channel, uint8_t flags, const struct log_header_t * header, const char * format, ... ) __attribute__ ((__format__ (__printf__, 5, 6)))
Appends printf formatted string to cstr.
int printfappend_cstring( cstring_t * cstr, const char * format, ... ) __attribute__ ((__format__ (__printf__, 2, 3)))
Appends header to log buffer.
void printheader_logbuffer( logbuffer_t * logbuf, const struct log_header_t * header )
Log “name=value” of int variable.
#define PRINTINT_ERRLOG( varname ) PRINTINT_LOG(log_channel_ERR, varname)
Log “name=value” of int variable.
#define PRINTINT_LOG( LOGCHANNEL, varname ) PRINTVAR_LOG(LOGCHANNEL, "d", varname, )
Log “name=value” of int variable.
#define PRINTINT64_ERRLOG( varname ) PRINTINT64_LOG(log_channel_ERR, varname)
Log “name=value” of int64_t variable.
#define PRINTINT64_LOG( LOGCHANNEL, varname ) PRINTVAR_LOG(LOGCHANNEL, PRId64, varname, )
Log “name=value” of pointer variable.
#define PRINTPTR_ERRLOG( varname ) PRINTPTR_LOG(log_channel_ERR, varname)
Log “name=value” of pointer variable.
#define PRINTPTR_LOG( LOGCHANNEL, varname ) PRINTVAR_LOG(LOGCHANNEL, "p", varname, (const void*))
Log “name=value” of size_t variable.
#define PRINTSIZE_ERRLOG( varname ) PRINTSIZE_LOG(log_channel_ERR, varname)
Log “name=value” of size_t variable.
#define PRINTSIZE_LOG( LOGCHANNEL, varname ) PRINTVAR_LOG(LOGCHANNEL, PRIuSIZE, varname, )
Writes text resource as new log entry to in internal buffer.
void ( * printtext ) (void * log, uint8_t channel, uint8_t flags, const log_header_t * header, log_text_f textf, ... )
Logs an TEXTID from C-kern/resource/errlog.text.
#define PRINTTEXT_ERRLOG( TEXTID, ... ) do { PRINTTEXT_LOG( log_channel_ERR, log_flags_NONE, 0, TEXTID ## _ERRLOG, __VA_ARGS__) ; } while(0)
Logs a text resource string.
#define PRINTTEXT_LOG( LOGCHANNEL, FLAGS, HEADER, TEXTID, ... ) do { if (0) { test for correct parameter TEXTID( (struct logbuffer_t*)0 , ## __VA_ARGS__) ; } log_maincontext().iimpl->printtext( log_maincontext().object, LOGCHANNEL, FLAGS, HEADER, & v ## TEXTID, __VA_ARGS__) ; } while(0)
Writes a text resource to internal buffer.
void printtext_logwriter( logwriter_t * lgwrt, uint8_t channel, uint8_t flags, const struct log_header_t * header, log_text_f textf, ... )
Logs a text resource string.
#define PRINTTEXT_NOARG_LOG( LOGCHANNEL, FLAGS, HEADER, TEXTID ) do { if (0) { test for correct parameter TEXTID( (struct logbuffer_t*)0) ; } log_maincontext().iimpl->printtext( log_maincontext().object, LOGCHANNEL, FLAGS, HEADER, & v ## TEXTID) ; } while(0)
Logs an TEXTID from C-kern/resource/errlog.text to log_channel_USERERR.
#define PRINTTEXT_USER_ERRLOG( TEXTID, ... ) do { PRINTTEXT_LOG( log_channel_USERERR, log_flags_NONE, 0, TEXTID ## _ERRLOG, __VA_ARGS__) ; } while(0)
Log “name=value” of uint16_t variable.
#define PRINTUINT16_ERRLOG( varname ) PRINTUINT16_LOG(log_channel_ERR, varname)
Log “name=value” of uint16_t variable.
#define PRINTUINT16_LOG( LOGCHANNEL, varname ) PRINTVAR_LOG(LOGCHANNEL, PRIu16, varname, )
Log “name=value” of uint32_t variable.
#define PRINTUINT32_ERRLOG( varname ) PRINTUINT32_LOG(log_channel_ERR, varname)
Log “name=value” of uint32_t variable.
#define PRINTUINT32_LOG( LOGCHANNEL, varname ) PRINTVAR_LOG(LOGCHANNEL, PRIu32, varname, )
Log “name=value” of uint64_t variable.
#define PRINTUINT64_ERRLOG( varname ) PRINTUINT64_LOG(log_channel_ERR, varname)
Log “name=value” of uint64_t variable.
#define PRINTUINT64_LOG( LOGCHANNEL, varname ) PRINTVAR_LOG(LOGCHANNEL, PRIu64, varname, )
Log “name=value” of uint8_t variable.
#define PRINTUINT8_ERRLOG( varname ) PRINTUINT8_LOG(log_channel_ERR, varname)
Log “name=value” of uint8_t variable.
#define PRINTUINT8_LOG( LOGCHANNEL, varname ) PRINTVAR_LOG(LOGCHANNEL, PRIu8, varname, )
Logs “<varname>=varvalue” of a variable with name varname.
#define PRINTVAR_LOG( LOGCHANNEL, format, varname, cast ) PRINTF_LOG(LOGCHANNEL, log_flags_NONE, 0, #varname "=%" format "\n", cast (varname))
printf unsigned int format specifier ‘zu’ for type size_t.
#define PRIuSIZE "zu"
Implement sysuser_t.privileged_sysuser.
#define privileged_sysuser( sysusr ) ((sysusr)->privilegeduser)
Returns sysuser_id_t of the user which has other privileges.
sysuser_id_t privileged_sysuser( sysuser_t * sysusr )
Contains privileged user which is set at process creation from the system.
sysuser_id_t privilegeduser
printf hexadecimal format specifier for type uintptrf_t.
#define PRIxFCT PRIxPTR
The Linux system file containing the currently mapped memory regions and their access permissions of this process.
#define PROC_SELF_MAPS "/proc/self/maps"
Static initializer.
#define process_FREE sys_process_FREE
Holds result of terminated process.
struct process_result_t
Static initializer lets new process write and read from null device.
#define process_stdio_INIT_DEVNULL { sys_iochannel_FREE, sys_iochannel_FREE, sys_iochannel_FREE }
Static initializer lets new process inherit standard io channels.
#define process_stdio_INIT_INHERIT { sys_iochannel_STDIN, sys_iochannel_STDOUT, sys_iochannel_STDERR }
The process standard io channel redirections.
struct process_stdio_t
Represents system specific process.
typedef sys_process_t process_t
Defines function type executed by process_t.
typedef int ( * process_task_f ) (void * task_arg)
Implements test_errortimer_t.process_testerrortimer.
#define process_testerrortimer( errtimer ) ( __extension__ ({ test_errortimer_t * _tm = (errtimer) ; int _err ; if ( _tm->timercount && ! (-- _tm->timercount)) { _err = _tm->errcode ; } else { _err = 0 ; } _err ; }))
Returns error if timer has elapsed else 0.
int process_testerrortimer( test_errortimer_t * errtimer )
Implements test_errortimer_t.PROCESS_testerrortimer.
#define PROCESS_testerrortimer( errtimer ) (process_testerrortimer(errtimer))
This function calls <process_testerrortimer>(errtimer) and returns its value.
int PROCESS_testerrortimer( test_errortimer_t * errtimer )
Static initializer.
#define processcontext_INIT_STATIC { 0, 0, errorcontext_INIT_STATIC, 0, 0 }
Defines the number of bytes needed from processcontext_t.
#define processcontext_STATICSIZE ( sizeof(sysuser_t) + sizeof(valuecache_t) + sizeof(pagecache_blockmap_t) )
Defines computing environment / context which is shared between all threads of computation.
struct processcontext_t
Inline implementation of maincontext_t.progname_maincontext.
#define progname_maincontext( ) (self_maincontext()->progname)
Returns the program name of the running process.
const char * progname_maincontext( void )
Sets protection of memory (e.g.
int protect_vmpage( vmpage_t * vmpage, const accessmode_e access_mode )
Gives protection (access rights) of the memory block.
accessmode_e protection
Same as ipaddr_t.protocol.
uint16_t protocol
Indicates a specific internet protocol.
uint16_t protocol
Returns the specified protocol for this ip address.
ipprotocol_e protocol_ipaddr( const ipaddr_t * addr )
Returns protocol ipprotocol_e of the socket.
uint16_t protocol_ipsocket( const ipsocket_t * ipsock )
Allows to store the id value as pointer type.
void * ptr
Static initializer.
#define ptr_FREE { 0 }
Defines generic pointer type which points to data in memory.
typedef void * ptr_t
Alignment of trie_nodedata_t.uservalue.
#define PTRALIGN ( offsetof(trie_nodedata_t, uservalue) )
A memory block which contains pointers to other ptrblock_t or datablock_t.
struct ptrblock_t
Allocates memory for new object and returns pointer to its start address.
int push_binarystack( binarystack_t * stack, /*out*/void ** lastpushed )
Does same as push_binarystack but allocates a new block if necessary.
int push2_binarystack( binarystack_t * stack, uint32_t size, /*out*/uint8_t ** lastpushed )
Creates new suffixtree_iterator_t and pushes onto suffixtreeiterator_list_t.
static suffixtree_iterator_t * pushnew_iterlist( slist_t * stack )