include/linux/hw_random.h

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

File Facts

System
Linux kernel
Corpus path
include/linux/hw_random.h
Extension
.h
Size
2358 bytes
Lines
70
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 hwrng {
	const char *name;
	int (*init)(struct hwrng *rng);
	void (*cleanup)(struct hwrng *rng);
	int (*data_present)(struct hwrng *rng, int wait);
	int (*data_read)(struct hwrng *rng, u32 *data);
	int (*read)(struct hwrng *rng, void *data, size_t max, bool wait);
	unsigned long priv;
	unsigned short quality;

	/* private: internal. */
	struct list_head list;
	struct kref ref;
	struct work_struct cleanup_work;
	struct completion cleanup_done;
	struct completion dying;
};

struct device;

/** Register a new Hardware Random Number Generator driver. */
extern int hwrng_register(struct hwrng *rng);
extern int devm_hwrng_register(struct device *dev, struct hwrng *rng);
/** Unregister a Hardware Random Number Generator driver. */
extern void hwrng_unregister(struct hwrng *rng);
extern void devm_hwrng_unregister(struct device *dve, struct hwrng *rng);

extern long hwrng_msleep(struct hwrng *rng, unsigned int msecs);
extern long hwrng_yield(struct hwrng *rng);

#endif /* LINUX_HWRANDOM_H_ */

Annotation

Implementation Notes