forked from M-Labs/artiq-zynq
remove refcout functions
This commit is contained in:
85
src/Cargo.lock
generated
85
src/Cargo.lock
generated
@@ -25,7 +25,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -34,6 +34,12 @@ version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
||||
|
||||
[[package]]
|
||||
name = "base64"
|
||||
version = "0.13.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
|
||||
|
||||
[[package]]
|
||||
name = "bit_field"
|
||||
version = "0.10.1"
|
||||
@@ -80,6 +86,12 @@ version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
|
||||
[[package]]
|
||||
name = "const-default"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0b396d1f76d455557e1218ec8066ae14bba60b4b36ecd55577ba979f5db7ecaa"
|
||||
|
||||
[[package]]
|
||||
name = "core_io"
|
||||
version = "0.1.0"
|
||||
@@ -106,7 +118,7 @@ version = "0.0.0"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.10",
|
||||
"cslice",
|
||||
"libc",
|
||||
"libc 0.1.0",
|
||||
"unwind",
|
||||
]
|
||||
|
||||
@@ -183,7 +195,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -235,7 +247,7 @@ dependencies = [
|
||||
"libasync",
|
||||
"libboard_artiq",
|
||||
"libboard_zynq",
|
||||
"libc",
|
||||
"libc 0.1.0",
|
||||
"libconfig",
|
||||
"libcortex_a9",
|
||||
"libm",
|
||||
@@ -304,6 +316,12 @@ dependencies = [
|
||||
"libboard_zynq",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.174"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776"
|
||||
|
||||
[[package]]
|
||||
name = "libconfig"
|
||||
version = "0.1.0"
|
||||
@@ -320,6 +338,7 @@ version = "0.0.0"
|
||||
dependencies = [
|
||||
"bit_field",
|
||||
"libregister",
|
||||
"log",
|
||||
"volatile-register",
|
||||
]
|
||||
|
||||
@@ -346,16 +365,10 @@ dependencies = [
|
||||
"libboard_zynq",
|
||||
"libcortex_a9",
|
||||
"libregister",
|
||||
"linked_list_allocator",
|
||||
"r0",
|
||||
"rlsf",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "linked_list_allocator"
|
||||
version = "0.8.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "822add9edb1860698b79522510da17bef885171f75aa395cff099d770c609c24"
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.4.14"
|
||||
@@ -422,7 +435,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -497,6 +510,18 @@ version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bd7a31eed1591dcbc95d92ad7161908e72f4677f8fabf2a32ca49b4237cbf211"
|
||||
|
||||
[[package]]
|
||||
name = "rlsf"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "222fb240c3286247ecdee6fa5341e7cdad0ffdf8e7e401d9937f2d58482a20bf"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"const-default",
|
||||
"libc 0.2.174",
|
||||
"svgbobdoc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "runtime"
|
||||
version = "0.1.0"
|
||||
@@ -516,7 +541,7 @@ dependencies = [
|
||||
"libasync",
|
||||
"libboard_artiq",
|
||||
"libboard_zynq",
|
||||
"libc",
|
||||
"libc 0.1.0",
|
||||
"libconfig",
|
||||
"libcortex_a9",
|
||||
"libregister",
|
||||
@@ -547,7 +572,7 @@ dependencies = [
|
||||
"libasync",
|
||||
"libboard_artiq",
|
||||
"libboard_zynq",
|
||||
"libc",
|
||||
"libc 0.1.0",
|
||||
"libconfig",
|
||||
"libcortex_a9",
|
||||
"libregister",
|
||||
@@ -579,6 +604,30 @@ dependencies = [
|
||||
"managed",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "svgbobdoc"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f2c04b93fc15d79b39c63218f15e3fdffaa4c227830686e3b7c5f41244eb3e50"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 1.0.109",
|
||||
"unicode-width",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.109"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.98"
|
||||
@@ -612,13 +661,19 @@ version = "1.0.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-width"
|
||||
version = "0.1.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
|
||||
|
||||
[[package]]
|
||||
name = "unwind"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"cfg-if 0.1.10",
|
||||
"libc",
|
||||
"libc 0.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
@@ -118,9 +118,7 @@ pub fn resolve(required: &[u8]) -> Option<u32> {
|
||||
api!(i2c_read = i2c::read),
|
||||
api!(i2c_switch_select = i2c::switch_select),
|
||||
|
||||
// dynamic memory allocation and reference counting
|
||||
api!(nac3_rc_incr = mem::nac3_rc_incr),
|
||||
api!(nac3_rc_decr = mem::nac3_rc_decr),
|
||||
// dynamic memory allocation
|
||||
api!(nac3_malloc = mem::nac3_malloc),
|
||||
|
||||
// subkernel
|
||||
|
||||
@@ -14,21 +14,7 @@ pub unsafe extern "C" fn nac3_malloc(size: usize) -> *mut u8 {
|
||||
rc_ptr.add(1).cast()
|
||||
}
|
||||
|
||||
pub unsafe extern "C" fn nac3_rc_incr(ptr: *mut u8) {
|
||||
let ptr = ptr.cast::<usize>().sub(1);
|
||||
*ptr += 1;
|
||||
}
|
||||
|
||||
pub unsafe extern "C" fn nac3_rc_decr(ptr: *mut u8) {
|
||||
let rc_ptr = ptr.cast::<usize>().sub(1);
|
||||
*rc_ptr -= 1;
|
||||
|
||||
if *ptr == 0 {
|
||||
nac3_free(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
pub unsafe fn nac3_free(ptr: *mut u8) {
|
||||
pub unsafe extern "C" fn nac3_free(ptr: *mut u8) {
|
||||
let size_ptr = ptr.sub(2 * mem::size_of::<usize>()).cast::<usize>();
|
||||
|
||||
dealloc(
|
||||
|
||||
Reference in New Issue
Block a user