Author: ehuelsmann Date: Mon Jun 16 17:56:25 2008 New Revision: 345
Modified: usocket/branches/new-wfi/backend/allegro.lisp usocket/branches/new-wfi/backend/clisp.lisp usocket/branches/new-wfi/backend/cmucl.lisp usocket/branches/new-wfi/backend/openmcl.lisp Log: Follow-up commit, adjusting the wait-list slot names in the files.
Modified: usocket/branches/new-wfi/backend/allegro.lisp ============================================================================== --- usocket/branches/new-wfi/backend/allegro.lisp (original) +++ usocket/branches/new-wfi/backend/allegro.lisp Mon Jun 16 17:56:25 2008 @@ -131,25 +131,25 @@ (declare (ignore wait-list)))
(defun %add-waiter (wait-list waiter) - (push (socket waiter) (%wait wait-list))) + (push (socket waiter) (wait-list-%wait wait-list)))
(defun %remove-waiter (wait-list waiter) - (setf (%wait wait-list) - (remove (socket waiter) (%wait wait-list)))) + (setf (wait-list-%wait wait-list) + (remove (socket waiter) (wait-list-%wait wait-list))))
(defun wait-for-input-internal (wait-list &key timeout) (with-mapped-conditions () (let ((active-internal-sockets (if timeout - (mp:wait-for-input-available (%wait wait-list) + (mp:wait-for-input-available (wait-list-%wait wait-list) :timeout timeout) - (mp:wait-for-input-available (%wait wait-list))))) + (mp:wait-for-input-available (wait-list-%wait wait-list))))) ;; this is quadratic, but hey, the active-internal-sockets ;; list is very short and it's only quadratic in the length of that one. ;; When I have more time I could recode it to something of linear ;; complexity. ;; [Same code is also used in openmcl.lisp] (dolist (x active-internal-sockets) - (setf (state (gethash x (wait-map wait-list))) + (setf (state (gethash x (wait-list-map wait-list))) :READ)) wait-list)))
Modified: usocket/branches/new-wfi/backend/clisp.lisp ============================================================================== --- usocket/branches/new-wfi/backend/clisp.lisp (original) +++ usocket/branches/new-wfi/backend/clisp.lisp Mon Jun 16 17:56:25 2008 @@ -131,23 +131,23 @@ (declare (ignore wait-list)))
(defun %add-waiter (wait-list waiter) - (push (cons (socket waiter) NIL) (%wait wait-list))) + (push (cons (socket waiter) NIL) (wait-list-%wait wait-list)))
(defun %remove-waiter (wait-list waiter) - (setf (%wait wait-list) - (remove (socket waiter) (%wait wait-list) :key #'car))) + (setf (wait-list-%wait wait-list) + (remove (socket waiter) (wait-list-%wait wait-list) :key #'car)))
(defmethod wait-for-input-internal (wait-list &key timeout) (with-mapped-conditions () (multiple-value-bind (secs musecs) (split-timeout (or timeout 1)) - (dolist (x (%wait wait-list)) + (dolist (x (wait-list-%wait wait-list)) (setf (cdr x) :INPUT)) (let* ((status-list (if timeout (socket:socket-status request-list secs musecs) (socket:socket-status request-list))) - (sockets (wait-list wait-list))) + (sockets (wait-list-waiters wait-list))) (do* ((x (pop sockets) (pop sockets)) (y (pop status-list) (pop status-list))) ((or (null sockets) (null status-list)))
Modified: usocket/branches/new-wfi/backend/cmucl.lisp ============================================================================== --- usocket/branches/new-wfi/backend/cmucl.lisp (original) +++ usocket/branches/new-wfi/backend/cmucl.lisp Mon Jun 16 17:56:25 2008 @@ -175,7 +175,7 @@ (with-mapped-conditions () (alien:with-alien ((rfds (alien:struct unix:fd-set))) (unix:fd-zero rfds) - (dolist (socket (wait-list wait-list)) + (dolist (socket (wait-list-waiters wait-list)) (unix:fd-set (socket socket) rfds)) (multiple-value-bind (secs musecs) @@ -188,7 +188,7 @@ (when timeout secs) musecs) (if (<= 0 count) ;; process the result... - (dolist (x (wait-list wait-list)) + (dolist (x (wait-list-waiters wait-list)) (when (unix:fd-isset (socket x) rfds) (setf (state x) :READ))) (progn
Modified: usocket/branches/new-wfi/backend/openmcl.lisp ============================================================================== --- usocket/branches/new-wfi/backend/openmcl.lisp (original) +++ usocket/branches/new-wfi/backend/openmcl.lisp Mon Jun 16 17:56:25 2008 @@ -153,7 +153,7 @@ (let* ((ticks-timeout (truncate (* (or timeout 1) ccl::*ticks-per-second*))) (active-internal-sockets - (input-available-p wait-list + (input-available-p (wait-list-waiters wait-list) (when timeout ticks-timeout)))) wait-list)))