projects
/
kmrcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update package nickname
[kmrcl.git]
/
processes.lisp
diff --git
a/processes.lisp
b/processes.lisp
index f89d010931b1a3f8e8eabe77b123ada76954c2c7..7017ce74e73d95f9cc8fe4fdd57e64d4919f5965 100644
(file)
--- a/
processes.lisp
+++ b/
processes.lisp
@@
-1,4
+1,4
@@
-;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10
; Package: modlisp
-*-
+;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;;
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;;
@@
-6,8
+6,6
@@
;;;; Purpose: Multiprocessing functions
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: June 2003
;;;; Purpose: Multiprocessing functions
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: June 2003
-;;;;
-;;;; $Id$
;;;; *************************************************************************
(in-package #:kmrcl)
;;;; *************************************************************************
(in-package #:kmrcl)
@@
-17,8
+15,9
@@
#+allegro (mp:process-run-function name func)
#+cmu (mp:make-process func :name name)
#+lispworks (mp:process-run-function name nil func)
#+allegro (mp:process-run-function name func)
#+cmu (mp:make-process func :name name)
#+lispworks (mp:process-run-function name nil func)
- #+sb-thread (sb-thread:make-thread func)
- #-(or allegro cmu lispworks sb-thread) (funcall func)
+ #+sb-thread (sb-thread:make-thread func :name name)
+ #+openmcl (ccl:process-run-function name func)
+ #-(or allegro cmu lispworks sb-thread openmcl) (funcall func)
)
(defun destroy-process (process)
)
(defun destroy-process (process)
@@
-26,6
+25,7
@@
#+allegro (mp:process-kill process)
#+sb-thread (sb-thread:destroy-thread process)
#+lispworks (mp:process-kill process)
#+allegro (mp:process-kill process)
#+sb-thread (sb-thread:destroy-thread process)
#+lispworks (mp:process-kill process)
+ #+openmcl (ccl:process-kill process)
)
(defun make-lock (name)
)
(defun make-lock (name)
@@
-33,6
+33,7
@@
#+cmu (mp:make-lock name)
#+lispworks (mp:make-lock :name name)
#+sb-thread (sb-thread:make-mutex :name name)
#+cmu (mp:make-lock name)
#+lispworks (mp:make-lock :name name)
#+sb-thread (sb-thread:make-mutex :name name)
+ #+openmcl (ccl:make-lock name)
)
(defmacro with-lock-held ((lock) &body body)
)
(defmacro with-lock-held ((lock) &body body)
@@
-44,7
+45,9
@@
`(mp:with-lock (,lock) ,@body)
#+sb-thread
`(sb-thread:with-recursive-lock (,lock) ,@body)
`(mp:with-lock (,lock) ,@body)
#+sb-thread
`(sb-thread:with-recursive-lock (,lock) ,@body)
- #-(or allegro cmu lispworks sb-thread)
+ #+openmcl
+ `(ccl:with-lock-grabbed (,lock) ,@body)
+ #-(or allegro cmu lispworks sb-thread openmcl)
`(progn ,@body)
)
`(progn ,@body)
)
@@
-56,10
+59,15
@@
`(mp:with-timeout (,seconds) ,@body)
#+sb-thread
`(sb-ext:with-timeout ,seconds ,@body)
`(mp:with-timeout (,seconds) ,@body)
#+sb-thread
`(sb-ext:with-timeout ,seconds ,@body)
- #-(or allegro cmu sb-thread)
+ #+openmcl
+ `(ccl:process-wait-with-timeout "waiting"
+ (* ,seconds ccl:*ticks-per-second*)
+ #'(lambda ()
+ ,@body) nil)
+ #-(or allegro cmu sb-thread openmcl)
`(progn ,@body)
)
`(progn ,@body)
)
-
+
(defun process-sleep (n)
#+allegro (mp:process-sleep n)
#-allegro (sleep n))
(defun process-sleep (n)
#+allegro (mp:process-sleep n)
#-allegro (sleep n))