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

📄 threads.h

📁 Libnet is a cross-platform library aimed at game developers. It has an abstract high level API, whic
💻 H
字号:
/*---------------------------------------------------------------- * threads.h - macros to help the library be thread-safe *---------------------------------------------------------------- *  libnet is (c) Copyright Chad Catlett and George Foot 1997-1999 * *  Please look in `docs' for details, documentation and *  distribution conditions. */#ifndef libnet_included_file_threads_h#define libnet_included_file_threads_h/* Thread-safety function pointers */extern void (* __libnet_internal__mutex_create) (void **mutex);extern void (* __libnet_internal__mutex_destroy) (void *mutex);extern void (* __libnet_internal__mutex_lock) (volatile void *mutex);extern void (* __libnet_internal__mutex_unlock) (volatile void *mutex);#ifdef NO_THREAD_SAFE/* Don't care about thread-safety. */#define MUTEX_DEFINE(id)#define MUTEX_DEFINE_STATIC(id)#define MUTEX_CLEAR(id)#define MUTEX_LOCK(id)#define MUTEX_UNLOCK(id)#else/* Be thread-safe. */#define MUTEX_DEFINE(id)         void *id##_mutex#define MUTEX_DEFINE_STATIC(id)  static void *id##_mutex#define MUTEX_CREATE(id)         __libnet_internal__mutex_create (&id##_mutex)#define MUTEX_DESTROY(id)        __libnet_internal__mutex_destroy (id##_mutex)#define MUTEX_LOCK(id)           __libnet_internal__mutex_lock (id##_mutex)#define MUTEX_UNLOCK(id)         __libnet_internal__mutex_unlock (id##_mutex)#endif#endif

⌨️ 快捷键说明

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