le_fdMonitor.h
Go to the documentation of this file.
14 * shared with other components, the other components won't run when needed. To avoid this, Legato15 * has methods to monitor fds reporting related events so they won't interfere with other software80 * Pipe fd events indicate two conditions for reading from a pipe and two conditions for writing to94 * Socket activity (establishing/closing) is monitored for connection-orientated sockets including98 * | ---------------------------- | ------------------------------------------------------------ |103 * | POLLIN + POLLOUT + POLLRDHUP | Peer closed the connection in a connection-orientated socket |109 * generated to indicate the closure. POLLIN, POLLOUT and POLLPRI are the event indicators related164 * and le_fdMonitor_Disable(). However, @c POLLRDHUP, @c POLLERR and @c POLLHUP can't be disabled.266 * It's not recommended to monitor the same fd in two threads at the same time, because the threads279 //--------------------------------------------------------------------------------------------------291 //--------------------------------------------------------------------------------------------------297 //--------------------------------------------------------------------------------------------------301 //--------------------------------------------------------------------------------------------------339 //--------------------------------------------------------------------------------------------------341 (348 //--------------------------------------------------------------------------------------------------354 * The monitoring will be performed by the event loop of the thread that created the Monitor object.382 //--------------------------------------------------------------------------------------------------392 //--------------------------------------------------------------------------------------------------396 //--------------------------------------------------------------------------------------------------404 //--------------------------------------------------------------------------------------------------410 * The monitoring will be performed by the event loop of the thread that created the Monitor object.438 //--------------------------------------------------------------------------------------------------453 //--------------------------------------------------------------------------------------------------465 //--------------------------------------------------------------------------------------------------473 //--------------------------------------------------------------------------------------------------485 //--------------------------------------------------------------------------------------------------493 //--------------------------------------------------------------------------------------------------496 * sleep while there are monitored events pending for this fd) or urgent (the system will be kept499 * If the process has @c CAP_EPOLLWAKEUP (or @c CAP_BLOCK_SUSPEND) capability, then fd events are505 //--------------------------------------------------------------------------------------------------513 //--------------------------------------------------------------------------------------------------515 * Sets the Context Pointer for File Descriptor Monitor's handler function. This can be retrieved516 * by the handler using le_fdMonitor_GetContextPtr() (or le_event_GetContextPtr()) when the handler519 //--------------------------------------------------------------------------------------------------527 //--------------------------------------------------------------------------------------------------538 //--------------------------------------------------------------------------------------------------545 //--------------------------------------------------------------------------------------------------551 //--------------------------------------------------------------------------------------------------558 //--------------------------------------------------------------------------------------------------566 //--------------------------------------------------------------------------------------------------573 //--------------------------------------------------------------------------------------------------577 //--------------------------------------------------------------------------------------------------void le_fdMonitor_Delete(le_fdMonitor_Ref_t monitorRef)void le_fdMonitor_SetDeferrable(le_fdMonitor_Ref_t monitorRef, bool isDeferrable)le_fdMonitor_Ref_t le_fdMonitor_Create(const char *name, int fd, le_fdMonitor_HandlerFunc_t handlerFunc, short events)int le_fdMonitor_GetFd(le_fdMonitor_Ref_t monitorRef)le_fdMonitor_Ref_t le_fdMonitor_GetMonitor(void)void(* le_fdMonitor_HandlerFunc_t)(int fd, short events)Definition: le_fdMonitor.h:341void le_fdMonitor_SetContextPtr(le_fdMonitor_Ref_t monitorRef, void *contextPtr)void * le_fdMonitor_GetContextPtr(void)void le_fdMonitor_Disable(le_fdMonitor_Ref_t monitorRef, short events)void le_fdMonitor_Enable(le_fdMonitor_Ref_t monitorRef, short events)