log: improve the most common use case (#19242)

This commit is contained in:
Delyan Angelov 2023-08-31 06:44:11 +03:00 committed by GitHub
parent 55575fd7bd
commit 6fb4a481f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 576 additions and 150 deletions

11
vlib/sync/sync.c.v Normal file
View file

@ -0,0 +1,11 @@
module sync
[noreturn]
fn cpanic(res int) {
panic(unsafe { tos_clone(&u8(C.strerror(res))) })
}
[noreturn]
fn cpanic_errno() {
cpanic(C.errno)
}