From psmith at common-lisp.net Thu Dec 28 00:05:07 2006 From: psmith at common-lisp.net (psmith at common-lisp.net) Date: Wed, 27 Dec 2006 19:05:07 -0500 (EST) Subject: [nio-cvs] r12 - branches/home/psmith/refactor Message-ID: <20061228000507.415574B000@common-lisp.net> Author: psmith Date: Wed Dec 27 19:05:06 2006 New Revision: 12 Added: branches/home/psmith/refactor/ Log: Added dir for refactor From psmith at common-lisp.net Thu Dec 28 00:08:05 2006 From: psmith at common-lisp.net (psmith at common-lisp.net) Date: Wed, 27 Dec 2006 19:08:05 -0500 (EST) Subject: [nio-cvs] r13 - branches/home/psmith/restructure Message-ID: <20061228000805.4BD9B4E008@common-lisp.net> Author: psmith Date: Wed Dec 27 19:08:05 2006 New Revision: 13 Added: branches/home/psmith/restructure/ - copied from r12, branches/home/psmith/stress-mods/ Log: Branching for restructure From psmith at common-lisp.net Thu Dec 28 00:28:38 2006 From: psmith at common-lisp.net (psmith at common-lisp.net) Date: Wed, 27 Dec 2006 19:28:38 -0500 (EST) Subject: [nio-cvs] r15 - in branches/home/psmith/restructure: . src src/event src/io Message-ID: <20061228002838.283F78304D@common-lisp.net> Author: psmith Date: Wed Dec 27 19:28:37 2006 New Revision: 15 Added: branches/home/psmith/restructure/src/event/ branches/home/psmith/restructure/src/event/epoll-cffi.lisp - copied unchanged from r13, branches/home/psmith/restructure/src/epoll-cffi.lisp branches/home/psmith/restructure/src/event/epoll.lisp - copied unchanged from r13, branches/home/psmith/restructure/src/epoll.lisp branches/home/psmith/restructure/src/event/event-notification.asd - copied unchanged from r13, branches/home/psmith/restructure/event-notification.asd branches/home/psmith/restructure/src/event/event-notification.lisp - copied unchanged from r13, branches/home/psmith/restructure/src/event-notification.lisp branches/home/psmith/restructure/src/event/kqueue-cffi.lisp - copied unchanged from r13, branches/home/psmith/restructure/src/kqueue-cffi.lisp branches/home/psmith/restructure/src/event/kqueue.lisp - copied unchanged from r13, branches/home/psmith/restructure/src/kqueue.lisp branches/home/psmith/restructure/src/io/async-fd.lisp - copied unchanged from r14, branches/home/psmith/restructure/src/async-fd.lisp branches/home/psmith/restructure/src/io/async-socket.lisp - copied unchanged from r14, branches/home/psmith/restructure/src/async-socket.lisp branches/home/psmith/restructure/src/io/fd-helper.lisp - copied unchanged from r14, branches/home/psmith/restructure/src/fd-helper.lisp branches/home/psmith/restructure/src/io/nio.asd - copied unchanged from r14, branches/home/psmith/restructure/nio.asd branches/home/psmith/restructure/src/io/nio.lisp - copied unchanged from r14, branches/home/psmith/restructure/src/nio.lisp Removed: branches/home/psmith/restructure/event-notification.asd branches/home/psmith/restructure/nio.asd branches/home/psmith/restructure/packets.asd branches/home/psmith/restructure/src/async-fd.lisp branches/home/psmith/restructure/src/async-socket.lisp branches/home/psmith/restructure/src/epoll-cffi.lisp branches/home/psmith/restructure/src/epoll.lisp branches/home/psmith/restructure/src/event-notification.lisp branches/home/psmith/restructure/src/fd-helper.lisp branches/home/psmith/restructure/src/kqueue-cffi.lisp branches/home/psmith/restructure/src/kqueue.lisp branches/home/psmith/restructure/src/nio.lisp branches/home/psmith/restructure/src/packets.lisp Modified: branches/home/psmith/restructure/src/packet.lisp Log: Removed packets package and put in nio Modified: branches/home/psmith/restructure/src/packet.lisp ============================================================================== --- branches/home/psmith/restructure/src/packet.lisp (original) +++ branches/home/psmith/restructure/src/packet.lisp Wed Dec 27 19:28:37 2006 @@ -24,7 +24,7 @@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |# -(in-package :packets) +(in-package :nio) ;; state-machines instantiate packets for the associated protocol ;; either based on incomming data from a packet factory or in From psmith at common-lisp.net Thu Dec 28 00:37:51 2006 From: psmith at common-lisp.net (psmith at common-lisp.net) Date: Wed, 27 Dec 2006 19:37:51 -0500 (EST) Subject: [nio-cvs] r16 - in branches/home/psmith/restructure/src: . compat io Message-ID: <20061228003751.28F5152001@common-lisp.net> Author: psmith Date: Wed Dec 27 19:37:50 2006 New Revision: 16 Added: branches/home/psmith/restructure/src/compat/ branches/home/psmith/restructure/src/compat/errno.lisp - copied unchanged from r14, branches/home/psmith/restructure/src/errno.lisp branches/home/psmith/restructure/src/io/packet.lisp - copied unchanged from r15, branches/home/psmith/restructure/src/packet.lisp Removed: branches/home/psmith/restructure/src/errno.lisp branches/home/psmith/restructure/src/packet.lisp Modified: branches/home/psmith/restructure/src/io/nio.asd branches/home/psmith/restructure/src/io/nio.lisp Log: more tidy Modified: branches/home/psmith/restructure/src/io/nio.asd ============================================================================== --- branches/home/psmith/restructure/src/io/nio.asd (original) +++ branches/home/psmith/restructure/src/io/nio.asd Wed Dec 27 19:37:50 2006 @@ -4,12 +4,11 @@ (defsystem :nio - :components ((:file "src/nio") - (:file "src/fd-helper" :depends-on ("src/nio")) - (:file "src/async-fd" :depends-on ("src/nio" "src/fd-helper")) - (:file "src/http-state-machine" :depends-on ("src/async-fd")) - (:file "src/async-socket" :depends-on ("src/async-fd")) + :components ((:file "nio") + (:file "fd-helper" :depends-on ("nio")) + (:file "async-fd" :depends-on ("nio" "fd-helper")) + (:file "async-socket" :depends-on ("async-fd")) ) - :depends-on (:cffi :event-notification :nio-buffer :http-protocol)) + :depends-on (:cffi :event-notification :nio-buffer)) Modified: branches/home/psmith/restructure/src/io/nio.lisp ============================================================================== --- branches/home/psmith/restructure/src/io/nio.lisp (original) +++ branches/home/psmith/restructure/src/io/nio.lisp Wed Dec 27 19:37:50 2006 @@ -24,7 +24,7 @@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |# -(defpackage :nio (:use :cl :cffi :event-notification :nio-buffer :packets) +(defpackage :nio (:use :cl :cffi :event-notification :nio-buffer) (:export From psmith at common-lisp.net Thu Dec 28 01:05:43 2006 From: psmith at common-lisp.net (psmith at common-lisp.net) Date: Wed, 27 Dec 2006 20:05:43 -0500 (EST) Subject: [nio-cvs] r17 - in branches/home/psmith/restructure: . src src/buffer src/compat src/event Message-ID: <20061228010543.1AFEB5F01B@common-lisp.net> Author: psmith Date: Wed Dec 27 20:05:42 2006 New Revision: 17 Added: branches/home/psmith/restructure/src/buffer/nio-buffer.asd - copied unchanged from r14, branches/home/psmith/restructure/nio-buffer.asd branches/home/psmith/restructure/src/compat/nio-compat-package.lisp branches/home/psmith/restructure/src/compat/nio-compat.asd Removed: branches/home/psmith/restructure/nio-buffer.asd branches/home/psmith/restructure/src/load.lisp Modified: branches/home/psmith/restructure/src/event/event-notification.asd Log: more tidy Added: branches/home/psmith/restructure/src/compat/nio-compat-package.lisp ============================================================================== --- (empty file) +++ branches/home/psmith/restructure/src/compat/nio-compat-package.lisp Wed Dec 27 20:05:42 2006 @@ -0,0 +1,34 @@ +#| +Copyright (c) 2006 Risto Laakso +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +|# +(defpackage :nio-compat (:use :cl) + + (:export + + ;; errno.lisp + get-errno +ERRNO_EAGAIN+ + + )) Added: branches/home/psmith/restructure/src/compat/nio-compat.asd ============================================================================== --- (empty file) +++ branches/home/psmith/restructure/src/compat/nio-compat.asd Wed Dec 27 20:05:42 2006 @@ -0,0 +1,12 @@ +;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*- + +(in-package :asdf) + +(defsystem :nio-compat + + :components ((:file "nio-compat-package") + (:file "errno" :depends-on ("nio-compat-package")) + ) + + :depends-on ()) + Modified: branches/home/psmith/restructure/src/event/event-notification.asd ============================================================================== --- branches/home/psmith/restructure/src/event/event-notification.asd (original) +++ branches/home/psmith/restructure/src/event/event-notification.asd Wed Dec 27 20:05:42 2006 @@ -4,12 +4,11 @@ (defsystem :event-notification - :components ((:file "src/event-notification") - (:file "src/kqueue-cffi" :depends-on ("src/event-notification")) - (:file "src/epoll-cffi" :depends-on ("src/event-notification")) - (:file "src/kqueue" :depends-on ("src/event-notification" "src/kqueue-cffi")) - (:file "src/errno") - (:file "src/epoll" :depends-on ("src/event-notification" "src/epoll-cffi" "src/errno"))) + :components ((:file "event-notification") + (:file "kqueue-cffi" :depends-on ("event-notification")) + (:file "epoll-cffi" :depends-on ("event-notification")) + (:file "kqueue" :depends-on ("event-notification" "kqueue-cffi")) + (:file "epoll" :depends-on ("event-notification" "epoll-cffi"))) - :depends-on (:cffi)) + :depends-on (:cffi :nio-compat)) From psmith at common-lisp.net Thu Dec 28 01:20:52 2006 From: psmith at common-lisp.net (psmith at common-lisp.net) Date: Wed, 27 Dec 2006 20:20:52 -0500 (EST) Subject: [nio-cvs] r18 - in branches/home/psmith/restructure: . src/compat src/io src/old Message-ID: <20061228012052.67CCB63012@common-lisp.net> Author: psmith Date: Wed Dec 27 20:20:51 2006 New Revision: 18 Added: branches/home/psmith/restructure/src/io/nio-package.lisp - copied, changed from r16, branches/home/psmith/restructure/src/io/nio.lisp branches/home/psmith/restructure/src/old/nio-httpd.asd - copied unchanged from r13, branches/home/psmith/restructure/nio-httpd.asd Removed: branches/home/psmith/restructure/nio-httpd.asd branches/home/psmith/restructure/src/io/nio.lisp Modified: branches/home/psmith/restructure/src/compat/errno.lisp branches/home/psmith/restructure/src/io/async-fd.lisp Log: getting there... Modified: branches/home/psmith/restructure/src/compat/errno.lisp ============================================================================== --- branches/home/psmith/restructure/src/compat/errno.lisp (original) +++ branches/home/psmith/restructure/src/compat/errno.lisp Wed Dec 27 20:20:51 2006 @@ -24,7 +24,7 @@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |# -(in-package :event-notification) +(in-package :nio-compat) (declaim (optimize (debug 3) (speed 3) (space 0))) Modified: branches/home/psmith/restructure/src/io/async-fd.lisp ============================================================================== --- branches/home/psmith/restructure/src/io/async-fd.lisp (original) +++ branches/home/psmith/restructure/src/io/async-fd.lisp Wed Dec 27 20:20:51 2006 @@ -123,9 +123,9 @@ ((< new-bytes 0) (progn -;;pdw - this is not necessarily an error if the ret is -1 and errno is EAGAIN (and we're in nbio mode - which we are) +;;TODO if ret is -1 and errno is EAGAIN save state and wait for notification - (format t "read-error - Errno: ~A~%" (sb-alien:get-errno)) + (format t "read-error - Errno: ~A~%" (get-errno)) (error 'read-error))) ((= new-bytes 0) Copied: branches/home/psmith/restructure/src/io/nio-package.lisp (from r16, branches/home/psmith/restructure/src/io/nio.lisp) ============================================================================== --- branches/home/psmith/restructure/src/io/nio.lisp (original) +++ branches/home/psmith/restructure/src/io/nio-package.lisp Wed Dec 27 20:20:51 2006 @@ -24,7 +24,7 @@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |# -(defpackage :nio (:use :cl :cffi :event-notification :nio-buffer) +(defpackage :nio (:use :cl :cffi :event-notification :nio-buffer :nio-compat) (:export From psmith at common-lisp.net Thu Dec 28 01:27:35 2006 From: psmith at common-lisp.net (psmith at common-lisp.net) Date: Wed, 27 Dec 2006 20:27:35 -0500 (EST) Subject: [nio-cvs] r19 - branches/home/psmith/restructure/src/buffer Message-ID: <20061228012735.6A63D671A3@common-lisp.net> Author: psmith Date: Wed Dec 27 20:27:34 2006 New Revision: 19 Added: branches/home/psmith/restructure/src/buffer/nio-buffer-package.lisp - copied unchanged from r14, branches/home/psmith/restructure/src/buffer/nio-buffer.lisp Removed: branches/home/psmith/restructure/src/buffer/nio-buffer.lisp Modified: branches/home/psmith/restructure/src/buffer/nio-buffer.asd Log: updated buffer package Modified: branches/home/psmith/restructure/src/buffer/nio-buffer.asd ============================================================================== --- branches/home/psmith/restructure/src/buffer/nio-buffer.asd (original) +++ branches/home/psmith/restructure/src/buffer/nio-buffer.asd Wed Dec 27 20:27:34 2006 @@ -4,8 +4,8 @@ (defsystem :nio-buffer - :components ((:file "src/buffer/nio-buffer") - (:file "src/buffer/buffer" :depends-on ("src/buffer/nio-buffer")) + :components ((:file "nio-buffer-package") + (:file "buffer" :depends-on ("nio-buffer-package")) ) :depends-on (:cffi)) From psmith at common-lisp.net Thu Dec 28 01:31:08 2006 From: psmith at common-lisp.net (psmith at common-lisp.net) Date: Wed, 27 Dec 2006 20:31:08 -0500 (EST) Subject: [nio-cvs] r20 - branches/home/psmith/restructure/src/io Message-ID: <20061228013108.4D3E968001@common-lisp.net> Author: psmith Date: Wed Dec 27 20:31:08 2006 New Revision: 20 Modified: branches/home/psmith/restructure/src/io/nio.asd Log: done io Modified: branches/home/psmith/restructure/src/io/nio.asd ============================================================================== --- branches/home/psmith/restructure/src/io/nio.asd (original) +++ branches/home/psmith/restructure/src/io/nio.asd Wed Dec 27 20:31:08 2006 @@ -4,11 +4,11 @@ (defsystem :nio - :components ((:file "nio") - (:file "fd-helper" :depends-on ("nio")) - (:file "async-fd" :depends-on ("nio" "fd-helper")) + :components ((:file "nio-package") + (:file "fd-helper" :depends-on ("nio-package")) + (:file "async-fd" :depends-on ("fd-helper")) (:file "async-socket" :depends-on ("async-fd")) ) - :depends-on (:cffi :event-notification :nio-buffer)) + :depends-on (:cffi :event-notification :nio-buffer :nio-compat)) From psmith at common-lisp.net Thu Dec 28 01:34:39 2006 From: psmith at common-lisp.net (psmith at common-lisp.net) Date: Wed, 27 Dec 2006 20:34:39 -0500 (EST) Subject: [nio-cvs] r21 - branches/home/psmith/restructure/src/protocol/http Message-ID: <20061228013439.75ABA68001@common-lisp.net> Author: psmith Date: Wed Dec 27 20:34:39 2006 New Revision: 21 Modified: branches/home/psmith/restructure/src/protocol/http/http-state-machine.lisp branches/home/psmith/restructure/src/protocol/http/nio-http-package.lisp branches/home/psmith/restructure/src/protocol/http/nio-http.asd Log: Done nio-http Modified: branches/home/psmith/restructure/src/protocol/http/http-state-machine.lisp ============================================================================== --- branches/home/psmith/restructure/src/protocol/http/http-state-machine.lisp (original) +++ branches/home/psmith/restructure/src/protocol/http/http-state-machine.lisp Wed Dec 27 20:34:39 2006 @@ -29,7 +29,7 @@ (declaim (optimize (debug 3) (speed 3) (space 0))) ;; A SM that speaks HTTP -(defclass http-state-machine (state-machine)()) +(defclass http-state-machine (async-fd)()) (defmethod process-read((sm http-state-machine)) (with-slots (foreign-read-buffer foreign-write-buffer) sm Modified: branches/home/psmith/restructure/src/protocol/http/nio-http-package.lisp ============================================================================== --- branches/home/psmith/restructure/src/protocol/http/nio-http-package.lisp (original) +++ branches/home/psmith/restructure/src/protocol/http/nio-http-package.lisp Wed Dec 27 20:34:39 2006 @@ -24,7 +24,7 @@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |# -(defpackage :nio-http (:use :cl :packets :nio) +(defpackage :nio-http (:use :cl :nio) (:export Modified: branches/home/psmith/restructure/src/protocol/http/nio-http.asd ============================================================================== --- branches/home/psmith/restructure/src/protocol/http/nio-http.asd (original) +++ branches/home/psmith/restructure/src/protocol/http/nio-http.asd Wed Dec 27 20:34:39 2006 @@ -8,4 +8,4 @@ (:file "http-response" :depends-on ("nio-http-package")) ) - :depends-on (:packets)) \ No newline at end of file + :depends-on (:nio)) \ No newline at end of file