This commit is contained in:
Justin Ethier 2017-03-01 18:59:19 -05:00
parent a714f57f97
commit 28aa84c52d

15
atomics.sld Normal file
View file

@ -0,0 +1,15 @@
(define-library (atomics)
(export
atomic:get-fx
atomic:fx++
)
(include-c-header "<ck_pr.h>")
(begin
;TODO: needed, unfortunately (define tmp 1)
(define-c atomic:fx++
"(void *data, int argc, closure _, object k, object num)"
" Cyc_check_fixnum(data, num);
ck_pr_add_ptr(&num, 2);
return_closcall1(data, k, num); ")
))