memalloc.h

来自「linux2.6.18下支持sd2.0的驱动程序源码,支持最大32G的SD卡」· C头文件 代码 · 共 77 行

H
77
字号
/*--------------------------------------------------------------------------------                                                                            ----       This software is confidential and proprietary and may be used        ----        only as expressly authorized by a licensing agreement from          ----                                                                            ----                            Hantro Products Oy.                             ----                                                                            ----      In the event of publication, the following notice is applicable:      ----                                                                            ----                   (C) COPYRIGHT 2002 HANTRO PRODUCTS OY                    ----                            ALL RIGHTS RESERVED                             ----                                                                            ----          The entire notice above must be reproduced on all copies.         ----                                                                            --------------------------------------------------------------------------------------  Project  : Penguin----  Abstract : Encoder device driver (kernel module) interface--------------------------------------------------------------------------------------  Version control information, please leave untouched.----  $RCSfile$--  $Author: root $--  $Date: 2006-03-15 11:58:36 +0800 (Wed, 15 Mar 2006) $--  $Revision: 2 $--  $Name$--------------------------------------------------------------------------------*/         #ifndef _HMP4ENC_H_#define _HMP4ENC_H_#include <linux/ioctl.h>    /* needed for the _IOW etc stuff used later *//* * Macros to help debugging */#undef PDEBUG   /* undef it, just in case */#ifdef MEMALLOC_DEBUG#  ifdef __KERNEL__    /* This one if debugging is on, and kernel space */#    define PDEBUG(fmt, args...) printk( KERN_INFO "memalloc: " fmt, ## args)#  else    /* This one for user space */#    define PDEBUG(fmt, args...) fprintf(stderr, fmt, ## args)#  endif#else#  define PDEBUG(fmt, args...)  /* not debugging: nothing */#endif/* * Ioctl definitions *//* Use 'k' as magic number */#define MEMALLOC_IOC_MAGIC  'k'/* * S means "Set" through a ptr, * T means "Tell" directly with the argument value * G means "Get": reply by setting through a pointer * Q means "Query": response is on the return value * X means "eXchange": G and S atomically * H means "sHift": T and Q atomically */#define MEMALLOC_IOCXGETBUFFER         _IOWR(MEMALLOC_IOC_MAGIC,  1, unsigned long)#define MEMALLOC_IOCSFREEBUFFER        _IOW(MEMALLOC_IOC_MAGIC,  2, unsigned long)/* ... more to come */#define MEMALLOC_IOCHARDRESET       _IO(MEMALLOC_IOC_MAGIC, 15) /* debugging tool */#define MEMALLOC_IOC_MAXNR 15#define mem_map_reserve(p)	set_bit(PG_reserved, &((p)->flags))#define mem_map_unreserve(p)	clear_bit(PG_reserved, &((p)->flags))#endif /* _HMP4ENC_H_ */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?