Zig 0.17.0-dev (Split by item) This is an example of documentation generated by
ZigDoc , an alternative to Zig's built-in
Auto Doc feature. See also
examples in other modes/formats . The project being documented here (as the example) is the Zig standard library.
std › os › linux › bpf › map_delete_elem Public Function map_delete_elem Doc Source Public Function std.os.linux.bpf.map_delete_elem
pub fn map_delete_elem (fd : fd_t , key : []const u8 ) !void Params File os/linux/bpf.zig: 1681
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699 pub fn map_delete_elem (fd : fd_t , key : []const u8 ) !void {
var attr = Attr {
.map_elem = std .mem .zeroes (MapElemAttr ),
};
attr .map_elem .map_fd = fd ;
attr .map_elem .key = @intFromPtr (key .ptr );
const rc = linux .bpf (.map_delete_elem , &attr , @sizeOf (MapElemAttr ));
switch (errno (rc )) {
.SUCCESS => return ,
.BADF => return error .BadFd ,
.FAULT => unreachable ,
.INVAL => return error .FieldInAttrNeedsZeroing ,
.NOENT => return error .NotFound ,
.PERM => return error .PermissionDenied ,
else => |err | return unexpectedErrno (err ),
}
}