#include <linux/device.h>
#include <linux/export.h>
#include <linux/file.h>
#include <linux/posix-clock.h>
#include <linux/slab.h>
#include <linux/syscalls.h>
#include <linux/uaccess.h>
#include "posix-timers.h"
static struct posix_clock *get_posix_clock(struct file *fp)
{ … }
static void put_posix_clock(struct posix_clock *clk)
{ … }
static ssize_t posix_clock_read(struct file *fp, char __user *buf,
size_t count, loff_t *ppos)
{ … }
static __poll_t posix_clock_poll(struct file *fp, poll_table *wait)
{ … }
static long posix_clock_ioctl(struct file *fp,
unsigned int cmd, unsigned long arg)
{ … }
#ifdef CONFIG_COMPAT
static long posix_clock_compat_ioctl(struct file *fp,
unsigned int cmd, unsigned long arg)
{ … }
#endif
static int posix_clock_open(struct inode *inode, struct file *fp)
{ … }
static int posix_clock_release(struct inode *inode, struct file *fp)
{ … }
static const struct file_operations posix_clock_file_operations = …;
int posix_clock_register(struct posix_clock *clk, struct device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
void posix_clock_unregister(struct posix_clock *clk)
{ … }
EXPORT_SYMBOL_GPL(…);
struct posix_clock_desc { … };
static int get_clock_desc(const clockid_t id, struct posix_clock_desc *cd)
{ … }
static void put_clock_desc(struct posix_clock_desc *cd)
{ … }
static int pc_clock_adjtime(clockid_t id, struct __kernel_timex *tx)
{ … }
static int pc_clock_gettime(clockid_t id, struct timespec64 *ts)
{ … }
static int pc_clock_getres(clockid_t id, struct timespec64 *ts)
{ … }
static int pc_clock_settime(clockid_t id, const struct timespec64 *ts)
{ … }
const struct k_clock clock_posix_dynamic = …;