Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
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. Public Function

installProtocolInterfaces

Public Function
std.os.uefi.tables.boot_services.BootServices.installProtocolInterfaces
pub fn installProtocolInterfaces(
        self: *BootServices,
        handle: ?Handle,
        interfaces: anytype,
    ) InstallProtocolInterfacesError!Handle

Installs a set of protocol interfaces into the boot services environment.

This function's final argument should be a tuple of pointers to protocol interfaces. For example:

const handle = try boot_services.installProtocolInterfaces(null, .{
    &my_interface_1,
    &my_interface_2,
});

The underlying function accepts a vararg list of pairs of Guid pointers and opaque pointers to the interface. To provide a guid, the interface types should declare a guid constant like so:

pub const guid: uefi.Guid = .{ ... };

See std.os.uefi.protocol for examples of protocol type definitions.

Params

File

os/uefi/tables/boot_services.zig:1156
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
    pub fn installProtocolInterfaces(
        self: *BootServices,
        handle: ?Handle,
        interfaces: anytype,
    ) InstallProtocolInterfacesError!Handle {
        var hdl: ?Handle = handle;
        const args_tuple = protocolInterfaces(&hdl, interfaces);

        switch (@call(
            .auto,
            self._installMultipleProtocolInterfaces,
            args_tuple,
        )) {
            .success => return hdl.?,
            .already_started => return error.AlreadyStarted,
            .out_of_resources => return error.OutOfResources,
            .invalid_parameter => return error.InvalidParameter,
            else => |status| return uefi.unexpectedStatus(status),
        }
    }