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 }
Static initializer.
#define pagecache_FREE iobj_FREE
Static initializer.
#define pagecache_impl_FREE { { 0 }, { { 0 } }, { 0 }, 0, 0 }
Static initializer.
#define pagecache_INIT( object, iimpl ) iobj_INIT(object, iimpl)
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) ; } ;
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)
Implements queue_t.pagesizeinbytes_queue.
#define pagesizeinbytes_queue( ) (4096u)
Access parent pointer from node.
#define PARENT( node ) ((redblacktree_node_t*) (((uintptr_t)-2) & (uintptr_t)((node)->parent)))
Implements url_t.passwd_url.
#define passwd_url( url ) getpart_url(url, url_part_PASSWD)
Implements url_t.path_url.
#define path_url( url ) getpart_url(url, url_part_PATH)
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 }
Static initializer.
#define patriciatrie_node_INIT { 0, 0, 0 }
Static initializer.
#define patriciatrie_prefixiter_FREE { 0, 0, 0 }
Inline implementation of maincontext_t.pcontext_maincontext.
#define pcontext_maincontext( ) (tcontext_maincontext()->pcontext)
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 ; }))
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 ; }))
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) ; }))
Static initializer.
#define pixelbuffer_FREE surface_FREE
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 ; }))
Implements url_t.port_url.
#define port_url( url ) getpart_url(url, url_part_PORT)
Implements window_t.pos_window.
#define pos_window( win, screen_x, screen_y ) pos_x11window(os_window(win), screen_x, screen_y)
Implements x11window_t.pos_x11window.
#define pos_x11window( x11win, screen_x, screen_y ) (geometry_x11window(x11win, screen_x, screen_y, 0, 0))
Implements hwcache_t.prefetchdata_hwcache.
#define prefetchdata_hwcache( addr ) (__builtin_prefetch((addr), 0/*read*/, 3/*put data in all cache levels*/))
Implements dlist_t.prev_dlist.
#define prev_dlist( node ) ((node)->prev)
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 ; }))
Implements textpos_t.prevlastcolumn_textpos.
#define prevlastcolumn_textpos( txtpos ) ((txtpos)->prevlastcolumn)
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, )
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)
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, )
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)
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)
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
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 }
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 ; }))
Implements test_errortimer_t.PROCESS_testerrortimer.
#define PROCESS_testerrortimer( errtimer ) (process_testerrortimer(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) )
Inline implementation of maincontext_t.progname_maincontext.
#define progname_maincontext( ) (self_maincontext()->progname)
Static initializer.
#define ptr_FREE { 0 }
Alignment of trie_nodedata_t.uservalue.
#define PTRALIGN ( offsetof(trie_nodedata_t, uservalue) )