Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions | Variables
posix-clock.c File Reference
#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>

Go to the source code of this file.

Data Structures

struct  posix_clock_desc
 

Functions

int posix_clock_register (struct posix_clock *clk, dev_t devid)
 
 EXPORT_SYMBOL_GPL (posix_clock_register)
 
void posix_clock_unregister (struct posix_clock *clk)
 
 EXPORT_SYMBOL_GPL (posix_clock_unregister)
 

Variables

struct k_clock clock_posix_dynamic
 

Function Documentation

EXPORT_SYMBOL_GPL ( posix_clock_register  )
EXPORT_SYMBOL_GPL ( posix_clock_unregister  )
int posix_clock_register ( struct posix_clock clk,
dev_t  devid 
)

posix_clock_register() - register a new clock : Pointer to the clock. Caller must provide 'ops' and 'release' : Allocated device id

A clock driver calls this function to register itself with the clock device subsystem. If 'clk' points to dynamically allocated memory, then the caller must provide a 'release' function to free that memory.

Returns zero on success, non-zero otherwise.

Definition at line 209 of file posix-clock.c.

void posix_clock_unregister ( struct posix_clock clk)

posix_clock_unregister() - unregister a clock : Clock instance previously registered via posix_clock_register()

A clock driver calls this function to remove itself from the clock device subsystem. The posix_clock itself will remain (in an inactive state) until its reference count drops to zero, at which point it will be deallocated with its 'release' method.

Definition at line 232 of file posix-clock.c.

Variable Documentation

struct k_clock clock_posix_dynamic
Initial value:
= {
.clock_getres = pc_clock_getres,
.clock_set = pc_clock_settime,
.clock_get = pc_clock_gettime,
.clock_adj = pc_clock_adjtime,
.timer_create = pc_timer_create,
.timer_set = pc_timer_settime,
.timer_del = pc_timer_delete,
.timer_get = pc_timer_gettime,
}

Definition at line 437 of file posix-clock.c.