gnbd_macros.h

来自「openGFS , a kind of file system.」· C头文件 代码 · 共 60 行

H
60
字号
/* * *    Copyright 1999 Regents of the University of Minnesota *    Portions Copyright 1999-2001 Sistina Software, Inc. * *    This is free software released under the GNU General Public License. *    There is no warranty for this software.  See the file COPYING for *    details. * *    See the file AUTHORS for a list of contributors. * */#ifndef _GNBD_MACROS_H#define _GNBD_MACROS_H/* * Macros to help debugging */#undef printd			/* undef it, just in case */#ifdef DEBUG# define printd(fmt, args...) printk( KERN_DEBUG "gnbd %d : " fmt, \                                     (int)current->pid , ## args)#else# define printd(fmt, args...)	/* not debugging: nothing */#endif#undef printdd#define printdd(fmt, args...)	/* nothing: it's a placeholder *//* Easy way to print out errs.*/#undef printe#define printe(fmt, args...) printk(KERN_ERR "gnbd %d : " fmt, \                                    (int)current->pid , ## args)/* Easy way to print out warns.*/#undef printw#define printw(fmt, args...) printk(KERN_WARNING "gnbd %d : " fmt, \                                    (int)current->pid , ## args)/* Easy way to print out basic stuff.*/#undef printi#define printi(fmt, args...) printk("gnbd %d : " fmt, \                                    (int)current->pid , ## args)#define PTICK printi("tick.\n")#define ASSERT(x)							  \do {									  \	if ((x))							  \		break;							  \        printk(KERN_EMERG "\n\nYou've found a bug in gnbd!\n\n");	  \        printk(KERN_EMERG "Please copy down the following line and send " \			"it to opengfs-devel@lists.sourceforge.net\n\n"); \        panic("gnbd:  Assertion \"%s\" failed on line %d of file %s\n",	  \			#x, __LINE__, __FILE__);			  \} while (0)#endif /* _GNBD_MACROS_H */

⌨️ 快捷键说明

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