compiler/
kernel/
lib/
scripts/
seed/
sublime/
test/
acceptance/
boot/
bootstrap/
cycles/
dispatch/
loader/
mmio/
native/
packages/
app.rad
271 B
check.rad
4.0 KiB
run
1.1 KiB
support.rad
390 B
pages/
runtime/
scheduling/
shared/
slots/
smp/
support/
sync/
termination/
tests/
trap/
package-golden
1.6 KiB
run
3.1 KiB
runner.rad
10.5 KiB
vim/
.gitignore
336 B
.gitsigners
112 B
CONTRIBUTING
2.1 KiB
LICENSE
1.1 KiB
Makefile
9.2 KiB
README
2.5 KiB
STYLE
2.5 KiB
std.lib
1.5 KiB
std.lib.test
662 B
test/packages/support.rad
raw
| 1 | //! Shared package fixture. |
| 2 | /// Shared mutable data. |
| 3 | export static value: u64 = 7; |
| 4 | /// Read shared mutable data. |
| 5 | export fn read() -> u64 { |
| 6 | memoryFence(); |
| 7 | let label = "package literal"; |
| 8 | let values = &[11 as u64, 13]; |
| 9 | return value + label.len as u64 - 15 + values[0] - 11; |
| 10 | } |
| 11 | /// Order shared-memory accesses through a compiler instruction. |
| 12 | @intrinsic export fn memoryFence(); |