本文整理汇总了C++中EFI_BOOT_SERVICES::SetWatchdogTimer方法的典型用法代码示例。如果您正苦于以下问题:C++ EFI_BOOT_SERVICES::SetWatchdogTimer方法的具体用法?C++ EFI_BOOT_SERVICES::SetWatchdogTimer怎么用?C++ EFI_BOOT_SERVICES::SetWatchdogTimer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EFI_BOOT_SERVICES
的用法示例。
在下文中一共展示了EFI_BOOT_SERVICES::SetWatchdogTimer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
EFI_STATUS EFIAPI
OvrSetWatchdogTimer(
IN UINTN Timeout,
IN UINT64 WatchdogCode,
IN UINTN DataSize,
IN CHAR16 *WatchdogData
)
{
EFI_STATUS Status;
Status = gOrgBS.SetWatchdogTimer(Timeout, WatchdogCode, DataSize, WatchdogData);
PRINT("->SetWatchdogTimer(%d, 0x%x, %d, %s) = %r\n", Timeout, WatchdogCode, DataSize, WatchdogData, Status);
return Status;
}
示例2: efi_watchdog_expired
/**
* Hold off watchdog timer
*
* @v retry Retry timer
* @v over Failure indicator
*/
static void efi_watchdog_expired ( struct retry_timer *timer,
int over __unused ) {
EFI_BOOT_SERVICES *bs = efi_systab->BootServices;
static CHAR16 data[] = WATCHDOG_DATA;
EFI_STATUS efirc;
int rc;
DBGC2 ( timer, "EFI holding off watchdog timer\n" );
/* Restart this holdoff timer */
start_timer_fixed ( timer, ( WATCHDOG_HOLDOFF_SECS * TICKS_PER_SEC ) );
/* Reset watchdog timer */
if ( ( efirc = bs->SetWatchdogTimer ( WATCHDOG_TIMEOUT_SECS,
WATCHDOG_CODE, sizeof ( data ),
data ) ) != 0 ) {
rc = -EEFI ( efirc );
DBGC ( timer, "EFI could not set watchdog timer: %s\n",
strerror ( rc ) );
return;
}
}