include/uapi/linux/um_timetravel.h

Source file repositories/reference/linux-study-clean/include/uapi/linux/um_timetravel.h

File Facts

System
Linux kernel
Corpus path
include/uapi/linux/um_timetravel.h
Extension
.h
Size
10135 bytes
Lines
295
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct um_timetravel_msg {
	/**
	 * @op: operation value from &enum um_timetravel_ops
	 */
	__u32 op;

	/**
	 * @seq: sequence number for the message - shall be reflected in
	 *	the ACK response, and should be checked while processing
	 *	the response to see if it matches
	 */
	__u32 seq;

	/**
	 * @time: time in nanoseconds
	 */
	__u64 time;
};

/* max number of file descriptors that can be sent/received in a message */
#define UM_TIMETRAVEL_MAX_FDS 2

/**
 * enum um_timetravel_shared_mem_fds - fds sent in ACK message for START message
 */
enum um_timetravel_shared_mem_fds {
	/**
	 * @UM_TIMETRAVEL_SHARED_MEMFD: Index of the shared memory file
	 *	descriptor in the control message
	 */
	UM_TIMETRAVEL_SHARED_MEMFD,
	/**
	 * @UM_TIMETRAVEL_SHARED_LOGFD: Index of the logging file descriptor
	 *	in the control message
	 */
	UM_TIMETRAVEL_SHARED_LOGFD,
	/**
	 * @UM_TIMETRAVEL_SHARED_MAX_FDS: number of fds listed here
	 */
	UM_TIMETRAVEL_SHARED_MAX_FDS,
};

/**
 * enum um_timetravel_start_ack - ack-time mask for start message
 */
enum um_timetravel_start_ack {
	/**
	 * @UM_TIMETRAVEL_START_ACK_ID: client ID that controller allocated.
	 */
	UM_TIMETRAVEL_START_ACK_ID = 0xffff,
};

/**
 * enum um_timetravel_ops - Operation codes
 */
enum um_timetravel_ops {
	/**
	 * @UM_TIMETRAVEL_ACK: response (ACK) to any previous message,
	 *	this usually doesn't carry any data in the 'time' field
	 *	unless otherwise specified below, note: while using shared
	 *	memory no ACK for WAIT and RUN messages, for more info see
	 *	&struct um_timetravel_schedshm.
	 */
	UM_TIMETRAVEL_ACK		= 0,

	/**
	 * @UM_TIMETRAVEL_START: initialize the connection, the time
	 *	field contains an (arbitrary) ID to possibly be able
	 *	to distinguish the connections.
	 */
	UM_TIMETRAVEL_START		= 1,

	/**
	 * @UM_TIMETRAVEL_REQUEST: request to run at the given time
	 *	(host -> calendar)
	 */
	UM_TIMETRAVEL_REQUEST		= 2,

	/**
	 * @UM_TIMETRAVEL_WAIT: Indicate waiting for the previously requested
	 *	runtime, new requests may be made while waiting (e.g. due to
	 *	interrupts); the time field is ignored. The calendar must process
	 *	this message and later	send a %UM_TIMETRAVEL_RUN message when
	 *	the host can run again.
	 *	(host -> calendar)
	 */
	UM_TIMETRAVEL_WAIT		= 3,

	/**
	 * @UM_TIMETRAVEL_GET: return the current time from the calendar in the

Annotation

Implementation Notes