mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
gnu: cl-s-sysdeps: Add support for bordeaux-threads-2.
This is required to fix the build of cl-prevalence with cl-usocket-0.8.8. * gnu/packages/patches/sbcl-s-sysdeps-bt2.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/lisp-xyz.scm (sbcl-s-sysdeps)[source]: Use it. Change-Id: I6addc042e16f71b55a2125c1f8eb313023ada411
This commit is contained in:
parent
a91ac0dea8
commit
c0a223c7c2
3 changed files with 66 additions and 2 deletions
|
@ -2081,6 +2081,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/sbcl-eazy-gnuplot-skip-path-check.patch \
|
%D%/packages/patches/sbcl-eazy-gnuplot-skip-path-check.patch \
|
||||||
%D%/packages/patches/sbcl-fast-generic-functions-fix-sbcl-2.4.patch \
|
%D%/packages/patches/sbcl-fast-generic-functions-fix-sbcl-2.4.patch \
|
||||||
%D%/packages/patches/sbcl-png-fix-sbcl-compatibility.patch \
|
%D%/packages/patches/sbcl-png-fix-sbcl-compatibility.patch \
|
||||||
|
%D%/packages/patches/sbcl-s-sysdeps-bt2.patch \
|
||||||
%D%/packages/patches/scalapack-gcc-10-compilation.patch \
|
%D%/packages/patches/scalapack-gcc-10-compilation.patch \
|
||||||
%D%/packages/patches/scheme48-tests.patch \
|
%D%/packages/patches/scheme48-tests.patch \
|
||||||
%D%/packages/patches/scilab-better-compiler-detection.patch \
|
%D%/packages/patches/scilab-better-compiler-detection.patch \
|
||||||
|
|
|
@ -25144,10 +25144,12 @@ (define-public sbcl-s-sysdeps
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
(url home-page)
|
(url home-page)
|
||||||
(commit commit)))
|
(commit commit)))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name "cl-s-sysdeps" version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0rp81iq0rgl48qdwbmfy89glga81hmry2lp8adjbr5h5ybr92b4n"))))
|
"0rp81iq0rgl48qdwbmfy89glga81hmry2lp8adjbr5h5ybr92b4n"))
|
||||||
|
(patches
|
||||||
|
(search-patches "sbcl-s-sysdeps-bt2.patch"))))
|
||||||
(inputs
|
(inputs
|
||||||
(list sbcl-bordeaux-threads sbcl-usocket))
|
(list sbcl-bordeaux-threads sbcl-usocket))
|
||||||
(synopsis "Common Lisp abstraction layer over platform dependent functionality")
|
(synopsis "Common Lisp abstraction layer over platform dependent functionality")
|
||||||
|
|
61
gnu/packages/patches/sbcl-s-sysdeps-bt2.patch
Normal file
61
gnu/packages/patches/sbcl-s-sysdeps-bt2.patch
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
From 800ca497282f6fb61e41ea151038d3baa05cdaeb Mon Sep 17 00:00:00 2001
|
||||||
|
From: kilianmh <kilian.haemmerle@protonmail.com>
|
||||||
|
Date: Sun, 9 Jun 2024 09:02:00 +0200
|
||||||
|
Subject: [PATCH] Chore: Update to bordeaux-threads-2
|
||||||
|
|
||||||
|
---
|
||||||
|
src/sysdeps.lisp | 16 ++++++++--------
|
||||||
|
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/sysdeps.lisp b/src/sysdeps.lisp
|
||||||
|
index 638e88c..f3a9f19 100644
|
||||||
|
--- a/src/sysdeps.lisp
|
||||||
|
+++ b/src/sysdeps.lisp
|
||||||
|
@@ -21,19 +21,19 @@
|
||||||
|
|
||||||
|
(defun current-process ()
|
||||||
|
"Return the object representing the current process"
|
||||||
|
- (bt:current-thread))
|
||||||
|
+ (bt2:current-thread))
|
||||||
|
|
||||||
|
(defun kill-process (process)
|
||||||
|
"Kill the process represented by the object process"
|
||||||
|
- (bt:destroy-thread process))
|
||||||
|
+ (bt2:destroy-thread process))
|
||||||
|
|
||||||
|
(defun run-process (name function &rest arguments)
|
||||||
|
"Create and run a new process with name, executing function on arguments"
|
||||||
|
- (bt:make-thread #'(lambda () (apply function arguments)) :name name))
|
||||||
|
+ (bt2:make-thread #'(lambda () (apply function arguments)) :name name))
|
||||||
|
|
||||||
|
(defun all-processes ()
|
||||||
|
"Return a list of all processes currently running"
|
||||||
|
- (bt:all-threads))
|
||||||
|
+ (bt2:all-threads))
|
||||||
|
|
||||||
|
;; opening a client TCP/IP socket stream
|
||||||
|
|
||||||
|
@@ -75,19 +75,19 @@
|
||||||
|
|
||||||
|
(defun stop-process (name)
|
||||||
|
"Stop a named process by destroying it"
|
||||||
|
- (let ((thread (find name (bt:all-threads) :key #'bt:thread-name :test #'equal)))
|
||||||
|
+ (let ((thread (find name (bt2:all-threads) :key #'bt2:thread-name :test #'equal)))
|
||||||
|
(when thread
|
||||||
|
- (bt:destroy-thread thread)
|
||||||
|
+ (bt2:destroy-thread thread)
|
||||||
|
name)))
|
||||||
|
|
||||||
|
;; working with process locks
|
||||||
|
|
||||||
|
(defun make-process-lock (name)
|
||||||
|
"Create a named process lock object"
|
||||||
|
- (bt:make-recursive-lock name))
|
||||||
|
+ (bt2:make-recursive-lock :name name))
|
||||||
|
|
||||||
|
(defmacro with-process-lock ((lock) &body body)
|
||||||
|
"Execute body wih the process lock grabbed, wait otherwise"
|
||||||
|
- `(bt:with-recursive-lock-held (,lock) ,@body))
|
||||||
|
+ `(bt2:with-recursive-lock-held (,lock) ,@body))
|
||||||
|
|
||||||
|
;;;; eof
|
Loading…
Reference in a new issue