"Fossies" - the Fresh Open Source Software Archive

Member "openlitespeed-1.6.5/src/edio/aioeventhandler.h" (3 Jan 2020, 2019 Bytes) of package /linux/www/openlitespeed-1.6.5.src.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "aioeventhandler.h" see the Fossies "Dox" file reference documentation.

    1 /*****************************************************************************
    2 *    Open LiteSpeed is an open source HTTP server.                           *
    3 *    Copyright (C) 2013 - 2018  LiteSpeed Technologies, Inc.                 *
    4 *                                                                            *
    5 *    This program is free software: you can redistribute it and/or modify    *
    6 *    it under the terms of the GNU General Public License as published by    *
    7 *    the Free Software Foundation, either version 3 of the License, or       *
    8 *    (at your option) any later version.                                     *
    9 *                                                                            *
   10 *    This program is distributed in the hope that it will be useful,         *
   11 *    but WITHOUT ANY WARRANTY; without even the implied warranty of          *
   12 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the            *
   13 *    GNU General Public License for more details.                            *
   14 *                                                                            *
   15 *    You should have received a copy of the GNU General Public License       *
   16 *    along with this program. If not, see http://www.gnu.org/licenses/.      *
   17 *****************************************************************************/
   18 #ifndef AIOEVENTHANDLER_H
   19 #define AIOEVENTHANDLER_H
   20 
   21 #define LS_AIO_USE_AIO
   22 
   23 #if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
   24 #include <linux/version.h>
   25 #define HS_AIO (SIGRTMIN + 4)
   26 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
   27 #define LS_AIO_USE_SIGFD
   28 #else
   29 #define LS_AIO_USE_SIGNAL
   30 #endif // LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
   31 #elif defined(__FreeBSD__ ) || defined(__OpenBSD__)
   32 #define LS_AIO_USE_KQ
   33 #else
   34 #undef LS_AIO_USE_AIO
   35 #endif // defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
   36 
   37 
   38 class AioEventHandler
   39 {
   40 public:
   41     virtual int onAioEvent() = 0;
   42 };
   43 
   44 #endif //AIOEVENTHANDLER_H