fixed the issue of no mutex lock/unlock when accessing some maps.

added a wpx service
This commit is contained in:
2024-12-26 00:20:44 +09:00
parent fcb7ae5ade
commit 6809cfdeb6
6 changed files with 158 additions and 121 deletions

View File

@ -24,7 +24,7 @@ func monotonic_time() uint64 {
var r uintptr
var sts syscall.Timespec
r, _, _/*errno*/ = syscall.Syscall(syscall.SYS_CLOCK_GETTIME, unix.CLOCK_MONOTONIC, uintptr(unsafe.Pointer(&sts)), 0)
if r == ^uintptr(0) { return uint64(n) } // may be negative cast to unsigned. no other fall-back
if r == ^uintptr(0) { return uint64(n) } // may be a negative number cast to unsigned. no other fall-back
return uint64(sts.Nano())
}