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

📄 snmp_locking.h

📁 snmp的源代码,已经在我的ubuntu下编译通过
💻 H
字号:
/* * snmp_locking.h - multi-thread resource locking support declarations  *//* * Author: Markku Laukkanen * Created: 6-Sep-1999 * History: *  8-Sep-1999 M. Slifcak method names changed; *                        use array of resource locking structures. *  3-Jan-2001 R. Story   copy mt_resource.h to snmp_locking.h */#ifndef SNMP_LOCKING_H#define SNMP_LOCKING_H#ifdef __cplusplusextern          "C" {#endif#ifdef NS_REENTRANT#if HAVE_PTHREAD_H#include <pthread.h>typedef pthread_mutex_t mutex_type;#ifdef pthread_mutexattr_default#define MT_MUTEX_INIT_DEFAULT pthread_mutexattr_default#else#define MT_MUTEX_INIT_DEFAULT 0#endif#elif defined(WIN32) || defined(cygwin)#include <windows.h>typedef CRITICAL_SECTION mutex_type;#else                    error "There is no re-entrant support as defined."#endif  /*  HAVE_PTHREAD_H  */int	netsnmp_mutex_init(mutex_type *);int     netsnmp_mutex_lock(mutex_type *);int     netsnmp_mutex_unlock(mutex_type *);int     netsnmp_mutex_destroy_mutex(mutex_type *);#else                           /* !NS_REENTRANT */#define netsnmp_mutex_init(x) do {} while (0)#define netsnmp_mutex_lock(x) do {} while (0)#define netsnmp_mutex_unlock(x) do {} while (0)#define netsnmp_mutex_destroy_mutex(x) do {} while (0)#endif                          /* !NS_REENTRANT */#ifdef __cplusplus}#endif#endif /*  SNMP_LOCKING_H  */

⌨️ 快捷键说明

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