The function suspends execution of the caller until threadobj terminates.
int join_thread( thread_t * threadobj )
Returns the last element in the list.
struct dlist_node_t * last_dlist( dlist_t * list )
Returns the last element or 0.
void * last_queue( const queue_t * queue, uint16_t nodesize )
Returns the last node in the list.
struct slist_node_t * last_slist( const slist_t * list )
Returns pointer to last contained syncevent_t.
struct syncevent_t * last_syncwlist( const syncwlist_t * wlist )
Returns the number of elements stored in the queue.
size_t len_syncqueue( const syncqueue_t * syncqueue )
Returns the number of inserted events.
size_t len_syncwlist( const syncwlist_t * wlist )
Returns the number of elements stored in the array.
size_t length_arraysf( arraysf_t * array )
Returns the number of elements stored in the array.
size_t length_arraystf( arraystf_t * array )
Returns number of UTF-8 characters encoded in string buffer.
size_t length_utf8( const uint8_t * strstart, const uint8_t * strend )
Returns the number of syncthreads which are started but not run at least once.
size_t leninitqueue_syncrun( const syncrun_t * srun )
Returns the number of bytes the encoded prefix uses.
static inline uint8_t lenprefix_trienodeoffsets( const trie_nodeoffsets_t * offsets )
Returns the number of syncthreads which are run at least once.
size_t lenrunqueue_syncrun( const syncrun_t * srun )
Returns sizeof(void*) if uservalue is available else 0.
static inline uint8_t lenuservalue_trienodeoffsets( const trie_nodeoffsets_t * offsets )
Returns the number of syncthreads which are waiting for an event.
size_t lenwaitqueue_syncrun( const syncrun_t * srun )
Converts little_endian_val from little-endian byte order to host byte order.
unsigned letoh_int( unsigned little_endian_val )
Implements typeadapt_lifetime_it.delete_object.
int lifetime_deleteobj_typeadaptimpl( typeadapt_impl_t * typeadp, struct typeadapt_object_t ** object )
Implements typeadapt_lifetime_it.newcopy_object.
int lifetime_newcopyobj_typeadaptimpl( typeadapt_impl_t * typeadp, /*out*/struct typeadapt_object_t ** destobject, const struct typeadapt_object_t * srcobject )
Returns the current line number beginning from 1.
size_t line_textpos( const textpos_t * txtpos )
Returns the line nr of the current readng position.
size_t line_utf8reader( const utf8reader_t * utfread )
Loads content of file and appends it to result.
int load_file( const char * filepath, /*ret*/struct wbuffer_t * result, struct directory_t * relative_to )
Returns local ip address in localaddr.
int localaddr_ipsocket( const ipsocket_t * ipsock, struct ipaddr_t * localaddr )
See objectcache_impl_t.lockiobuffer_objectcacheimpl for an implementation.
void ( * lock_iobuffer ) (struct objectcache_t * cache, /*out*/struct memblock_t ** iobuffer)
Locks a mutex.
int lock_mutex( mutex_t * mutex )
Locks the mutex.
int lock_thrmutex( thrmutex_t * mutex )
Wait until rwlock->lockflag is cleared and set it atomically.
static inline void lockflag_rwlock( rwlock_t * rwlock )
Wait until thread->lockflag (lockflag) is cleared and set it atomically.
void lockflag_thread( thread_t * thread )
Waits until mutex->lockflag is cleared and sets it atomically.
static inline void lockflag_thrmutex( thrmutex_t * mutex )
Wait until wlist->lockflag is cleared and set it atomically.
static inline void lockflag_waitlist( waitlist_t * wlist )
Returns the thread which locked the mutex.
struct thread_t * lockholder_thrmutex( thrmutex_t * mutex )
Locks the io buffer and returns a pointer to it in iobuffer.
void lockiobuffer_objectcacheimpl( objectcache_impl_t * objectcache, /*out*/struct memblock_t ** iobuffer )
Acquire entrylock, increment nrofreader and release entrylock.
int lockreader_rwlock( rwlock_t * rwlock )
Acquire entrylock, sets writer to seld and wait until nrofreader == 0.
int lockwriter_rwlock( rwlock_t * rwlock )
Declares a function table for accessing a log service.
void log_it_DECLARE( TYPENAME declared_it, TYPENAME log_t )
Returns the logarithm to base 2 as integer of an integer value.
unsigned log10_int( unsigned i )
Uses s_pow10 table to decrement result if necessary.
unsigned log10_int32( uint32_t i )
Implements log10_int for 32 bit values.
unsigned log10_int32( uint32_t i )
Uses s_pow10 table to decrement result if necessary.
unsigned log10_int64( uint64_t i )
Implements log10_int for 64 bit values.
unsigned log10_int64( uint64_t i )
Returns the logarithm to base 2 as integer of an integer value.
unsigned log2_int( unsigned i )
Returns log2_int of pagesize_vm.
uint8_t log2pagesize_vm( void )
Logs a formatted string.
void logf_unittest( const char * format, ... ) __attribute__ ((__format__ (__printf__, 1, 2)))
Logs “filename:<line_number>: <msg>\n”.
void logfailed_unittest( const char * filename, unsigned line_number, const char * msg )
Logs “filename:<line_number>: UNEXPECTED VALUE <value>\n”.
void logfailedunexpected_unittest( const char * filename, unsigned line_number, const char * format, ... ) __attribute__ ((__format__ (__printf__, 3, 4)))
Logs “OK\n” or “FAILED\n”.
void logresult_unittest( bool isFailed )
Logs “RUN %s: “.
void logrun_unittest( const char * testname )
Logs how many tests passed and how many failed.
void logsummary_unittest( void )
Writes “varname: [tcp|udp]://[ip]:[port]” to logchannel.
void logurl_ipaddr( const ipaddr_t * addr, const char * varname, uint8_t logchannel )
Returns the value of all nrbits least significant bits of ptr.
int lsbits_ptr( const ptr_t ptr, unsigned nrbits )