Waits for a blocked signal until it has been received.
static int wait_for_signal( int signr )
Waits timeout_ms milliseconds for events and returns them.
int wait_iopoll( iopoll_t * iopoll, /*out*/uint32_t * nr_events, uint32_t queuesize, /*out*/struct ioevent_t * eventqueue/*[queuesize]*/, uint16_t timeout_ms )
Waits until process has terminated.
int wait_process( process_t * process, /*out*/process_result_t * result )
Waits until a signal is received.
int wait_semaphore( semaphore_t * semaobj )
Waits for a realtime signal with number nr.
int wait_signalrt( signalrt_t nr, /*out*/uintptr_t * value )
Waits until timer expires.
int wait_systimer( systimer_t timer )
Suspends the calling thread until some other calls trywakeup_waitlist.
int wait_waitlist( waitlist_t * wlist )
Contains waiting thread (syncwait_t) and its exitevent.
struct wait2queue_entry_t
Implements syncrun_t.waitforevent_syncrun.
#define waitforevent_syncrun( srun, syncevent ) ( __extension__ ({ __label__ waitlabel ; setstatewait_syncrun((srun), (syncevent), __extension__ && waitlabel) ; return 0 ; waitlabel: (void)0 ; }))
Waits for syncevent to be signaled.
void waitforevent_syncrun( syncrun_t * srun, struct syncevent_t * syncevent )
Implements syncrun_t.waitforexit_syncrun.
#define waitforexit_syncrun( srun ) ( __extension__ ({ __label__ waitlabel ; setstatewait_syncrun((srun), srun->running.laststarted, __extension__ && waitlabel) ; return 0 ; waitlabel: retcode_syncrun(srun) ; }))
Waits for the last started thread to exit.
int waitforexit_syncrun( syncrun_t * srun )
Implements syncrun_t.waitforlist_syncrun.
#define waitforlist_syncrun( srun, syncwlist ) ( __extension__ ({ __label__ waitlabel ; setstatewaitlist_syncrun((srun), (syncwlist), __extension__ && waitlabel) ; return 0 ; waitlabel: (void)0 ; }))
Waits for syncwlist to be signaled.
void waitforlist_syncrun( syncrun_t * srun, struct syncwlist_t * syncwlist )
Stores waiting information of the running thread if its state is changed to syncrun_state_WAIT.
struct { struct syncwlist_t * wlist ; struct syncevent_t * event ; void * continuelabel ; } waitinfo
Implements syncevent_t.waiting_syncevent.
#define waiting_syncevent( syncevent ) ((syncevent)->waiting)
Returns the single thread which waits for this event.
syncwait_t * waiting_syncevent( const syncevent_t * syncevent )
Static initializer.
#define waitlist_FREE { 0, 0, 0 }
Allows threads of a single process to wait for a certain condition.
struct waitlist_t
Waits until operation completes.
int waitms_ipsocketasync( ipsocket_async_t * ipsockasync, uint32_t millisec/*0 = > no timeout*/ )
Contains waiting thread (syncwait_t).
struct waitqueue_entry_t
Wait for XRRScreenChangeNotify and checks that x11disp gets updated.
static int waitXRRScreenChangeNotify( x11screen_t * x11screen, x11videomode_t * xvidmode )
Stores information used during wakeup of a thread which waited for an event.
struct { void * continuelabel ; int retcode ; } wakeup
List of syncevent_t.
syncwlist_t wakeup_list
Wakes up all readers waiting in rwlock->readers.
static inline void wakeupreader_rwlock( rwlock_t * rwlock )
Wakes up the first writer stored in list rwlock->writers.
static inline void wakeupwriter_rwlock( rwlock_t * rwlock )
Static initializer for invalid wbuffer_t.
#define wbuffer_FREE { 0, 0, 0, 0 }
Static initializer which wraps a cstring_t object into a wbuffer_t.
#define wbuffer_INIT_CSTRING( cstring ) wbuffer_INIT_OTHER(allocatedsize_cstring(cstring), (uint8_t*)str_cstring(cstring), cstring, &g_wbuffer_cstring)
Static initializer which wraps a memblock_t object into a wbuffer_t.
#define wbuffer_INIT_MEMBLOCK( memblock ) wbuffer_INIT_OTHER(size_memblock(memblock), addr_memblock(memblock), memblock, &g_wbuffer_memblock)
Static initializer to adapt wbuffer_t to own memory implementation object.
#define wbuffer_INIT_OTHER( buffer_size, buffer, impl, iimpl_it ) { (buffer), (buffer) + (buffer_size), (impl), (iimpl_it) }
Static initializer which wraps static memory into a wbuffer_t.
#define wbuffer_INIT_STATIC( buffer_size, buffer ) wbuffer_INIT_OTHER(buffer_size, buffer, buffer, &g_wbuffer_static)
Defines implementation interface for wbuffer_t.
struct wbuffer_it
Supports construction of return values of unknown size.
struct wbuffer_t
Pixel size in horizontal direction.
uint32_t width_in_pixel
Implements window_evh_t.window_evh_DECLARE.
#define window_evh_DECLARE( declared_evh_t, subwindow_t ) typedef struct declared_evh_t declared_evh_t; struct declared_evh_t { void (* onclose) (subwindow_t * win); void (* ondestroy) (subwindow_t * win); void (* onredraw) (subwindow_t * win); void (* onreshape) (subwindow_t * win, uint32_t width, uint32_t height); void (* onvisible) (subwindow_t * win, bool isVisible); }
Declares an interface to handle window events.
void window_evh_DECLARE( TYPENAME declared_evh_t, TYPENAME subwindow_t )
Static initializer.
#define window_evh_INIT( subwindow_fct_suffix ) { & onclose ## subwindow_fct_suffix, & ondestroy ## subwindow_fct_suffix, & onredraw ## subwindow_fct_suffix, & onreshape ## subwindow_fct_suffix, & onvisible ## subwindow_fct_suffix }
Callback interface for handling generic window events.
struct window_evh_t
Static initializer.
#define window_FREE { x11window_FREE, surface_FREE_EMBEDDED }
Wraps a native window and its OpenGL specific wrapper (if needed).
struct window_t
Static initializer to switch on window frame drawn by the window manager.
#define windowconfig_INIT_FRAME { .i32 = windowconfig_FRAME }
Static initializer to set maximum possible size (width, height) of window.
#define windowconfig_INIT_MAXSIZE( maxwidth, maxheight ) { .i32 = windowconfig_MAXSIZE }, { .u16 = maxwidth }, { .u16 = maxheight }
Static initializer to set minimum possible size (width, height) of window.
#define windowconfig_INIT_MINSIZE( minwidth, minheight ) { .i32 = windowconfig_MINSIZE }, { .u16 = minwidth }, { .u16 = minheight }
Static initializer to mark end of configuration list.
#define windowconfig_INIT_NONE { .i32 = windowconfig_NONE }
Static initializer to set initial position (x,y) of window.
#define windowconfig_INIT_POS( x, y ) { .i32 = windowconfig_POS }, { .i32 = x }, { .i32 = y }
Static initializer to set initial size (width, height) of window.
#define windowconfig_INIT_SIZE( width, height ) { .i32 = windowconfig_SIZE }, { .u16 = width }, { .u16 = height }
Static initializer to set initial size of window.
#define windowconfig_INIT_TITLE( title ) { .i32 = windowconfig_TITLE }, { .str = title }
Static initializer to set transparency of window.
#define windowconfig_INIT_TRANSPARENCY( alpha ) { .i32 = windowconfig_TRANSPARENCY }, { .u8 = alpha/*only 0..255*/ }
Type of a single window configuration attribute.
struct windowconfig_t
Static initializer.
#define wlistentry_FREE { 0, 0, syncevent_FREE }
Type of entry stored in syncwlist_t.
struct wlistentry_t
Writes size bytes from buffer to file referenced by fileobj.
int write_file( file_t fileobj, size_t size, const void * buffer/*[size]*/, size_t * bytes_written )
Writes size bytes from buffer to the data stream referenced by ioc.
int write_iochannel( iochannel_t ioc, size_t size, const void * buffer/*[size]*/, /*out*/size_t * bytes_written )
Transfers maxdata_len bytes into internal write (send) queue.
int write_ipsocket( ipsocket_t * ipsock, size_t maxdata_len, const uint8_t data[maxdata_len], /*out*/size_t * bytes_written )
Writes (flushes) the buffer to the configured io channel.
int write_logbuffer( logbuffer_t * logbuf )
Writes errlog to s_unittest_singleton.log_files_directory + “/” + testname.
static int writelogfile_unittest( const char * testname )
Writes a single byte of “out of band” data (urgent data).
int writeoob_ipsocket( ipsocket_t * ipsock, uint8_t data )
The thread which holds entrylock.
struct thread_t * writer
Points to last entry in list of waiting writers.
struct { struct slist_node_t * last ; } writers
Same as write_ipsocket but for unconnected (UDP) sockets.
int writeto_ipsocket( ipsocket_t * ipsock, const struct ipaddr_t * remoteaddr, size_t maxdata_len, const uint8_t data[maxdata_len], /*out*/size_t * bytes_written )