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 › uefi › tables › boot_services › BootServices › reinstallProtocolInterface Public Function reinstallProtocolInterface Doc Source Public Function std.os.uefi.tables.boot_services.BootServices.reinstallProtocolInterface
pub fn reinstallProtocolInterface (
self : *BootServices ,
handle : Handle ,
Protocol : type ,
old : ?*const Protocol ,
new : ?*const Protocol ,
) ReinstallProtocolInterfaceError !void Params self : *BootServices handle : Handle Protocol : type old : ?*const Protocol new : ?*const Protocol File os/uefi/tables/boot_services.zig: 604
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626 pub fn reinstallProtocolInterface (
self : *BootServices ,
handle : Handle ,
Protocol : type ,
old : ?*const Protocol ,
new : ?*const Protocol ,
) ReinstallProtocolInterfaceError !void {
if (!@hasDecl (Protocol , "guid" ))
@compileError ("protocol is missing guid" );
switch (self ._reinstallProtocolInterface (
handle ,
&Protocol .guid ,
old ,
new ,
)) {
.success => {},
.not_found => return error .NotFound ,
.access_denied => return error .AccessDenied ,
.invalid_parameter => return error .InvalidParameter ,
else => |status | return uefi .unexpectedStatus (status ),
}
}
Reinstalls a protocol interface on a device handle.
newmay be the same asold. If it is, the registered protocol notifications occur for the handle without replacing the interface on the handle.Any process that has registered to wait for the installation of the interface is notified.
The caller is responsible for ensuring that there are no references to
oldif it is being removed.