#| -*-Scheme-*-
-$Id: runtime.pkg,v 14.264 1995/11/04 02:39:34 cph Exp $
+$Id: runtime.pkg,v 14.265 1995/11/13 07:21:53 cph Exp $
Copyright (c) 1988-95 Massachusetts Institute of Technology
close-tcp-server-socket
open-tcp-server-socket
open-tcp-stream-socket
+ open-tcp-stream-socket-channel
open-unix-stream-socket
+ open-unix-stream-socket-channel
tcp-server-connection-accept))
(define-package (runtime subprocess)
unlock-thread-mutex
with-create-thread-continuation
with-thread-mutex-locked
+ with-thread-timer-stopped
yield-current-thread)
(export (runtime interrupt-handler)
thread-timer-interrupt-handler)
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/socket.scm,v 1.5 1992/06/15 22:22:35 cph Exp $
+$Id: socket.scm,v 1.6 1995/11/13 07:20:52 cph Exp $
-Copyright (c) 1990-92 Massachusetts Institute of Technology
+Copyright (c) 1990-95 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
(declare (usual-integrations))
\f
(define (open-tcp-stream-socket host-name service)
- (socket-ports
- (let ((host (vector-ref ((ucode-primitive get-host-by-name 1) host-name) 0))
- (port (tcp-service->port service)))
- (without-interrupts
- (lambda ()
- (make-channel
- ((ucode-primitive open-tcp-stream-socket 2) host port)))))))
+ (socket-ports (open-tcp-stream-socket-channel host-name service)))
(define (open-unix-stream-socket filename)
- (socket-ports
- (without-interrupts
- (lambda ()
- (make-channel ((ucode-primitive open-unix-stream-socket 1) filename))))))
+ (socket-ports (open-unix-stream-socket-channel filename)))
(define (socket-ports channel)
(let ((port (make-generic-i/o-port channel channel 64 64)))
(values port port)))
+(define (open-tcp-stream-socket-channel host-name service)
+ (let ((host (vector-ref (get-host-by-name host-name) 0))
+ (port (tcp-service->port service)))
+ (without-interrupts
+ (lambda ()
+ (make-channel
+ ((ucode-primitive open-tcp-stream-socket 2) host port))))))
+
+(define (get-host-by-name host-name)
+ (with-thread-timer-stopped
+ (lambda ()
+ ((ucode-primitive get-host-by-name 1) host-name))))
+
+(define (open-unix-stream-socket-channel filename)
+ (without-interrupts
+ (lambda ()
+ (make-channel ((ucode-primitive open-unix-stream-socket 1) filename)))))
+
(define (open-tcp-server-socket service)
(without-interrupts
(lambda ()
#| -*-Scheme-*-
-$Id: thread.scm,v 1.21 1993/12/23 06:58:54 cph Exp $
+$Id: thread.scm,v 1.22 1995/11/13 07:21:35 cph Exp $
-Copyright (c) 1991-1993 Massachusetts Institute of Technology
+Copyright (c) 1991-95 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
(define (stop-thread-timer)
(without-interrupts %stop-thread-timer))
+(define (with-thread-timer-stopped thunk)
+ (dynamic-wind %stop-thread-timer thunk %maybe-toggle-thread-timer))
+
(define (%maybe-toggle-thread-timer)
(cond ((and timer-interval
(let ((current-thread first-running-thread))
#| -*-Scheme-*-
-$Id: runtime.pkg,v 14.266 1995/11/04 02:34:03 cph Exp $
+$Id: runtime.pkg,v 14.267 1995/11/13 07:22:06 cph Exp $
Copyright (c) 1988-95 Massachusetts Institute of Technology
close-tcp-server-socket
open-tcp-server-socket
open-tcp-stream-socket
+ open-tcp-stream-socket-channel
open-unix-stream-socket
+ open-unix-stream-socket-channel
tcp-server-connection-accept))
(define-package (runtime subprocess)
unlock-thread-mutex
with-create-thread-continuation
with-thread-mutex-locked
+ with-thread-timer-stopped
yield-current-thread)
(export (runtime interrupt-handler)
thread-timer-interrupt-handler)