Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/next/external/cache/sources/hcitools/monitor/mainloop.h
Views: 3959
/*1*2* BlueZ - Bluetooth protocol stack for Linux3*4* Copyright (C) 2011-2012 Intel Corporation5* Copyright (C) 2002-2010 Marcel Holtmann <[email protected]>6*7*8* This program is free software; you can redistribute it and/or modify9* it under the terms of the GNU General Public License as published by10* the Free Software Foundation; either version 2 of the License, or11* (at your option) any later version.12*13* This program is distributed in the hope that it will be useful,14* but WITHOUT ANY WARRANTY; without even the implied warranty of15* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the16* GNU General Public License for more details.17*18* You should have received a copy of the GNU General Public License19* along with this program; if not, write to the Free Software20* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA21*22*/2324#include <signal.h>25#include <sys/epoll.h>2627typedef void (*mainloop_destroy_func) (void *user_data);2829typedef void (*mainloop_event_func) (int fd, uint32_t events, void *user_data);30typedef void (*mainloop_timeout_func) (int id, void *user_data);31typedef void (*mainloop_signal_func) (int signum, void *user_data);3233void mainloop_init(void);34void mainloop_quit(void);35int mainloop_run(void);3637int mainloop_add_fd(int fd, uint32_t events, mainloop_event_func callback,38void *user_data, mainloop_destroy_func destroy);39int mainloop_modify_fd(int fd, uint32_t events);40int mainloop_remove_fd(int fd);4142int mainloop_add_timeout(unsigned int seconds, mainloop_timeout_func callback,43void *user_data, mainloop_destroy_func destroy);44int mainloop_modify_timeout(int fd, unsigned int seconds);45int mainloop_remove_timeout(int id);4647int mainloop_set_signal(sigset_t *mask, mainloop_signal_func callback,48void *user_data, mainloop_destroy_func destroy);495051