source: fact/drsdaq/VME/atlas/include/cmem_rcc/cmem_rcc.h@ 10099

Last change on this file since 10099 was 22, checked in by ogrimm, 16 years ago
First commit of drsdaq program
  • Property svn:executable set to *
File size: 2.7 KB
Line 
1/************************************************************************/
2/* */
3/* This is the common header file for the CMEM_RCC */
4/* library & applications */
5/* */
6/* 12. Dec. 01 MAJO created */
7/* */
8/*******C 2001 - The software with that certain something****************/
9
10#ifndef _CMEM_RCC_H
11#define _CMEM_RCC_H
12
13#include <sys/types.h>
14#include "cmem_rcc_common.h"
15
16//Error strings
17#define CMEM_RCC_SUCCESS_STR "No error"
18#define CMEM_RCC_ERROR_FAIL_STR "Failed to install the error library"
19#define CMEM_RCC_FILE_STR "Failed to open /dev/cmem_rcc"
20#define CMEM_RCC_NOTOPEN_STR "Library has not yet been opened"
21#define CMEM_RCC_IOCTL_STR "Error from call to ioctl function"
22#define CMEM_RCC_MMAP_STR "Error from call to mmap function"
23#define CMEM_RCC_MUNMAP_STR "Error from call to munmap function"
24#define CMEM_RCC_NO_CODE_STR "Unknown error"
25#define CMEM_RCC_OVERFLOW_STR "All descriptors are in use"
26#define CMEM_RCC_TOOBIG_STR "Size is too big"
27#define CMEM_RCC_ILLHAND_STR "Invalid handle"
28#define CMEM_RCC_GETP_STR "Error from call to CMEM_SegmentGet"
29#define CMEM_RCC_NOSIZE_STR "The <size> paremeter is zero"
30#define CMEM_RCC_CFU_STR "Error from the driver in call to copy_from_user"
31#define CMEM_RCC_GFP_STR "Error from the driver in call to __get_free_pages"
32#define CMEM_RCC_BPA_STR "Error from the driver in call to BPA function"
33#define CMEM_RCC_CTU_STR "Error from the driver in call to copy_To_user"
34#define CMEM_RCC_KMALLOC_STR "Error from the driver in call to kmalloc"
35/************/
36/*Prototypes*/
37/************/
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42CMEM_Error_code_t CMEM_Open(void);
43CMEM_Error_code_t CMEM_Close(void);
44CMEM_Error_code_t CMEM_SegmentAllocate(u_int size, char *name, int *segment_identifier);
45CMEM_Error_code_t CMEM_SegmentFree(int segment_identifier);
46CMEM_Error_code_t CMEM_SegmentSize(int segment_identifier, u_int *actual_size);
47CMEM_Error_code_t CMEM_SegmentLock(int segment_identifier);
48CMEM_Error_code_t CMEM_SegmentUnlock(int segment_identifier);
49CMEM_Error_code_t CMEM_SegmentPhysicalAddress(int segment_identifier, u_long *physical_address);
50CMEM_Error_code_t CMEM_SegmentVirtualAddress(int segment_identifier, u_long *virtual_address);
51CMEM_Error_code_t CMEM_Dump(void);
52CMEM_Error_code_t CMEM_err_get(err_pack err, err_str pid, err_str code);
53CMEM_Error_code_t CMEM_BPASegmentAllocate(u_int size, char *name, int *segment_identifier);
54CMEM_Error_code_t CMEM_BPASegmentFree(int segment_identifier);
55CMEM_Error_code_t CMEM_SegmentGet(int segment_identifier, cmem_rcc_t *params);
56
57#ifdef __cplusplus
58}
59#endif
60
61#endif
Note: See TracBrowser for help on using the repository browser.