mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-16 09:17:35 +02:00
WIP
This commit is contained in:
parent
28aa84c52d
commit
69468b1480
1 changed files with 8 additions and 8 deletions
16
atomics.sld
16
atomics.sld
|
@ -1,15 +1,15 @@
|
||||||
(define-library (atomics)
|
(define-library (atomics)
|
||||||
(export
|
(export
|
||||||
atomic:get-fx
|
atomic:get
|
||||||
atomic:fx++
|
atomic:set!
|
||||||
)
|
)
|
||||||
(include-c-header "<ck_pr.h>")
|
(include-c-header "<ck_pr.h>")
|
||||||
(begin
|
(begin
|
||||||
;TODO: needed, unfortunately (define tmp 1)
|
;TODO: won't work, ints are immutable
|
||||||
(define-c atomic:fx++
|
;(define-c atomic:fx++
|
||||||
"(void *data, int argc, closure _, object k, object num)"
|
; "(void *data, int argc, closure _, object k, object num)"
|
||||||
" Cyc_check_fixnum(data, num);
|
; " Cyc_check_fixnum(data, num);
|
||||||
ck_pr_add_ptr(&num, 2);
|
; ck_pr_add_ptr(&num, 2);
|
||||||
return_closcall1(data, k, num); ")
|
; return_closcall1(data, k, num); ")
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue