refactor(ffi-linkage): Phase 6.3 — migrate std/ #foreign→extern

Pure source rename across 11 std modules (~60 sites): cli/core/fmt/fs/log/
net/kqueue/process/socket/thread/time/trace. All fn-decl markers — bare
'#foreign;', '#foreign libc;'/'#foreign tlib;' (LIB ref), and
'#foreign libc "csym";' (LIB+rename) → the same 'extern …' tail (extern carries
the identical [LIB] ["csym"] axis). Plus 2 stale comment mentions (fmt/fs).
No class forms in std. These modules ARE host-corpus-exercised, so the empty
snapshot diff is direct validation. Suite green (647 corpus / 444 unit, 0
failed).
This commit is contained in:
agra
2026-06-15 04:35:52 +03:00
parent 0fbcee7e36
commit 59f90d2939
11 changed files with 60 additions and 60 deletions

View File

@@ -26,20 +26,20 @@
tlib :: #library "c";
pthread_create :: (thread: *usize, attr: *void, start: (*void) -> *void callconv(.c), arg: *void) -> i32 #foreign tlib;
pthread_join :: (thread: usize, retval: **void) -> i32 #foreign tlib;
pthread_detach :: (thread: usize) -> i32 #foreign tlib;
pthread_create :: (thread: *usize, attr: *void, start: (*void) -> *void callconv(.c), arg: *void) -> i32 extern tlib;
pthread_join :: (thread: usize, retval: **void) -> i32 extern tlib;
pthread_detach :: (thread: usize) -> i32 extern tlib;
pthread_mutex_init :: (m: *MutexBuf, attr: *void) -> i32 #foreign tlib;
pthread_mutex_lock :: (m: *MutexBuf) -> i32 #foreign tlib;
pthread_mutex_unlock :: (m: *MutexBuf) -> i32 #foreign tlib;
pthread_mutex_destroy :: (m: *MutexBuf) -> i32 #foreign tlib;
pthread_mutex_init :: (m: *MutexBuf, attr: *void) -> i32 extern tlib;
pthread_mutex_lock :: (m: *MutexBuf) -> i32 extern tlib;
pthread_mutex_unlock :: (m: *MutexBuf) -> i32 extern tlib;
pthread_mutex_destroy :: (m: *MutexBuf) -> i32 extern tlib;
pthread_cond_init :: (c: *CondBuf, attr: *void) -> i32 #foreign tlib;
pthread_cond_wait :: (c: *CondBuf, m: *MutexBuf) -> i32 #foreign tlib;
pthread_cond_signal :: (c: *CondBuf) -> i32 #foreign tlib;
pthread_cond_broadcast :: (c: *CondBuf) -> i32 #foreign tlib;
pthread_cond_destroy :: (c: *CondBuf) -> i32 #foreign tlib;
pthread_cond_init :: (c: *CondBuf, attr: *void) -> i32 extern tlib;
pthread_cond_wait :: (c: *CondBuf, m: *MutexBuf) -> i32 extern tlib;
pthread_cond_signal :: (c: *CondBuf) -> i32 extern tlib;
pthread_cond_broadcast :: (c: *CondBuf) -> i32 extern tlib;
pthread_cond_destroy :: (c: *CondBuf) -> i32 extern tlib;
// darwin pthread_mutex_t: { long __sig; char __opaque[56]; } — 64 bytes.
MutexBuf :: struct {