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 (347 //--------------------------------------------------------------------------------------------------353 * The monitoring will be performed by the event loop of the thread that created the Monitor object.376 //--------------------------------------------------------------------------------------------------386 //--------------------------------------------------------------------------------------------------398 //--------------------------------------------------------------------------------------------------406 //--------------------------------------------------------------------------------------------------418 //--------------------------------------------------------------------------------------------------426 //--------------------------------------------------------------------------------------------------429 * sleep while there are monitored events pending for this fd) or urgent (the system will be kept432 * If the process has @c CAP_EPOLLWAKEUP (or @c CAP_BLOCK_SUSPEND) capability, then fd events are438 //--------------------------------------------------------------------------------------------------446 //--------------------------------------------------------------------------------------------------448 * Sets the Context Pointer for File Descriptor Monitor's handler function. This can be retrieved449 * by the handler using le_fdMonitor_GetContextPtr() (or le_event_GetContextPtr()) when the handler452 //--------------------------------------------------------------------------------------------------460 //--------------------------------------------------------------------------------------------------471 //--------------------------------------------------------------------------------------------------478 //--------------------------------------------------------------------------------------------------484 //--------------------------------------------------------------------------------------------------491 //--------------------------------------------------------------------------------------------------499 //--------------------------------------------------------------------------------------------------506 //--------------------------------------------------------------------------------------------------510 //--------------------------------------------------------------------------------------------------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)