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

📄 rvplatform.h

📁 h.248协议源码
💻 H
字号:
#if (0)
******************************************************************************
Filename    :
Description :
******************************************************************************
                Copyright (c) 1999 RADVision Inc.
************************************************************************
NOTICE:
This document contains information that is proprietary to RADVision LTD.
No part of this publication may be reproduced in any form whatsoever 
without written prior approval by RADVision LTD..

RADVision LTD. reserves the right to revise this publication and make 
changes without obligation to notify any person of such revisions or 
changes.
******************************************************************************
$Revision:$
$Date:$
$Author: S. Cipolli$
******************************************************************************
#endif

#ifndef RV_PLATFORM_H
#define RV_PLATFORM_H

/***************************************************************************** 
 * Platform options:
 *	RV_THREAD_	(Thread implementation)
 *		POSIX - POSIX compliant implementation.
 *		WIN32 - Microsoft OS specific implementation.
 *		VXWORKS - VxWorks specific implementation.
 *		PSOS - PSoS specific implementation.
 *	RV_SEMAPHORE_	(Semaphore implementation)
 *		POSIX - POSIX compliant implementation.
 *		WIN32 - Microsoft OS specific implementation.
 *		VXWORKS - VxWorks specific implementation.
 *		PSOS - PSoS specific implementation.
 *		OSE - OSE specific implementation.
 *	RV_MUTEX_	(Recursive mutex implementation)
 *		GENERIC - Platform independent implementation.
 *		POSIX - POSIX plus semi-standard recursive attribute implementation.
 *		REDHAT - Red Hat specific implementation.
 *		WIN32 - Microsoft OS specific implementation.
 *		VXWORKS - VxWorks specific implementation.
 *		PSOS - PSoS specific implementation.
 *	RV_COND_	(Condition variable implementation)
 *		GENERIC - Platform independent implementation.
 *		POSIX - POSIX compliant implementation.
 *	RV_MEM_		(Dynamic memory interface)
 *		ANSI
 *		OSE - OSE Specific implementation
 *		NUCLEUS - Nucleus Specific implementation
 *		PSOS - pSOS Specific implementation
 *		OTHER - Customer defined implementation.
 *	RV_IO_		(I/O implementation)
 *		ANSI
 *		NONE
 *	RV_FILEIO_	(File I/O implementation)
 *		ANSI
 *		NONE
 *	RV_SOCKETS_	(Sockets implementation)
 *		BSD - BSD compliant implementation.
 *		WSOCK - Microsoft OS specific implementation.
 *		PSOS - PSoS specific implementation.
 *		NUCLEUS - Nucleus specific implementation.
 *	RV_SOCKETADDR_	(Socket address implementation)
 *		BSD43 - BSD 4.3 compliant implementation.
 *		BSD44 - BSD 4.4 (and BSD 4.3 Reno) compliant implementation.
 *	RV_DNS_		(DNS implementation)
 *		POSIX - POSIX compliant implementation.
 *		BSD - BSD compliant implementation.
 *		WSOCK - Microsoft OS specific implementation.
 *		VXWORKS - VxWorks specific implementation.
 *		PSOS - PSoS specific implementation.
 *		OSE - OSE specific implementation.
 *		NONE - Domain names will not be resolved.
 *****************************************************************************/
/*	
 *	Must check for VxWorks before Win32 because the GNU compiler
 *	for VxWorks hosted on Win32 platforms defines _WIN32 
 */
/***** VxWorks *****/
#if defined(_VXWORKS)
#	define RV_OS_VXWORKS
#	define RV_THREAD_VXWORKS
#	define RV_SEMAPHORE_VXWORKS
#	define RV_MUTEX_VXWORKS
#	define RV_COND_GENERIC
#	define RV_MEM_ANSI
#	define RV_IO_ANSI
#	define RV_FILEIO_NONE
#	define RV_SOCKETS_BSD
#	define RV_SOCKETADDR_BSD44
#	define RV_DNS_VXWORKS
	/* Thread stack sizes */
#	define RV_STACKSIZE_TIMERMGR		5120
#	define RV_STACKSIZE_SOCKETENGINE	5120
#	define RV_STACKSIZE_SHARER			5120
#	define RV_STACKSIZE_SUBAGENT		5120
	/* Thread priority value */
#	define RV_PRIORITYVALUE_MAX			(2)
#	define RV_PRIORITYVALUE_NORMAL		(126)
#	define RV_PRIORITYVALUE_MIN			(254)
#	define RV_PRIORITYVALUE_INCREMENT	(-1)
	/* Debugging */
#	if defined(DEBUG) || defined(_DEBUG)
#		define RV_DEBUG_ON
#	endif

/***** Windows *****/
#elif defined(_WIN32)
#	define RV_OS_WIN32
#	define RV_THREAD_WIN32
#	define RV_SEMAPHORE_WIN32
#	define RV_MUTEX_WIN32
#	define RV_COND_GENERIC
#	define RV_MEM_ANSI
#	define RV_IO_ANSI
#	define RV_FILEIO_ANSI
#	define RV_SOCKETS_WSOCK
#	define RV_SOCKETADDR_BSD43
#	define RV_WINSOCK_2
#	define RV_DNS_WSOCK
	/* Thread stack sizes */
#	define RV_STACKSIZE_TIMERMGR		5120
#	define RV_STACKSIZE_SOCKETENGINE	5120
#	define RV_STACKSIZE_SHARER			5120
#	define RV_STACKSIZE_SUBAGENT		5120
	/* Thread priority value */
#	define RV_PRIORITYVALUE_MAX			(2)
#	define RV_PRIORITYVALUE_NORMAL		(0)
#	define RV_PRIORITYVALUE_MIN			(-2)
#	define RV_PRIORITYVALUE_INCREMENT	(+1)
	/* Debugging */
#	if defined(DEBUG) || defined(_DEBUG)
#		define RV_DEBUG_ON
#	endif

/***** Solaris *****/
#elif defined(__sun)
#	define RV_OS_SOLARIS
#	define RV_THREAD_POSIX
#	define RV_SEMAPHORE_POSIX

/* Detect recursive mutex support */
/* The RV_MUTEX_POSIX is much more efficient than
 * RV_MUTEX_GENERIC.  However, Solaris 2.6 can not use
 * RV_MUTEX_POSIX, and Solaris 2.7 and 2.8 require
 * patches.  RV_MUTEX_GENERIC should be used with 
 * Solaris 2.6 or with Solaris 2.7 or 2.8 when the 
 * patches are not applied.  By default the code assumes 
 * Solaris 2.7 and 2.8 have the patches applied.
*/
#include <pthread.h>
#if defined(PTHREAD_MUTEX_RECURSIVE)
#	define RV_MUTEX_POSIX
#else
#	define RV_MUTEX_GENERIC
#endif

#	define RV_COND_GENERIC
#	define RV_MEM_ANSI
#	define RV_IO_ANSI
#	define RV_FILEIO_ANSI
#	define RV_SOCKETS_BSD
#	define RV_SOCKETADDR_BSD43
#	define RV_DNS_POSIX
	/* Thread stack sizes */
#	define RV_STACKSIZE_TIMERMGR		5120
#	define RV_STACKSIZE_SOCKETENGINE	5120
#	define RV_STACKSIZE_SHARER			5120
#	define RV_STACKSIZE_SUBAGENT		5120
	/* Thread priority value */
#	define RV_PRIORITYVALUE_MAX			(0)
#	define RV_PRIORITYVALUE_NORMAL		(10)
#	define RV_PRIORITYVALUE_MIN			(20)
#	define RV_PRIORITYVALUE_INCREMENT	(-1)
	/* Debugging */
#	if defined(DEBUG) || defined(_DEBUG)
#		define RV_DEBUG_ON
#	endif

/***** Tru64 *****/
#elif defined(_TRU64)
#	define RV_OS_TRU64
#	define RV_THREAD_POSIX
#	define RV_SEMAPHORE_POSIX
#	define RV_MUTEX_POSIX
#	define RV_COND_GENERIC
#	define RV_MEM_ANSI
#	define RV_IO_ANSI
#	define RV_FILEIO_ANSI
#	define RV_SOCKETS_BSD
#	define RV_SOCKETADDR_BSD43
#	define RV_DNS_BSD
	/* Thread stack sizes */
#	define RV_STACKSIZE_TIMERMGR		5120
#	define RV_STACKSIZE_SOCKETENGINE	5120
#	define RV_STACKSIZE_SHARER			5120
#	define RV_STACKSIZE_SUBAGENT		5120
	/* Thread priority value */
#	define RV_PRIORITYVALUE_MAX			(0)
#	define RV_PRIORITYVALUE_NORMAL		(10)
#	define RV_PRIORITYVALUE_MIN			(20)
#	define RV_PRIORITYVALUE_INCREMENT	(-1)
	/* Debugging */
#	if defined(DEBUG) || defined(_DEBUG)
#		define RV_DEBUG_ON
#	endif

/***** HPUX *****/
#elif defined(__hpux)
#	define RV_OS_HPUX
#	define RV_THREAD_POSIX
#	define RV_SEMAPHORE_POSIX
#	define RV_MUTEX_POSIX
#	define RV_COND_GENERIC
#	define RV_MEM_ANSI
#	define RV_IO_ANSI
#	define RV_FILEIO_ANSI
#	define RV_SOCKETS_BSD
#	define RV_SOCKETADDR_BSD43
#	define RV_DNS_BSD
	/* Thread stack sizes */
#	define RV_STACKSIZE_TIMERMGR		5120
#	define RV_STACKSIZE_SOCKETENGINE	5120
#	define RV_STACKSIZE_SHARER			5120
#	define RV_STACKSIZE_SUBAGENT		5120
	/* Thread priority value */
#	define RV_PRIORITYVALUE_MAX			(0)
#	define RV_PRIORITYVALUE_NORMAL		(10)
#	define RV_PRIORITYVALUE_MIN			(20)
#	define RV_PRIORITYVALUE_INCREMENT	(-1)
	/* Debugging */
#	if defined(DEBUG) || defined(_DEBUG)
#		define RV_DEBUG_ON
#	endif

/***** Red Hat *****/
#elif defined(_REDHAT)
#	define RV_OS_REDHAT
#	define RV_THREAD_POSIX
#	define RV_SEMAPHORE_POSIX
#	define RV_MUTEX_REDHAT
#	define RV_COND_GENERIC
#	define RV_MEM_ANSI
#	define RV_IO_ANSI
#	define RV_FILEIO_ANSI
#	define RV_SOCKETS_BSD
#	define RV_SOCKETADDR_BSD43
#	define RV_DNS_BSD
	/* Thread stack sizes */
#	define RV_STACKSIZE_TIMERMGR		5120
#	define RV_STACKSIZE_SOCKETENGINE	5120
#	define RV_STACKSIZE_SHARER			5120
#	define RV_STACKSIZE_SUBAGENT		5120
	/* Thread priority value */
#	define RV_PRIORITYVALUE_MAX			(0)
#	define RV_PRIORITYVALUE_NORMAL		(10)
#	define RV_PRIORITYVALUE_MIN			(20)
#	define RV_PRIORITYVALUE_INCREMENT	(-1)
	/* Debugging */
#	if defined(DEBUG) || defined(_DEBUG)
#		define RV_DEBUG_ON
#	endif

/***** PSoS *****/
#elif defined(_PSOS)
#	define RV_OS_PSOS
#	define RV_THREAD_PSOS
#	define RV_SEMAPHORE_PSOS
#	define RV_MUTEX_PSOS
#	define RV_COND_GENERIC
#	define RV_MEM_PSOS
#	define RV_IO_ANSI
#	define RV_FILEIO_NONE
#	define RV_SOCKETS_PSOS
#	define RV_SOCKETADDR_BSD43
#	define RV_DNS_PSOS
	/* Thread stack sizes */
#	define RV_STACKSIZE_TIMERMGR		5120
#	define RV_STACKSIZE_SOCKETENGINE	5120
#	define RV_STACKSIZE_SHARER			5120
#	define RV_STACKSIZE_SUBAGENT		5120
	/* Thread priority value */
#	define RV_PRIORITYVALUE_MAX			(240)
#	define RV_PRIORITYVALUE_NORMAL		(120)
#	define RV_PRIORITYVALUE_MIN			(1)
#	define RV_PRIORITYVALUE_INCREMENT	(+1)
	/* Debugging */
#	if defined(DEBUG) || defined(_DEBUG)
#		define RV_DEBUG_ON
#	endif

/***** OSE *****/
#elif defined(_OSE)
#	define RV_OS_OSE
#	define RV_THREAD_POSIX
#	define RV_SEMAPHORE_OSE
#	define RV_MUTEX_GENERIC
#	define RV_COND_GENERIC
#	define RV_MEM_OSE
#	define RV_IO_NONE
#	define RV_FILEIO_NONE
#	define RV_SOCKETS_BSD
#	define RV_SOCKETADDR_BSD43
#	define RV_DNS_OSE
	/* Thread stack sizes */
#	define RV_STACKSIZE_TIMERMGR		5120
#	define RV_STACKSIZE_SOCKETENGINE	5120
#	define RV_STACKSIZE_SHARER			5120
#	define RV_STACKSIZE_SUBAGENT		5120
	/* Thread priority value */
#	define RV_PRIORITYVALUE_MAX			(1)
#	define RV_PRIORITYVALUE_NORMAL		(15)
#	define RV_PRIORITYVALUE_MIN			(31)
#	define RV_PRIORITYVALUE_INCREMENT	(-1)
	/* Debugging */
#	if defined(DEBUG) || defined(_DEBUG)
#		define RV_DEBUG_ON
#	endif

/***** Nucleus *****/
#elif defined(_NUCLEUS)
#	define RV_OS_NUCLEUS
#	define RV_THREAD_NUCLEUS
#	define RV_SEMAPHORE_NUCLEUS
#	define RV_MUTEX_GENERIC
#	define RV_COND_GENERIC
#	define RV_MEM_NUCLEUS
#	define RV_IO_ANSI
#	define RV_FILEIO_NONE
#	define RV_SOCKETS_NUCLEUS
#	define RV_SOCKETADDR_BSD43
#	define RV_DNS_NUCLEUS
	/* Thread stack sizes */
#	define RV_STACKSIZE_TIMERMGR		32768
#	define RV_STACKSIZE_SOCKETENGINE	32768
#	define RV_STACKSIZE_SHARER			5120
#	define RV_STACKSIZE_SUBAGENT		5120
	/* Thread priority value */
#	define RV_PRIORITYVALUE_MAX			(4)
#	define RV_PRIORITYVALUE_NORMAL		(127)
#	define RV_PRIORITYVALUE_MIN			(255)
#	define RV_PRIORITYVALUE_INCREMENT	(-1)
	/* Debugging */
#	if defined(DEBUG) || defined(_DEBUG)
#		define RV_DEBUG_ON
#	endif

/***** INTEGRITY *****/
#elif defined(_INTEGRITY)
#	define RV_OS_INTEGRITY
#	define RV_THREAD_POSIX
#	define RV_SEMAPHORE_POSIX
#	define RV_MUTEX_POSIX
#	define RV_COND_GENERIC
#	define RV_MEM_ANSI
#	define RV_IO_ANSI
#	define RV_FILEIO_NONE
#	define RV_SOCKETS_BSD
#	define RV_SOCKETADDR_BSD44
#	define RV_DNS_BSD
	/* Thread stack sizes */
#	define RV_STACKSIZE_TIMERMGR		5120
#	define RV_STACKSIZE_SOCKETENGINE	5120
#	define RV_STACKSIZE_SHARER			5120
#	define RV_STACKSIZE_SUBAGENT		5120
	/* Thread priority value */
#	define RV_PRIORITYVALUE_MAX			(255)
#	define RV_PRIORITYVALUE_NORMAL		(127)
#	define RV_PRIORITYVALUE_MIN			(0)
#	define RV_PRIORITYVALUE_INCREMENT	(1)
	/* Debugging */
#	if defined(DEBUG) || defined(_DEBUG)
#		define RV_DEBUG_ON
#	endif
#else
#	error Unknown platform implementation
#endif

#endif

⌨️ 快捷键说明

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