tools/testing/selftests/timens/timens.h

Source file repositories/reference/linux-study-clean/tools/testing/selftests/timens/timens.h

File Facts

System
Linux kernel
Corpus path
tools/testing/selftests/timens/timens.h
Extension
.h
Size
2323 bytes
Lines
112
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: implementation source
Status
source implementation candidate

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

if (clock_gettime(clk_id, res)) {
			pr_perror("clock_gettime(%d)", (int)clk_id);
			return -1;
		}
		return 0;
	}

	err = syscall(SYS_clock_gettime, clk_id, res);
	if (err)
		pr_perror("syscall(SYS_clock_gettime(%d))", (int)clk_id);

	return err;
}

static inline void nscheck(void)
{
	if (access("/proc/self/ns/time", F_OK) < 0)
		ksft_exit_skip("Time namespaces are not supported\n");
}

#endif

Annotation

Implementation Notes