A library call is not the boundary
A system call is a boundary through which a userspace program requests an operating system service, such as a file, socket or process operation. A library function does not necessarily correspond to exactly one system call. It may update only a userspace buffer, or issue several kernel requests. Separate the CPU mechanism for entering privileged execution from the operating system’s interface contract. That distinction helps explain where validation happens, which state can change and why observing a function name in application code does not prove that a particular kernel operation occurred at that point.
Account for a short write
Suppose write requests 100 bytes and returns 40. The return value reports progress of 40 bytes, leaving 60 bytes to handle from the correct offset if the application intends to complete the transfer. Blindly resending the original 100 bytes can duplicate the prefix. Errors, interruption and nonblocking behaviour must be handled according to the particular call and descriptor type. Do not reduce every request to a Boolean success or failure. The interface can report partial progress, and an application must preserve that information when deciding whether to retry, wait, stop or report an error.
Pointers do not grant authority
A userspace pointer is an address supplied by the requesting program, not an authority to access arbitrary memory or resources. The kernel must apply the interface’s rules for accessibility, lengths and permissions. Knowing an address numerically does not make the named storage safe to use. Concurrent changes to request data can also complicate reasoning about what was checked and what was later used. An application’s pre-check does not replace the kernel’s validation. Robust interfaces carefully specify how arguments are copied or referenced, and applications still need synchronization for their own shared data.
Trace the correct layer
Tracing tools such as strace can connect application behaviour to actual kernel requests and their results. Tracing itself can affect timing and scheduling, so it is not automatically a neutral benchmark. A returned write is also not the same as data being durably stored: persistence requires the relevant storage and synchronization contract. Understanding the boundary is not merely a quest to minimize the number of calls. It lets you assign responsibility for validation, partial execution, blocking and durability, and then test each responsibility at the layer where its guarantees are actually defined.