POLL-FD now returns four values: readability, read-hangup, writeability and write...
[iolib.git] / io.multiplex / foreign-linux.lisp
blob798f73d02daae9e9dd6c3b4cd34d3002677c6a3b
1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; indent-tabs-mode: nil -*-
2 ;;;
3 ;;; --- Linux-specific definitions.
4 ;;;
5 ;;; Copyright (C) 2005-2006, Matthew Backes <lucca@accela.net>
6 ;;; Copyright (C) 2005-2006, Dan Knapp <dankna@accela.net>
7 ;;;
8 ;;; Permission is hereby granted, free of charge, to any person
9 ;;; obtaining a copy of this software and associated documentation
10 ;;; files (the "Software"), to deal in the Software without
11 ;;; restriction, including without limitation the rights to use, copy,
12 ;;; modify, merge, publish, distribute, sublicense, and/or sell copies
13 ;;; of the Software, and to permit persons to whom the Software is
14 ;;; furnished to do so, subject to the following conditions:
15 ;;;
16 ;;; The above copyright notice and this permission notice shall be
17 ;;; included in all copies or substantial portions of the Software.
18 ;;;
19 ;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20 ;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 ;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22 ;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
23 ;;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
24 ;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25 ;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26 ;;; DEALINGS IN THE SOFTWARE.
28 (in-package :io.multiplex)
30 ;;;; sys/epoll.h
32 (defsyscall "epoll_create" :int
33 "Open an epoll file descriptor."
34 (size :int))
36 (defsyscall "epoll_ctl" :int
37 "Control interface for an epoll descriptor."
38 (epfd :int)
39 (op :int)
40 (fd file-descriptor-designator)
41 (event :pointer))
43 (defsyscall "epoll_wait" :int
44 "Wait for an I/O event on an epoll file descriptor."
45 (epfd :int)
46 (events :pointer)
47 (maxevents :int)
48 (timeout :int))