亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? stl_threads.h

?? The Standard Template Library, or STL, is a C++ library of container classes, algorithms, and iterat
?? H
字號:
/* * Copyright (c) 1997-1999 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation.  Silicon Graphics makes no * representations about the suitability of this software for any * purpose.  It is provided "as is" without express or implied warranty. */// WARNING: This is an internal header file, included by other C++// standard library headers.  You should not attempt to use this header// file directly.// Stl_config.h should be included before this file.#ifndef __SGI_STL_INTERNAL_THREADS_H#define __SGI_STL_INTERNAL_THREADS_H// Supported threading models are native SGI, pthreads, uithreads// (similar to pthreads, but based on an earlier draft of the Posix// threads standard), and Win32 threads.  Uithread support by Jochen// Schlick, 1999.#if defined(__STL_SGI_THREADS)#include <mutex.h>#include <time.h>#elif defined(__STL_PTHREADS)#include <pthread.h>#elif defined(__STL_UITHREADS)#include <thread.h>#include <synch.h>#elif defined(__STL_WIN32THREADS)#include <windows.h>#endif__STL_BEGIN_NAMESPACE// Class _Refcount_Base provides a type, _RC_t, a data member,// _M_ref_count, and member functions _M_incr and _M_decr, which perform// atomic preincrement/predecrement.  The constructor initializes // _M_ref_count.// Hack for SGI o32 compilers.#if defined(__STL_SGI_THREADS) && !defined(__add_and_fetch) && \    (__mips < 3 || !(defined (_ABIN32) || defined(_ABI64)))#  define __add_and_fetch(__l,__v) add_then_test((unsigned long*)__l,__v)  #  define __test_and_set(__l,__v)  test_and_set(__l,__v)#endif /* o32 */struct _Refcount_Base{  // The type _RC_t# ifdef __STL_WIN32THREADS  typedef long _RC_t;# else  typedef size_t _RC_t;#endif    // The data member _M_ref_count   volatile _RC_t _M_ref_count;  // Constructor# ifdef __STL_PTHREADS  pthread_mutex_t _M_ref_count_lock;  _Refcount_Base(_RC_t __n) : _M_ref_count(__n)    { pthread_mutex_init(&_M_ref_count_lock, 0); }# elif defined(__STL_UITHREADS)  mutex_t         _M_ref_count_lock;  _Refcount_Base(_RC_t __n) : _M_ref_count(__n)    { mutex_init(&_M_ref_count_lock, USYNC_THREAD, 0); }# else  _Refcount_Base(_RC_t __n) : _M_ref_count(__n) {}# endif  // _M_incr and _M_decr# ifdef __STL_SGI_THREADS  void _M_incr() {  __add_and_fetch(&_M_ref_count, 1); }  _RC_t _M_decr() { return __add_and_fetch(&_M_ref_count, (size_t) -1); }# elif defined (__STL_WIN32THREADS)   void _M_incr() { InterlockedIncrement((_RC_t*)&_M_ref_count); }  _RC_t _M_decr() { return InterlockedDecrement((_RC_t*)&_M_ref_count); }# elif defined(__STL_PTHREADS)  void _M_incr() {    pthread_mutex_lock(&_M_ref_count_lock);    ++_M_ref_count;    pthread_mutex_unlock(&_M_ref_count_lock);  }  _RC_t _M_decr() {    pthread_mutex_lock(&_M_ref_count_lock);    volatile _RC_t __tmp = --_M_ref_count;    pthread_mutex_unlock(&_M_ref_count_lock);    return __tmp;  }# elif defined(__STL_UITHREADS)  void _M_incr() {    mutex_lock(&_M_ref_count_lock);    ++_M_ref_count;    mutex_unlock(&_M_ref_count_lock);  }  _RC_t _M_decr() {    mutex_lock(&_M_ref_count_lock);    /*volatile*/ _RC_t __tmp = --_M_ref_count;    mutex_unlock(&_M_ref_count_lock);    return __tmp;  }# else  /* No threads */  void _M_incr() { ++_M_ref_count; }  _RC_t _M_decr() { return --_M_ref_count; }# endif};// Atomic swap on unsigned long// This is guaranteed to behave as though it were atomic only if all// possibly concurrent updates use _Atomic_swap.// In some cases the operation is emulated with a lock.# ifdef __STL_SGI_THREADS    inline unsigned long _Atomic_swap(unsigned long * __p, unsigned long __q) {#   	if __mips < 3 || !(defined (_ABIN32) || defined(_ABI64))            return test_and_set(__p, __q);#       else            return __test_and_set(__p, (unsigned long)__q);#       endif    }# elif defined(__STL_WIN32THREADS)    inline unsigned long _Atomic_swap(unsigned long * __p, unsigned long __q) {        return (unsigned long) InterlockedExchange((LPLONG)__p, (LONG)__q);    }# elif defined(__STL_PTHREADS)    // We use a template here only to get a unique initialized instance.    template<int __dummy>    struct _Swap_lock_struct {	static pthread_mutex_t _S_swap_lock;    };    template<int __dummy>    pthread_mutex_t    _Swap_lock_struct<__dummy>::_S_swap_lock = PTHREAD_MUTEX_INITIALIZER;    // This should be portable, but performance is expected    // to be quite awful.  This really needs platform specific    // code.    inline unsigned long _Atomic_swap(unsigned long * __p, unsigned long __q) {        pthread_mutex_lock(&_Swap_lock_struct<0>::_S_swap_lock);        unsigned long __result = *__p;        *__p = __q;        pthread_mutex_unlock(&_Swap_lock_struct<0>::_S_swap_lock);        return __result;    }# elif defined(__STL_UITHREADS)    // We use a template here only to get a unique initialized instance.    template<int __dummy>    struct _Swap_lock_struct {	static mutex_t _S_swap_lock;    };    template<int __dummy>    mutex_t    _Swap_lock_struct<__dummy>::_S_swap_lock = DEFAULTMUTEX;    // This should be portable, but performance is expected    // to be quite awful.  This really needs platform specific    // code.    inline unsigned long _Atomic_swap(unsigned long * __p, unsigned long __q) {        mutex_lock(&_Swap_lock_struct<0>::_S_swap_lock);        unsigned long __result = *__p;        *__p = __q;        mutex_unlock(&_Swap_lock_struct<0>::_S_swap_lock);        return __result;    }# elif defined (__STL_SOLARIS_THREADS)    // any better solutions ?    // We use a template here only to get a unique initialized instance.    template<int __dummy>    struct _Swap_lock_struct {	static mutex_t _S_swap_lock;    };# if ( __STL_STATIC_TEMPLATE_DATA > 0 )    template<int __dummy>    mutex_t    _Swap_lock_struct<__dummy>::_S_swap_lock = DEFAULTMUTEX;#  else    __DECLARE_INSTANCE(mutex_t, _Swap_lock_struct<__dummy>::_S_swap_lock, 		       =DEFAULTMUTEX);# endif /* ( __STL_STATIC_TEMPLATE_DATA > 0 ) */    // This should be portable, but performance is expected    // to be quite awful.  This really needs platform specific    // code.    inline unsigned long _Atomic_swap(unsigned long * __p, unsigned long __q) {        mutex_lock(&_Swap_lock_struct<0>::_S_swap_lock);        unsigned long __result = *__p;        *__p = __q;        mutex_unlock(&_Swap_lock_struct<0>::_S_swap_lock);        return __result;    }# else    static inline unsigned long _Atomic_swap(unsigned long * __p, unsigned long __q) {        unsigned long __result = *__p;        *__p = __q;        return __result;    }# endif// Locking class.  Note that this class *does not have a constructor*.// It must be initialized either statically, with __STL_MUTEX_INITIALIZER,// or dynamically, by explicitly calling the _M_initialize member function.// (This is similar to the ways that a pthreads mutex can be initialized.)// There are explicit member functions for acquiring and releasing the lock.// There is no constructor because static initialization is essential for// some uses, and only a class aggregate (see section 8.5.1 of the C++// standard) can be initialized that way.  That means we must have no// constructors, no base classes, no virtual functions, and no private or// protected members.struct _STL_mutex_lock{#if defined(__STL_SGI_THREADS) || defined(__STL_WIN32THREADS)  // It should be relatively easy to get this to work on any modern Unix.  volatile unsigned long _M_lock;  void _M_initialize() { _M_lock = 0; }  static void _S_nsec_sleep(int __log_nsec) {#     ifdef __STL_SGI_THREADS          struct timespec __ts;          /* Max sleep is 2**27nsec ~ 60msec      */          __ts.tv_sec = 0;          __ts.tv_nsec = 1 << __log_nsec;          nanosleep(&__ts, 0);#     elif defined(__STL_WIN32THREADS)	  if (__log_nsec <= 20) {	      Sleep(0);	  } else {	      Sleep(1 << (__log_nsec - 20));	  }#     else#	error unimplemented#     endif  }  void _M_acquire_lock() {    const unsigned __low_spin_max = 30;  // spins if we suspect uniprocessor    const unsigned __high_spin_max = 1000; // spins for multiprocessor    static unsigned __spin_max = __low_spin_max;    unsigned __my_spin_max;    static unsigned __last_spins = 0;    unsigned __my_last_spins;    volatile unsigned __junk;    int __i;    volatile unsigned long* __lock = &this->_M_lock;    if (!_Atomic_swap((unsigned long*)__lock, 1)) {      return;    }    __my_spin_max = __spin_max;    __my_last_spins = __last_spins;    __junk = 17;	// Value doesn't matter.    for (__i = 0; __i < __my_spin_max; __i++) {      if (__i < __my_last_spins/2 || *__lock) {        __junk *= __junk; __junk *= __junk;        __junk *= __junk; __junk *= __junk;        continue;      }      if (!_Atomic_swap((unsigned long*)__lock, 1)) {        // got it!        // Spinning worked.  Thus we're probably not being scheduled        // against the other process with which we were contending.        // Thus it makes sense to spin longer the next time.        __last_spins = __i;        __spin_max = __high_spin_max;        return;      }    }    // We are probably being scheduled against the other process.  Sleep.    __spin_max = __low_spin_max;    for (__i = 0 ;; ++__i) {      int __log_nsec = __i + 6;      if (__log_nsec > 27) __log_nsec = 27;      if (!_Atomic_swap((unsigned long *)__lock, 1)) {        return;      }      _S_nsec_sleep(__log_nsec);    }  }  void _M_release_lock() {    volatile unsigned long* __lock = &_M_lock;#   if defined(__STL_SGI_THREADS) && defined(__GNUC__) && __mips >= 3        asm("sync");        *__lock = 0;#   elif defined(__STL_SGI_THREADS) && __mips >= 3 \	 && (defined (_ABIN32) || defined(_ABI64))        __lock_release(__lock);#   else         *__lock = 0;        // This is not sufficient on many multiprocessors, since        // writes to protected variables and the lock may be reordered.#   endif  }// We no longer use win32 critical sections.// They appear to be slower in the contention-free case,// and they appear difficult to initialize without introducing a race.#elif defined(__STL_PTHREADS)  pthread_mutex_t _M_lock;  void _M_initialize()   { pthread_mutex_init(&_M_lock, NULL); }  void _M_acquire_lock() { pthread_mutex_lock(&_M_lock); }  void _M_release_lock() { pthread_mutex_unlock(&_M_lock); }#elif defined(__STL_UITHREADS)  mutex_t _M_lock;  void _M_initialize()   { mutex_init(&_M_lock, USYNC_THREAD, 0); }  void _M_acquire_lock() { mutex_lock(&_M_lock); }  void _M_release_lock() { mutex_unlock(&_M_lock); }#else /* No threads */  void _M_initialize()   {}  void _M_acquire_lock() {}  void _M_release_lock() {}#endif};#ifdef __STL_PTHREADS// Pthreads locks must be statically initialized to something other than// the default value of zero.#   define __STL_MUTEX_INITIALIZER = { PTHREAD_MUTEX_INITIALIZER }#elif defined(__STL_UITHREADS)// UIthreads locks must be statically initialized to something other than// the default value of zero.#   define __STL_MUTEX_INITIALIZER = { DEFAULTMUTEX }#elif defined(__STL_SGI_THREADS) || defined(__STL_WIN32THREADS)#   define __STL_MUTEX_INITIALIZER = { 0 }#else#   define __STL_MUTEX_INITIALIZER#endif// A locking class that uses _STL_mutex_lock.  The constructor takes a// reference to an _STL_mutex_lock, and acquires a lock.  The// destructor releases the lock.  It's not clear that this is exactly// the right functionality.  It will probably change in the future.struct _STL_auto_lock{  _STL_mutex_lock& _M_lock;    _STL_auto_lock(_STL_mutex_lock& __lock) : _M_lock(__lock)    { _M_lock._M_acquire_lock(); }  ~_STL_auto_lock() { _M_lock._M_release_lock(); }private:  void operator=(const _STL_auto_lock&);  _STL_auto_lock(const _STL_auto_lock&);};__STL_END_NAMESPACE#endif /* __SGI_STL_INTERNAL_THREADS_H */// Local Variables:// mode:C++// End:

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品欧美一区二区三区不卡 | 欧美亚洲禁片免费| 精品一区二区三区视频| 婷婷丁香激情综合| 日韩成人一区二区三区在线观看| 午夜亚洲福利老司机| 日本成人中文字幕| 久88久久88久久久| 国产成人精品免费网站| 丰满放荡岳乱妇91ww| 成人在线综合网| 91一区二区三区在线播放| 91国产精品成人| 欧美日韩在线一区二区| 欧美一区二区成人6969| 欧美xxxxx裸体时装秀| 日本一区二区综合亚洲| 亚洲欧美日韩精品久久久久| 亚洲福利一二三区| 另类欧美日韩国产在线| 成人免费视频一区二区| 91在线精品一区二区| 欧美日韩视频第一区| 久久久精品中文字幕麻豆发布| 国产精品嫩草影院av蜜臀| 夜夜嗨av一区二区三区四季av| 亚洲大尺度视频在线观看| 精品写真视频在线观看| 99精品偷自拍| 日韩免费电影网站| 中文字幕一区二区视频| 天天免费综合色| 成人激情动漫在线观看| 欧美专区亚洲专区| 久久久精品黄色| 亚洲尤物在线视频观看| 国产一二三精品| 欧洲精品视频在线观看| 久久影视一区二区| 亚洲午夜三级在线| 成人免费视频免费观看| 欧美一区二区精品在线| 日韩美女视频一区二区 | 韩国理伦片一区二区三区在线播放| 国产麻豆精品在线| 3atv在线一区二区三区| 亚洲美女区一区| 国产成人免费视频精品含羞草妖精| 在线精品视频小说1| 国产精品污网站| 精久久久久久久久久久| 欧美日韩二区三区| 国产精品久久毛片av大全日韩| 麻豆精品一二三| 欧美三级在线视频| 亚洲精品欧美激情| 白白色 亚洲乱淫| 国产亚洲欧美在线| 精品亚洲成a人在线观看| 欧美日韩高清影院| 一区二区在线看| 成人免费三级在线| 久久久久久久综合狠狠综合| 麻豆专区一区二区三区四区五区| 欧美系列一区二区| 亚洲一区av在线| 色综合天天综合狠狠| 中文字幕亚洲成人| 成人少妇影院yyyy| 国产精品久久久久久亚洲伦| 国产69精品久久99不卡| 久久久久久久综合狠狠综合| 国产做a爰片久久毛片| 精品美女在线观看| 国产一区二区美女诱惑| 国产欧美日韩精品一区| 国产91丝袜在线播放九色| 欧美国产一区二区| 不卡视频在线观看| 亚洲激情在线激情| 欧美性大战久久| 三级精品在线观看| 日韩午夜激情视频| 激情六月婷婷综合| 亚洲国产高清在线观看视频| 成人的网站免费观看| 亚洲精品成a人| 欧美日韩国产123区| 日本不卡一区二区| 久久久久国产免费免费| 成人激情免费网站| 一区二区三区日韩在线观看| 69久久夜色精品国产69蝌蚪网| 视频一区二区三区中文字幕| 日韩区在线观看| 成人av影视在线观看| 一区二区三区国产| 欧美变态tickling挠脚心| 国产mv日韩mv欧美| 亚洲高清免费在线| www久久精品| 欧美在线一区二区| 国产伦精品一区二区三区视频青涩| 亚洲国产精品传媒在线观看| 在线亚洲高清视频| 黄页网站大全一区二区| 中文字幕一区免费在线观看| 337p亚洲精品色噜噜| 国产成人午夜99999| 亚洲一区二区三区爽爽爽爽爽| 欧美一卡二卡在线| 91尤物视频在线观看| 奇米影视一区二区三区| 国产精品嫩草久久久久| 欧美美女视频在线观看| 国产成人精品免费| 午夜精品一区二区三区免费视频| 国产午夜精品一区二区三区视频 | 天天免费综合色| 国产精品视频免费看| 91精品国产91综合久久蜜臀| 成人免费精品视频| 蜜臀av性久久久久av蜜臀妖精| 国产精品久久久久婷婷二区次| 欧美一区二区三区在线视频| 成人一区二区三区中文字幕| 蜜臀av性久久久久蜜臀aⅴ四虎| 亚洲男同性恋视频| 国产日韩欧美a| 精品久久久久久久久久久久久久久久久| 91小视频在线观看| 风间由美性色一区二区三区| 久久精品国产亚洲aⅴ| 亚洲午夜精品在线| 亚洲免费成人av| 国产精品久久久久久久久果冻传媒| 日韩欧美一区在线观看| 欧美美女网站色| 欧美日韩一二区| 一本色道久久加勒比精品| 国产成人精品一区二 | 欧美韩国日本综合| 26uuu另类欧美| 欧美成人激情免费网| 3atv一区二区三区| 日韩午夜小视频| 日韩三级中文字幕| 日韩免费高清视频| 精品国产自在久精品国产| 91精品国产欧美一区二区18| 欧美乱熟臀69xxxxxx| 欧美日韩久久不卡| 51久久夜色精品国产麻豆| 宅男噜噜噜66一区二区66| 欧美三区在线观看| 欧美丰满少妇xxxbbb| 欧美精品黑人性xxxx| 日韩欧美中文字幕精品| 日韩午夜激情视频| 久久久精品综合| 国产精品久久久久久久久图文区 | 亚洲自拍偷拍av| 亚洲一区二区三区国产| 日本欧美一区二区| 免费成人你懂的| 国产一区二区免费视频| 成人av免费在线播放| 色综合一区二区三区| 欧美视频在线观看一区二区| 欧美日韩国产影片| 日韩欧美高清一区| 国产日韩精品久久久| 国产精品久久久久7777按摩| 伊人婷婷欧美激情| 蜜桃视频在线观看一区| 国产一区二区主播在线| 91色porny| 欧美一区二区三区免费视频 | 成人动漫中文字幕| 欧美中文字幕一区二区三区亚洲| 91精品在线免费观看| 国产午夜精品一区二区三区嫩草| 亚洲摸摸操操av| 乱一区二区av| 色呦呦国产精品| 精品国产一区二区三区忘忧草| 中文字幕第一区| 免费高清在线视频一区·| av一区二区三区黑人| 欧美精品久久99久久在免费线| 日本一区二区三区国色天香| 亚洲国产另类精品专区| 国产一区二区不卡| 欧美日韩国产一级片| 国产精品美女视频| 美国av一区二区| 欧美视频在线一区| 亚洲欧美日韩在线播放| 国产麻豆成人精品| 91精品国产综合久久婷婷香蕉|