[nio-cvs] r43 - branches/home/psmith/restructure/src/event
psmith at common-lisp.net
psmith at common-lisp.net
Fri Jan 19 00:09:16 UTC 2007
Author: psmith
Date: Thu Jan 18 19:09:15 2007
New Revision: 43
Modified:
branches/home/psmith/restructure/src/event/epoll.lisp
Log:
Reduced wait time and ignored EINTR on epoll_wait return
Modified: branches/home/psmith/restructure/src/event/epoll.lisp
==============================================================================
--- branches/home/psmith/restructure/src/event/epoll.lisp (original)
+++ branches/home/psmith/restructure/src/event/epoll.lisp Thu Jan 18 19:09:15 2007
@@ -76,13 +76,18 @@
#+nio-debug (format t "poll-events called with :event-queue ~A~%" event-queue)
(with-foreign-object (events 'epoll-event +epoll-size+)
(memzero events (* +epoll-event-size+ +epoll-size+))
- (loop for res = (%epoll-wait event-queue events +epoll-size+ 1000)
+ (loop for res = (%epoll-wait event-queue events +epoll-size+ 100)
do
(progn
#+nio-debug (format t "poll-events - dealing with ~A~%" res)
(case res
- (-1 (error 'poll-error))
+ (-1
+ (let ((errno (get-errno)))
+ (format t "-1 returned from epoll-wait, errno ~A~%" errno)
+ (if (eql errno 4) ;EINTR - interrupted by a system call
+ (return nil)
+ (error 'poll-error))))
(return nil)
(t
(let ((idents nil))
More information about the Nio-cvs
mailing list