include/linux/pps_gen_kernel.h

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

File Facts

System
Linux kernel
Corpus path
include/linux/pps_gen_kernel.h
Extension
.h
Size
1995 bytes
Lines
79
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 pps_gen_source_info {
	bool use_system_clock;

	int (*get_time)(struct pps_gen_device *pps_gen,
					struct timespec64 *time);
	int (*enable)(struct pps_gen_device *pps_gen, bool enable);

/* private: internal use only */
	struct module *owner;
	struct device *parent;			/* for device_create */
};

/* The main struct */
struct pps_gen_device {
	const struct pps_gen_source_info *info;	/* PSS generator info */
	bool enabled;				/* PSS generator status */

	unsigned int event;
	unsigned int sequence;

	unsigned int last_ev;			/* last PPS event id */
	wait_queue_head_t queue;		/* PPS event queue */

	unsigned int id;			/* PPS generator unique ID */
	struct cdev cdev;
	struct device *dev;
	struct fasync_struct *async_queue;	/* fasync method */
	spinlock_t lock;
};

/*
 * Global variables
 */

extern const struct attribute_group *pps_gen_groups[];

/*
 * Exported functions
 */

extern struct pps_gen_device *pps_gen_register_source(
				const struct pps_gen_source_info *info);
extern void pps_gen_unregister_source(struct pps_gen_device *pps_gen);
extern void pps_gen_event(struct pps_gen_device *pps_gen,
				unsigned int event, void *data);

#endif /* LINUX_PPS_GEN_KERNEL_H */

Annotation

Implementation Notes