⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 r200_lock.h

📁 Mesa is an open-source implementation of the OpenGL specification - a system for rendering interacti
💻 H
字号:
/*Copyright (C) The Weather Channel, Inc.  2002.  All Rights Reserved.The Weather Channel (TM) funded Tungsten Graphics to develop theinitial release of the Radeon 8500 driver under the XFree86 license.This notice must be preserved.Permission is hereby granted, free of charge, to any person obtaininga copy of this software and associated documentation files (the"Software"), to deal in the Software without restriction, includingwithout limitation the rights to use, copy, modify, merge, publish,distribute, sublicense, and/or sell copies of the Software, and topermit persons to whom the Software is furnished to do so, subject tothe following conditions:The above copyright notice and this permission notice (including thenext paragraph) shall be included in all copies or substantialportions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OFMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BELIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTIONOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTIONWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.**************************************************************************//* * Authors: *   Keith Whitwell <keith@tungstengraphics.com> */#ifndef __R200_LOCK_H__#define __R200_LOCK_H__extern void r200GetLock( r200ContextPtr rmesa, GLuint flags );/* Turn DEBUG_LOCKING on to find locking conflicts. */#define DEBUG_LOCKING	0#if DEBUG_LOCKINGextern char *prevLockFile;extern int prevLockLine;#define DEBUG_LOCK()							\   do {									\      prevLockFile = (__FILE__);					\      prevLockLine = (__LINE__);					\   } while (0)#define DEBUG_RESET()							\   do {									\      prevLockFile = 0;							\      prevLockLine = 0;							\   } while (0)#define DEBUG_CHECK_LOCK()						\   do {									\      if ( prevLockFile ) {						\	 fprintf( stderr,						\		  "LOCK SET!\n\tPrevious %s:%d\n\tCurrent: %s:%d\n",	\		  prevLockFile, prevLockLine, __FILE__, __LINE__ );	\	 exit( 1 );							\      }									\   } while (0)#else#define DEBUG_LOCK()#define DEBUG_RESET()#define DEBUG_CHECK_LOCK()#endif/* * !!! We may want to separate locks from locks with validation.  This * could be used to improve performance for those things commands that * do not do any drawing !!! *//* Lock the hardware and validate our state. */#define LOCK_HARDWARE( rmesa )					\   do {								\      char __ret = 0;						\      DEBUG_CHECK_LOCK();					\      DRM_CAS( rmesa->dri.hwLock, rmesa->dri.hwContext,		\	       (DRM_LOCK_HELD | rmesa->dri.hwContext), __ret );	\      if ( __ret )						\	 r200GetLock( rmesa, 0 );				\      DEBUG_LOCK();						\   } while (0)#define UNLOCK_HARDWARE( rmesa )					\   do {									\      DRM_UNLOCK( rmesa->dri.fd,					\		  rmesa->dri.hwLock,					\		  rmesa->dri.hwContext );				\      DEBUG_RESET();							\   } while (0)#endif /* __R200_LOCK_H__ */

⌨️ 快捷键说明

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