linux/kernel/time/test_udelay.c

// SPDX-License-Identifier: GPL-2.0
/*
 * udelay() test kernel module
 *
 * Test is executed by writing and reading to /sys/kernel/debug/udelay_test
 * Tests are configured by writing: USECS ITERATIONS
 * Tests are executed by reading from the same file.
 * Specifying usecs of 0 or negative values will run multiples tests.
 *
 * Copyright (C) 2014 Google, Inc.
 */

#include <linux/debugfs.h>
#include <linux/delay.h>
#include <linux/ktime.h>
#include <linux/module.h>
#include <linux/uaccess.h>

#define DEFAULT_ITERATIONS

#define DEBUGFS_FILENAME

static DEFINE_MUTEX(udelay_test_lock);
static int udelay_test_usecs;
static int udelay_test_iterations =;

static int udelay_test_single(struct seq_file *s, int usecs, uint32_t iters)
{}

static int udelay_test_show(struct seq_file *s, void *v)
{}

static int udelay_test_open(struct inode *inode, struct file *file)
{}

static ssize_t udelay_test_write(struct file *file, const char __user *buf,
		size_t count, loff_t *pos)
{}

static const struct file_operations udelay_test_debugfs_ops =;

static int __init udelay_test_init(void)
{}

module_init();

static void __exit udelay_test_exit(void)
{}

module_exit(udelay_test_exit);

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();