Returns index into table s_decimal_powbase.
static inline unsigned tableindex_decimalpowbase( uint32_t bigintsize )
Returns index into table s_decimal_powbase.
static inline unsigned tableindexfromdecsize_decimalpowbase( uint32_t decsize )
Returns size in bytes of csvfilereader_t.tablevalues.
static inline size_t tablesize_csvfilereader( csvfilereader_t * csvfile )
Returns threadcontext_t of the current thread.
threadcontext_t * tcontext_maincontext( void )
Test call functions of mm_t.
static int test_call( void )
Evaluate f(a = 77617, b = 33096)
static int test_example1( void )
static int test_fromutf8( void )
Tests generic functions of iobj_t.
static int test_generic( void )
Tests lifetime functions of iobj_t.
static int test_initfree( void )
Test runall_syncrun with all possible state transitions.
static int test_run( void )
Test correct variable values of a single thread in every posible state.
static int test_run2( void )
Returns the current textposition from utfread.
const textpos_t * textpos_utf8reader( const utf8reader_t * utfread )
Returns pointer to syncwait->thread (see syncwait_t.thread).
syncthread_t * thread_syncwait( syncwait_t * syncwait )
Returns pointer to thread_t stored in thread local storage.
struct thread_t * thread_threadtls( const thread_tls_t * tls )
Returns the thread id of the calling thread.
size_t threadid_maincontext( void )
Returns in stackmem the thread stack from tls.
void threadstack_threadtls( const thread_tls_t * tls, /*out*/struct memblock_t * stackmem )
Returns the thread stack from tls.
void threadstack_threadtls( const thread_tls_t * tls, /*out*/struct memblock_t * stackmem )
Returns the absolute time value of the underlying clock.
int time_sysclock( sysclock_e clock_type, /*out*/struct timevalue_t * clock_time )
Returns the maximum value timespec->tv_sec can hold.
static inline uint64_t timespec_MAXSECONDS( void )
Converts struct timespec into timevalue_t.
static inline void timespec2timevalue_sysclock( /*out*/timevalue_t * tval, const struct timespec * tspec )
Converts struct timespec into timevalue_t.
static inline void timespec2timevalue_systimer( /*out*/timevalue_t * tval, const struct timespec * tspec )
Returns the window title string in title encoded in UTF-8.
int title_x11window( const x11window_t * x11win, /*ret*/struct cstring_t * title )
Converts dec to cstring_t.
int tocstring_decimal( const decimal_t * dec, struct cstring_t * cstr )
Converts a big integer value into a double.
double todouble_bigint( const bigint_t * big )
Returns the start address in memory of the last pushed object.
void * top_binarystack( binarystack_t * stack )
Transfer ownership of all nodes from fromlist to tolist.
void transfer_dlist( dlist_t * tolist, dlist_t * fromlist )
Transfers all nodes from fromwlist to towlist.
int transferall_syncwlist( syncwlist_t * towlist, syncwlist_t * fromwlist )
Transfers the first node from fromwlist to towlist.
int transferfirst_syncwlist( syncwlist_t * towlist, syncwlist_t * fromwlist )
Frees preallocated memory which is not in use.
int trimmemory_malloc( void )
Adapts size of cstr to a smaller value.
int truncate_cstring( cstring_t * cstr, size_t new_size )
Truncates file to file_size bytes.
int truncate_file( file_t fileobj, off_t file_size )
Tries to grow the upper bound of an already mapped address range.
int tryexpand_vmpage( vmpage_t * vmpage, size_t size_in_bytes )
Extends prefix with new head prefix1[len-1] + prefix2.
static int tryextendprefix_trienode( trie_node_t * node, uint8_t len, uint8_t prefix1[len-1], uint8_t prefix2/*single digit*/ )
Maps an objectid to its associated object pointer.
int tryfindobject_x11display( x11display_t * x11disp, /*out*/struct x11window_t ** object/*could be NULL*/, uint32_t objectid )
Same as insert_arraysf but no error log in case of EEXIST.
int tryinsert_arraysf( arraysf_t * array, struct arraysf_node_t * node, /*out; err*/struct arraysf_node_t ** inserted_or_existing_node, struct typeadapt_member_t * nodeadp/*0 = >no copy is made*/ )
Same as insert_arraystf but no error log in case of EEXIST.
int tryinsert_arraystf( arraystf_t * array, struct arraystf_node_t * node, /*out; err*/struct arraystf_node_t ** inserted_or_existing_node, struct typeadapt_member_t * nodeadp/*0 = >no copy is made*/ )
TODO: describe
int tryinsert_trie( trie_t * trie, uint16_t keylen, const uint8_t key[keylen], void * uservalue )
Checks that file_path refers to an existing file or directory.
int trypath_directory( const directory_t * dir/*0 = > current working directory*/, const char * const file_path )
Same as remove_arraysf but no error log in case of ESRCH.
int tryremove_arraysf( arraysf_t * array, size_t pos, /*out*/struct arraysf_node_t ** removed_node )
Same as remove_arraystf but no error log in case of ESRCH.
int tryremove_arraystf( arraystf_t * array, size_t size, const uint8_t keydata[size], /*out*/struct arraystf_node_t ** removed_node )
TODO: describe
int tryremove_trie( trie_t * trie, uint16_t keylen, const uint8_t key[keylen], /*out*/void ** uservalue )
Same as skipbytes_stringstream but checks the number of unread bytes before.
int tryskipbytes_stringstream( stringstream_t * strstream, size_t size )
The function returns 0 if the calling thread has been resumed.
int trysuspend_thread( void )
Polls the queue for a single realtime signal.
int trywait_signalrt( signalrt_t nr, /*out*/uintptr_t * value )
Tries to wake up the first waiting thread.
int trywakeup_waitlist( waitlist_t * wlist, int (*main_task)(void * main_arg), void * main_arg )
Returns type context_e of current maincontext_t.
maincontext_e type_maincontext( void )
Declares a derived interface from generic typeadapt_t.
void typeadapt_DECLARE( TYPENAME typeadapter_t, TYPENAME object_t, TYPENAME key_t )
Embeds the public interface part from generic typeadapt_t.
void typeadapt_EMBED( TYPENAME typeadapter_t, TYPENAME object_t, TYPENAME key_t )