osdep header

The documentation of QEMU’s qemu/osdep.h header.

unsigned long qemu_getauxval(unsigned long type)

Parameters

unsigned long type
the auxiliary vector key to lookup

Description

Search the auxiliary vector for type, returning the value or 0 if type is not present.

uint64_t qemu_get_pmem_size(const char * filename, Error ** errp)

Parameters

const char * filename
path to a pmem file
Error ** errp
pointer to a NULL-initialized error object

Description

Determine the size of a persistent memory file. Besides supporting files on DAX file systems, this function also supports Linux devdax character devices.

Return

the size or 0 on failure

char * qemu_get_pid_name(pid_t pid)

Parameters

pid_t pid
pid of a process

Description

For given pid fetch its name. Caller is responsible for freeing the string when no longer needed. Returns allocated string on success, NULL on failure.

pid_t qemu_fork(Error ** errp)

Parameters

Error ** errp
undescribed

Description

A version of fork that avoids signal handler race conditions that can lead to child process getting signals that are otherwise only expected by the parent. It also resets all signal handlers to the default settings.

Returns 0 to child process, pid number to parent or -1 on failure.