source: drsdaq/VME/atlas/include/cmem_rcc/cmem_rcc_drv.h@ 2273

Last change on this file since 2273 was 22, checked in by ogrimm, 16 years ago
First commit of drsdaq program
  • Property svn:executable set to *
File size: 2.0 KB
Line 
1/************************************************************************/
2/* */
3/* This is the common header file for the CMEM_RCC driver & library */
4/* */
5/* 12. Dec. 01 MAJO created */
6/* */
7/*******C 2005 - The software with that certain something****************/
8
9#ifndef _CMEM_RCC_IOCTL_H
10#define _CMEM_RCC_IOCTL_H
11
12#include "cmem_rcc_common.h"
13
14// Constants
15#define MAX_BUFFS 1000 // Max. number of buffers for all processes
16#define TEXT_SIZE 3000 // For ioctl(CMEM_RCC_DUMP)
17#define MAX_PROC_TEXT_SIZE 0x10000 //The output of "more /proc/cmem_rcc" must not generate more characters than that
18
19/********/
20/*Macros*/
21/********/
22#ifdef DRIVER_DEBUG
23 #define kdebug(x) {if (debug) printk x;}
24#else
25 #define kdebug(x)
26#endif
27
28#ifdef DRIVER_ERROR
29 #define kerror(x) {if (errorlog) printk x;}
30#else
31 #define kerror(x)
32#endif
33
34
35// Types
36typedef struct
37{
38 u_long paddr;
39 u_long kaddr;
40 u_long uaddr;
41 u_int size;
42 u_int locked;
43 u_int order;
44 u_int type;
45 u_int used;
46 int pid;
47 char name[40];
48} buffer_t;
49
50typedef struct
51{
52 u_int buffer[MAX_BUFFS];
53} private_stuff;
54
55struct cmem_proc_data_t
56{
57 char name[10];
58 char value[100];
59};
60
61
62/*************/
63/*ioctl codes*/
64/*************/
65enum
66{
67 CMEM_RCC_GET = 1,
68 CMEM_RCC_FREE,
69 CMEM_RCC_LOCK,
70 CMEM_RCC_UNLOCK,
71 CMEM_RCC_GETPARAMS,
72 CMEM_RCC_SETUADDR,
73 CMEM_RCC_DUMP
74};
75
76/******************************/
77/*Standard function prototypes*/
78/******************************/
79static int cmem_rcc_open(struct inode *inode, struct file *file);
80static int cmem_rcc_release(struct inode *inode, struct file *file);
81static int cmem_rcc_ioctl(struct inode *inode, struct file *file, u_int cmd, u_long arg);
82static int cmem_rcc_mmap(struct file *file, struct vm_area_struct *vma);
83static int cmem_rcc_proc_write(struct file *file, const char *buffer, u_long count, void *data);
84static int cmem_rcc_proc_read(char *buf, char **start, off_t offset, int count, int *eof, void *data);
85
86#endif
87
Note: See TracBrowser for help on using the repository browser.