scsh-checkins
[Top] [All Lists]

[Scsh-checkins] CVS: scsh-0.6/scsh procobj.scm,1.14,1.15 sighandlers.scm

To: scsh-checkins@lists.sourceforge.net
Subject: [Scsh-checkins] CVS: scsh-0.6/scsh procobj.scm,1.14,1.15 sighandlers.scm,1.20,1.21 utilities.scm,1.5,1.6
From: Martin Gasbichler <mainzelm@users.sourceforge.net>
Date: Thu Nov 8 00:15:02 2001
List-id: <scsh-checkins.lists.sourceforge.net>
Sender: scsh-checkins-admin@lists.sourceforge.net
Update of /cvsroot/scsh/scsh-0.6/scsh
In directory usw-pr-cvs1:/tmp/cvs-serv12306

Modified Files:
        procobj.scm sighandlers.scm utilities.scm 
Log Message:
+ Fixed small race condition problem in wait. There are still problems
  when lots of processes are forked
+ Added optional name parameter in run-as-long-as


Index: procobj.scm
===================================================================
RCS file: /cvsroot/scsh/scsh-0.6/scsh/procobj.scm,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** procobj.scm 2001/10/18 09:02:52     1.14
--- procobj.scm 2001/11/08 08:14:37     1.15
***************
*** 179,183 ****
         (*sigchld-handler*)
         (lp next-event))))
!    thunk))
  
  ;;; This list contains pids whose proc-obj were gc'd before they died
--- 179,184 ----
         (*sigchld-handler*)
         (lp next-event))))
!    thunk
!    'auto-reaping))
  
  ;;; This list contains pids whose proc-obj were gc'd before they died
***************
*** 291,298 ****
                (release-lock wait-lock)
                ; we have to block and hence use the event system
!               (let lp ((pre-event pre-event)) 
!                 (let ((event (next-sigevent pre-event interrupt/chld)))
!                   (cond ((wait proc (bitwise-ior flags wait/poll)) => win)
!                         (else (lp event))))))
               
               ((eq? wait/poll (bitwise-and flags wait/poll))
--- 292,299 ----
                (release-lock wait-lock)
                ; we have to block and hence use the event system
!               (let lp ((pre-event pre-event))
!                 (cond ((wait proc (bitwise-ior flags wait/poll)) => win)
!                       (else 
!                        (lp (next-sigevent pre-event interrupt/chld))))))
               
               ((eq? wait/poll (bitwise-and flags wait/poll))

Index: sighandlers.scm
===================================================================
RCS file: /cvsroot/scsh/scsh-0.6/scsh/sighandlers.scm,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** sighandlers.scm     2001/10/18 09:02:52     1.20
--- sighandlers.scm     2001/11/08 08:14:37     1.21
***************
*** 189,193 ****
                                   interrupt)
                                  (enum interrupt keyboard))))))
!   (run-as-long-as deliver-interrupts thunk))
  
  (define (deliver-interrupts)
--- 189,193 ----
                                   interrupt)
                                  (enum interrupt keyboard))))))
!   (run-as-long-as deliver-interrupts thunk 'deliver-interrupts))
  
  (define (deliver-interrupts)

Index: utilities.scm
===================================================================
RCS file: /cvsroot/scsh/scsh-0.6/scsh/utilities.scm,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** utilities.scm       2001/10/03 14:41:01     1.5
--- utilities.scm       2001/11/08 08:14:37     1.6
***************
*** 274,282 ****
  ; Don't use unless you know what you are doing
  
! (define (run-as-long-as thunk1 thunk2)
    (let ((thread (make-placeholder)))
!     (spawn (lambda ()
!            (placeholder-set! thread (current-thread))
!            (thunk1)))
      (dynamic-wind
       (lambda () #t)
--- 274,283 ----
  ; Don't use unless you know what you are doing
  
! (define (run-as-long-as thunk1 thunk2 . name)
    (let ((thread (make-placeholder)))
!     (apply spawn (lambda ()
!                  (placeholder-set! thread (current-thread))
!                  (thunk1))
!          name)
      (dynamic-wind
       (lambda () #t)



<Prev in Thread] Current Thread [Next in Thread>
  • [Scsh-checkins] CVS: scsh-0.6/scsh procobj.scm,1.14,1.15 sighandlers.scm,1.20,1.21 utilities.scm,1.5,1.6, Martin Gasbichler <=