arch/mips/include/asm/rtlx.h

Source file repositories/reference/linux-study-clean/arch/mips/include/asm/rtlx.h

File Facts

System
Linux kernel
Corpus path
arch/mips/include/asm/rtlx.h
Extension
.h
Size
2079 bytes
Lines
88
Domain
Architecture Layer
Bucket
arch/mips
Inferred role
Architecture Layer: operation-table or driver-model contract
Status
pattern implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

extern const struct file_operations rtlx_fops;
extern void (*aprp_hook)(void);

enum rtlx_state {
	RTLX_STATE_UNUSED = 0,
	RTLX_STATE_INITIALISED,
	RTLX_STATE_REMOTE_READY,
	RTLX_STATE_OPENED
};

extern struct chan_waitqueues {
	wait_queue_head_t rt_queue;
	wait_queue_head_t lx_queue;
	atomic_t in_open;
	struct mutex mutex;
} channel_wqs[RTLX_CHANNELS];

/* each channel supports read and write.
   linux (vpe0) reads lx_buffer and writes rt_buffer
   SP (vpe1) reads rt_buffer and writes lx_buffer
*/
struct rtlx_channel {
	enum rtlx_state rt_state;
	enum rtlx_state lx_state;

	int buffer_size;

	/* read and write indexes per buffer */
	int rt_write, rt_read;
	char *rt_buffer;

	int lx_write, lx_read;
	char *lx_buffer;
};

extern struct rtlx_info {
	unsigned long id;
	enum rtlx_state state;

	struct rtlx_channel channel[RTLX_CHANNELS];
} *rtlx;
#endif /* __ASM_RTLX_H_ */

Annotation

Implementation Notes