Commit c386c1b1 authored by ehuelsmann@1c010e3e-69d0-11dd-93a8-456734b0d56f's avatar ehuelsmann@1c010e3e-69d0-11dd-93a8-456734b0d56f
Browse files

Move exports from the THREADS package to threads.lisp.

Move sockets related exports to socket.lisp, fixing symbol references
  to refer to the EXTENSIONS package instead of SYSTEM.
parent 40d8e64e
......@@ -84,26 +84,6 @@
(export 'process-kill)
(autoload 'process-kill "run-program")
(export 'make-socket)
(export 'make-server-socket)
(export 'server-socket-close)
(export 'socket-accept)
(export 'socket-close)
(export 'get-socket-stream)
(export 'socket-peer-port)
(export 'socket-local-port)
(export 'socket-local-address)
(export 'socket-peer-address)
(in-package "THREADS")
(export '(make-mailbox mailbox-send mailbox-empty-p
mailbox-read mailbox-peek))
(export '(make-thread-lock with-thread-lock))
(export '(make-mutex get-mutex release-mutex with-mutex))
(in-package "EXTENSIONS")
(export '(grovel-java-definitions compile-system))
(export 'aver)
......
......@@ -57,8 +57,8 @@ the file system."
stream)
(when (probe-file portfile)
(let* ((port (with-open-file (s portfile) (read s nil nil)))
(socket (and (integerp port) (make-socket "127.0.0.1" port))))
(setf stream (and socket (get-socket-stream socket)))))
(socket (and (integerp port) (ext:make-socket "127.0.0.1" port))))
(setf stream (and socket (ext:get-socket-stream socket)))))
(unwind-protect
(cond ((stringp what)
(if stream
......
......@@ -29,7 +29,12 @@
;;; obligated to do so. If you do not wish to do so, delete this
;;; exception statement from your version.
(in-package "SYSTEM")
(in-package "EXTENSIONS")
(export '(make-socket make-server-socket server-socket-close socket-accept
socket-close get-socket-stream socket-peer-port socket-local-port
socket-local-address socket-peer-address))
(defun get-socket-stream (socket &key (element-type 'character) (external-format :default))
":ELEMENT-TYPE must be CHARACTER or (UNSIGNED-BYTE 8); the default is CHARACTER.
......@@ -42,22 +47,22 @@ EXTERNAL-FORMAT must be of the same format as specified for OPEN."
(error 'simple-type-error
:format-control
":ELEMENT-TYPE must be CHARACTER or (UNSIGNED-BYTE 8).")))
(%socket-stream socket element-type external-format))
(sys::%socket-stream socket element-type external-format))
(defun make-socket (host port)
(%make-socket host port))
(sys::%make-socket host port))
(defun make-server-socket (port)
(%make-server-socket port))
(sys::%make-server-socket port))
(defun socket-accept (socket)
(%socket-accept socket))
(sys::%socket-accept socket))
(defun socket-close (socket)
(%socket-close socket))
(sys::%socket-close socket))
(defun server-socket-close (socket)
(%server-socket-close socket))
(sys::%server-socket-close socket))
(declaim (inline %socket-address %socket-port))
(defun %socket-address (socket addressName)
......
......@@ -33,6 +33,12 @@
(in-package #:threads)
(export '(make-mailbox mailbox-send mailbox-empty-p
mailbox-read mailbox-peek
make-thread-lock with-thread-lock
make-mutex get-mutex release-mutex with-mutex))
;;
;; MAKE-THREAD helper to establish restarts
;;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment