mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
WIP
This commit is contained in:
parent
a714f57f97
commit
28aa84c52d
1 changed files with 15 additions and 0 deletions
15
atomics.sld
Normal file
15
atomics.sld
Normal 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); ")
|
||||
))
|
||||
|
Loading…
Add table
Reference in a new issue