diff options
author | Kilian M. Haemmerle <61506792+kilianmh@users.noreply.github.com> | 2024-08-13 09:46:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-13 07:46:18 +0000 |
commit | 99f0a32a174253b72018830c33d2a9417b9ee487 (patch) | |
tree | e0e8b5edfb4924ec6687fff3635f72f18a4e3186 | |
parent | f82d425c56167a9a89bf211ab3eaf5ec1c298649 (diff) |
Chore: update to bordeaux-threads-2 (#74)
Update prng to bt2.
-rw-r--r-- | src/prng/os-prng.lisp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/prng/os-prng.lisp b/src/prng/os-prng.lisp index fb36bbb..df80d3d 100644 --- a/src/prng/os-prng.lisp +++ b/src/prng/os-prng.lisp @@ -6,7 +6,7 @@ #+unix (defparameter *os-prng-stream* nil) #+unix -(defparameter *os-prng-stream-lock* (bt:make-lock)) +(defparameter *os-prng-stream-lock* (bt2:make-lock)) (defclass os-prng () ()) @@ -14,7 +14,7 @@ (defmethod prng-random-data (num-bytes (prng os-prng)) #+unix (let* ((seq (make-array num-bytes :element-type '(unsigned-byte 8))) - (n (bt:with-lock-held (*os-prng-stream-lock*) + (n (bt2:with-lock-held (*os-prng-stream-lock*) (unless (and *os-prng-stream* (open-stream-p *os-prng-stream*)) (setf *os-prng-stream* (open #P"/dev/urandom" #+ccl :sharing #+ccl :external @@ -67,4 +67,4 @@ (setf *prng* (make-prng :os)) #+thread-support -(pushnew '(*prng* . (make-prng :os)) bt:*default-special-bindings* :test #'equal) +(pushnew '(*prng* . (make-prng :os)) bt2:*default-special-bindings* :test #'equal) |