pike.git / src / backend.h

version» Context lines:

pike.git/src/backend.h:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information.   */      #ifndef BACKEND_H   #define BACKEND_H      #include "global.h" - #include "time_stuff.h" +    #include "callback.h"      /*    * POLL/SELECT selection    */      #if defined(HAVE_SYS_DEVPOLL_H) && defined(PIKE_POLL_DEVICE)   /*    * Backend using /dev/poll-style poll device.    *    * Used on:    * Solaris 7 + patches and above.    * OSF/1 + patches and above. -  * IRIX 5.6.15m and above. +     */   #define BACKEND_USES_POLL_DEVICE   #define BACKEND_USES_DEVPOLL   #elif defined(HAVE_SYS_EPOLL_H) && defined(WITH_EPOLL)   /*    * Backend using /dev/epoll-style poll device.    *    * Used on:    * Linux 2.6 and above.    */
pike.git/src/backend.h:45:    * FreeBSD 4.1 and above.    * MacOS X/Darwin 7.x and above.    * Various other BSDs.    */   #define BACKEND_USES_KQUEUE   /* Currently kqueue doesn't differentiate between in-band and out-of-band    * data.    */   #define BACKEND_OOB_IS_SIMULATED    - #if defined(HAVE_CFRUNLOOPRUNINMODE) + #ifdef HAVE_CFRUNLOOPRUNINMODE   /* Have kqueue+CFRunLoop variant (Mac OSX, iOS) */   #define BACKEND_USES_CFRUNLOOP   #endif /* HAVE_CFRUNLOOPRUNINMODE */      #elif defined(HAVE_POLL) && defined(HAVE_AND_USE_POLL)   /* We have poll(2), and it isn't simulated. */   /*    * Backend using poll(2).    *    * This is used on most older SVR4- or POSIX-style systems.
pike.git/src/backend.h:74:   #define BACKEND_USES_SELECT   #endif /* HAVE_SYS_DEVPOLL_H && PIKE_POLL_DEVICE */      struct Backend_struct;      PMOD_EXPORT extern struct Backend_struct *default_backend;   extern struct callback_list do_debug_callbacks;   PMOD_EXPORT extern struct program *Backend_program;      void count_memory_in_compat_cb_boxs(size_t *num, size_t *size); - void free_all_compat_cb_box_blocks(); + void free_all_compat_cb_box_blocks(void);      PMOD_EXPORT void debug_check_fd_not_in_use (int fd);   #if 1   struct Backend_struct *get_backend_for_fd(int fd);   PMOD_EXPORT struct object *get_backend_obj_for_fd (int fd);   PMOD_EXPORT void set_backend_for_fd (int fd, struct Backend_struct *new_be);   #endif      PMOD_EXPORT struct object *get_backend_obj (struct Backend_struct *b);   PMOD_EXPORT void wake_up_backend(void);
pike.git/src/backend.h:112:   /** The callback user should keep an instance of this struct around for as long    * as callbacks are wanted. Use hook_fd_callback_box and    * unhook_fd_callback_box to connect/disconnect it to/from a backend. */   struct fd_callback_box   {    struct Backend_struct *backend; /**< Not refcounted. Cleared when the backend    * is destructed or the box is unhooked. */    struct object *ref_obj; /**< If set, it's the object containing the box.    * It then acts as the ref from the backend to    * the object and is refcounted by the backend -  * whenever any event is wanted. */ +  * whenever any event is wanted. +  * +  * It receives a ref for each when next and/or +  * events are non-zero. */    struct fd_callback_box *next; /**< Circular list of active fds in a backend.    * NULL if the fd is not active in some -  * backend. Note: ref_obj MUST be freed if +  * backend. Note: ref_obj MUST be freed when    * the box is unlinked. */    int fd; /**< Use change_fd_for_box to change this. May    * be negative, in which case only the ref    * magic on backend and ref_obj is done. The    * backend might change a negative value to a    * different negative value. */    int events; /**< Bitfield with wanted events. Always use    * set_fd_callback_events to change this. It's    * ok to have hooked boxes where no events are    * wanted. */