]> git.nega.tv - josh/narcissus/commit
Use Rust's ThreadId instead of gettid
authorJoshua Simmons <josh@nega.tv>
Sat, 5 Nov 2022 12:53:12 +0000 (13:53 +0100)
committerJoshua Simmons <josh@nega.tv>
Sat, 5 Nov 2022 12:53:12 +0000 (13:53 +0100)
commit2fdf97a5eb1b1302c16813027d72f1f3ad885f1c
tree9634ec4fc770fc379515283c3e91dcf885cd4d04
parent633657b7bdbe049552b5b234ad3aa1ec53bb584f
Use Rust's ThreadId instead of gettid

It's a little bit nasty due to needing to wrap it in Option, however it
avoids making the gettid syscall every time we do a lock / unlock
operation. Small performance improvement in debug mode.
narcissus-core/src/lib.rs
narcissus-core/src/libc.rs
narcissus-core/src/mutex.rs