mirror of
https://github.com/nim-lang/Nim.git
synced 2026-05-23 13:19:55 +00:00
* Add config section for Nintendo Switch * Add compiler configuration for Nintendo Switch and it's CPU * Add specific lib code for Nintendo Switch * Add GC support for Nintendo Switch * Update changelog for Nintendo Switch * Update changelog with more info about fixed paths * Cleaned up GC memory management a bit * Relocate docs for Switch * Rename aarch64NoneElfGcc to nintendoSwitchGCC * Remove armv8a57 * Fix installer.ini * Reuse code in linux and amd64 * Add posix defs for nintendo switch * Add more defined sections for nintendo switch * Remove old comment * Add what's not supported for Nintendo Switch docs * Make nintendoswitch == posix * Remove DEVKITPRO references from nim.cfg * Make PR extccomp changes * Remove Result type alias * Add separate switch consts file * Update docs for nintendo switch * Fix travis errors with undefined consts and add correct wait.h procs
22 lines
793 B
Nim
22 lines
793 B
Nim
const virtMemHeader = "<switch/kernel/virtmem.h>"
|
|
const svcHeader = "<switch/kernel/virtmem.h>"
|
|
const mallocHeader = "<malloc.h>"
|
|
|
|
proc memalign*(bytes: csize, size: csize): pointer {.importc: "memalign",
|
|
header: mallocHeader.}
|
|
|
|
proc free*(address: pointer) {.importc: "free",
|
|
header: mallocHeader.}
|
|
|
|
proc svcMapMemory*(dst_addr: pointer; src_addr: pointer; size: uint64): uint32 {.
|
|
importc: "svcMapMemory", header: svcHeader.}
|
|
|
|
proc svcUnmapMemory*(dst_addr: pointer; src_addr: pointer; size: uint64): uint32 {.
|
|
importc: "svcUnmapMemory", header: svcHeader.}
|
|
|
|
proc virtmemReserveMap*(size: csize): pointer {.importc: "virtmemReserveMap",
|
|
header: virtMemHeader.}
|
|
|
|
proc virtmemFreeMap*(address: pointer; size: csize) {.importc: "virtmemFreeMap",
|
|
header: virtMemHeader.}
|