iPXE
Functions | Variables
nap_test.c File Reference

CPU sleeping test. More...

#include <ipxe/nap.h>
#include <ipxe/test.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
static void nap_test_exec (void)
 Perform CPU sleeping self-test. More...
 

Variables

struct self_test nap_test __self_test
 CPU sleeping self-test. More...
 

Detailed Description

CPU sleeping test.

Definition in file nap_test.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ nap_test_exec()

static void nap_test_exec ( void  )
static

Perform CPU sleeping self-test.

Definition at line 42 of file nap_test.c.

42  {
43 
44  /* Check that we can sleep without crashing or halting forever */
45  cpu_nap();
46  ok ( 1 );
47 }
void cpu_nap(void)
Sleep until next CPU interrupt.
#define ok(success)
Definition: test.h:46

References cpu_nap(), and ok.

Variable Documentation

◆ __self_test

struct self_test nap_test __self_test
Initial value:
= {
.name = "nap",
.exec = nap_test_exec,
}
static void nap_test_exec(void)
Perform CPU sleeping self-test.
Definition: nap_test.c:42

CPU sleeping self-test.

Definition at line 50 of file nap_test.c.