include/linux/raspberrypi/vchiq.h

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

File Facts

System
Linux kernel
Corpus path
include/linux/raspberrypi/vchiq.h
Extension
.h
Size
3891 bytes
Lines
113
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 vchiq_header {
	/* The message identifier - opaque to applications. */
	int msgid;

	/* Size of message data. */
	unsigned int size;

	char data[];           /* message */
};

struct vchiq_element {
	const void __user *data;
	unsigned int size;
};

struct vchiq_instance;
struct vchiq_state;

struct vchiq_service_base {
	int fourcc;
	int (*callback)(struct vchiq_instance *instance,
			enum vchiq_reason reason,
			struct vchiq_header *header,
			unsigned int handle,
			void *cb_data, void __user *cb_userdata);
	void *userdata;
};

struct vchiq_completion_data_kernel {
	enum vchiq_reason reason;
	struct vchiq_header *header;
	void *service_userdata;
	void *cb_data;
	void  __user *cb_userdata;
};

struct vchiq_service_params_kernel {
	int fourcc;
	int (*callback)(struct vchiq_instance *instance,
			enum vchiq_reason reason,
			struct vchiq_header *header,
			unsigned int handle,
			void *cb_data, void __user *cb_userdata);
	void *userdata;
	short version;       /* Increment for non-trivial changes */
	short version_min;   /* Update for incompatible changes */
};

extern int vchiq_initialise(struct vchiq_state *state,
			    struct vchiq_instance **pinstance);
extern int vchiq_shutdown(struct vchiq_instance *instance);
extern int vchiq_connect(struct vchiq_instance *instance);
extern int vchiq_open_service(struct vchiq_instance *instance,
			      const struct vchiq_service_params_kernel *params,
			      unsigned int *pservice);
extern int vchiq_close_service(struct vchiq_instance *instance,
			       unsigned int service);
extern int vchiq_use_service(struct vchiq_instance *instance, unsigned int service);
extern int vchiq_release_service(struct vchiq_instance *instance,
				 unsigned int service);
extern void vchiq_msg_queue_push(struct vchiq_instance *instance, unsigned int handle,
				 struct vchiq_header *header);
extern void vchiq_release_message(struct vchiq_instance *instance, unsigned int service,
				  struct vchiq_header *header);
extern int vchiq_queue_kernel_message(struct vchiq_instance *instance, unsigned int handle,
				      void *data, unsigned int size);
extern int vchiq_bulk_transmit(struct vchiq_instance *instance, unsigned int service,
			       const void *data, unsigned int size, void *userdata,
			       enum vchiq_bulk_mode mode);
extern int vchiq_bulk_receive(struct vchiq_instance *instance, unsigned int service,
			      void *data, unsigned int size, void *userdata,
			      enum vchiq_bulk_mode mode);
extern void *vchiq_get_service_userdata(struct vchiq_instance *instance, unsigned int service);
extern int vchiq_get_peer_version(struct vchiq_instance *instance, unsigned int handle,
				  short *peer_version);
extern struct vchiq_header *vchiq_msg_hold(struct vchiq_instance *instance, unsigned int handle);

#endif /* VCHIQ_H */

Annotation

Implementation Notes