Path: blob/main/core/kernel/src/wasm/posix/stdio.zig
1068 views
pub fn keepalive() void {}1const stdio = @cImport(@cInclude("stdio.h"));2const std = @import("std");3const expect = std.testing.expect;45// These three functions are about locking files for *threads*, and we don't6// support threads in any nontrivial way yet, so these are no-ops.7export fn flockfile(filehandle: ?*stdio.FILE) void {8_ = filehandle;9}1011test "flockfile" {12flockfile(null);13}1415export fn ftrylockfile(filehandle: ?*stdio.FILE) c_int {16_ = filehandle;17return 0;18}1920test "flockfile" {21try expect(ftrylockfile(null) == 0);22}2324export fn funlockfile(filehandle: ?*stdio.FILE) void {25_ = filehandle;26}2728test "funlockfile" {29funlockfile(null);30}31323334