1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 05:30:21 +02:00

Move atomic primitive registration to (language tree-il)

* module/ice-9/atomic.scm: Don't add-interesting-primitive! here.
* module/language/tree-il/primitives.scm
(*interesting-primitive-names*): Instead, import atomics here and
register the primitives as usual.  This will let atomics be used earlier
in the boot graph.
This commit is contained in:
Andy Wingo 2025-04-29 10:54:52 +02:00
parent 2bfc1779c5
commit ec8d08fc4f
2 changed files with 9 additions and 12 deletions

View file

@ -1,6 +1,6 @@
;;; open-coding primitive procedures
;; Copyright (C) 2009-2015, 2017-2023 Free Software Foundation, Inc.
;; Copyright (C) 2009-2015, 2017-2023, 2025 Free Software Foundation, Inc.
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
@ -20,6 +20,7 @@
(define-module (language tree-il primitives)
#:use-module (system base pmatch)
#:use-module (ice-9 atomic)
#:use-module (ice-9 match)
#:use-module (ice-9 threads)
#:use-module (rnrs bytevectors)
@ -133,7 +134,11 @@
bytevector-ieee-single-native-ref bytevector-ieee-single-native-set!
bytevector-ieee-double-ref bytevector-ieee-double-set!
bytevector-ieee-double-native-ref bytevector-ieee-double-native-set!
f32vector-ref f32vector-set! f64vector-ref f64vector-set!))
f32vector-ref f32vector-set! f64vector-ref f64vector-set!
make-atomic-box atomic-box?
atomic-box-ref atomic-box-set!
atomic-box-swap! atomic-box-compare-and-swap!))
(define (add-interesting-primitive! name)
(hashq-set! *interesting-primitive-vars*