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

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

?? pthread_cancel.c

?? pthread source code,you can compile directly
?? C
字號:
/* * pthread_cancel.c * * Description: * POSIX thread functions related to thread cancellation. * * -------------------------------------------------------------------------- * *      Pthreads-win32 - POSIX Threads Library for Win32 *      Copyright(C) 1998 John E. Bossom *      Copyright(C) 1999,2005 Pthreads-win32 contributors *  *      Contact Email: rpj@callisto.canberra.edu.au *  *      The current list of contributors is contained *      in the file CONTRIBUTORS included with the source *      code distribution. The list can also be seen at the *      following World Wide Web location: *      http://sources.redhat.com/pthreads-win32/contributors.html *  *      This library is free software; you can redistribute it and/or *      modify it under the terms of the GNU Lesser General Public *      License as published by the Free Software Foundation; either *      version 2 of the License, or (at your option) any later version. *  *      This library is distributed in the hope that it will be useful, *      but WITHOUT ANY WARRANTY; without even the implied warranty of *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU *      Lesser General Public License for more details. *  *      You should have received a copy of the GNU Lesser General Public *      License along with this library in the file COPYING.LIB; *      if not, write to the Free Software Foundation, Inc., *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */#include "pthread.h"#include "implement.h"#if defined(_M_IX86) || defined(_X86_)#define PTW32_PROGCTR(Context)  ((Context).Eip)#endif#if defined(_MIPS_)#define PTW32_PROGCTR(Context)  ((Context).Fir)#endif#if defined(_ALPHA_)#define PTW32_PROGCTR(Context)  ((Context).Fir)#endif#if defined(_PPC_)#define PTW32_PROGCTR(Context)  ((Context).Iar)#endif#if defined(_AMD64_)#define PTW32_PROGCTR(Context)  ((Context).Rip)#endif#if !defined(PTW32_PROGCTR)#error Module contains CPU-specific code; modify and recompile.#endifstatic voidptw32_cancel_self (void){  ptw32_throw (PTW32_EPS_CANCEL);  /* Never reached */}static void CALLBACKptw32_cancel_callback (DWORD unused){  ptw32_throw (PTW32_EPS_CANCEL);  /* Never reached */}/* * ptw32_RegisterCancelation() - * Must have args of same type as QueueUserAPCEx because this function * is a substitute for QueueUserAPCEx if it's not available. */DWORDptw32_RegisterCancelation (PAPCFUNC unused1, HANDLE threadH, DWORD unused2){  CONTEXT context;  context.ContextFlags = CONTEXT_CONTROL;  GetThreadContext (threadH, &context);  PTW32_PROGCTR (context) = (DWORD_PTR) ptw32_cancel_self;  SetThreadContext (threadH, &context);  return 0;}intpthread_cancel (pthread_t thread)     /*      * ------------------------------------------------------      * DOCPUBLIC      *      This function requests cancellation of 'thread'.      *      * PARAMETERS      *      thread      *              reference to an instance of pthread_t      *      *      * DESCRIPTION      *      This function requests cancellation of 'thread'.      *      NOTE: cancellation is asynchronous; use pthread_join to      *                wait for termination of 'thread' if necessary.      *      * RESULTS      *              0               successfully requested cancellation,      *              ESRCH           no thread found corresponding to 'thread',      *              ENOMEM          implicit self thread create failed.      * ------------------------------------------------------      */{  int result;  int cancel_self;  pthread_t self;  ptw32_thread_t * tp;  result = pthread_kill (thread, 0);  if (0 != result)    {      return result;    }  if ((self = pthread_self ()).p == NULL)    {      return ENOMEM;    };  /*   * FIXME!!   *   * Can a thread cancel itself?   *   * The standard doesn't   * specify an error to be returned if the target   * thread is itself.   *   * If it may, then we need to ensure that a thread can't   * deadlock itself trying to cancel itself asyncronously   * (pthread_cancel is required to be an async-cancel   * safe function).   */  cancel_self = pthread_equal (thread, self);  tp = (ptw32_thread_t *) thread.p;  /*   * Lock for async-cancel safety.   */  (void) pthread_mutex_lock (&tp->cancelLock);  if (tp->cancelType == PTHREAD_CANCEL_ASYNCHRONOUS      && tp->cancelState == PTHREAD_CANCEL_ENABLE      && tp->state < PThreadStateCanceling)    {      if (cancel_self)	{	  tp->state = PThreadStateCanceling;	  tp->cancelState = PTHREAD_CANCEL_DISABLE;	  (void) pthread_mutex_unlock (&tp->cancelLock);	  ptw32_throw (PTW32_EPS_CANCEL);	  /* Never reached */	}      else	{	  HANDLE threadH = tp->threadH;	  SuspendThread (threadH);	  if (WaitForSingleObject (threadH, 0) == WAIT_TIMEOUT)	    {	      tp->state = PThreadStateCanceling;	      tp->cancelState = PTHREAD_CANCEL_DISABLE;	      /*	       * If alertdrv and QueueUserAPCEx is available then the following	       * will result in a call to QueueUserAPCEx with the args given, otherwise	       * this will result in a call to ptw32_RegisterCancelation and only	       * the threadH arg will be used.	       */	      ptw32_register_cancelation (ptw32_cancel_callback, threadH, 0);	      (void) pthread_mutex_unlock (&tp->cancelLock);	      ResumeThread (threadH);	    }	}    }  else    {      /*       * Set for deferred cancellation.       */      if (tp->state < PThreadStateCancelPending)	{	  tp->state = PThreadStateCancelPending;	  if (!SetEvent (tp->cancelEvent))	    {	      result = ESRCH;	    }	}      else if (tp->state >= PThreadStateCanceling)	{	  result = ESRCH;	}      (void) pthread_mutex_unlock (&tp->cancelLock);    }  return (result);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日日夜夜精品免费视频| 亚洲成人在线免费| 337p亚洲精品色噜噜噜| 在线视频中文字幕一区二区| 国产一区二区91| 国产真实精品久久二三区| 激情综合亚洲精品| 国产一区二区三区久久久| 国产精品自拍网站| 成人性生交大片免费看中文 | 韩国理伦片一区二区三区在线播放| 亚洲妇女屁股眼交7| 亚洲国产视频在线| 石原莉奈一区二区三区在线观看| 日韩av在线播放中文字幕| 美女www一区二区| 国产主播一区二区三区| 美女一区二区视频| 水野朝阳av一区二区三区| 另类人妖一区二区av| 国产精品一区二区免费不卡| fc2成人免费人成在线观看播放| 97se亚洲国产综合自在线不卡| 91免费观看在线| 欧美日韩视频一区二区| 久久综合中文字幕| 一区精品在线播放| 日韩精彩视频在线观看| 国产老女人精品毛片久久| av在线不卡网| 在线播放视频一区| 久久精品视频一区二区| 亚洲色图19p| 日本欧美一区二区三区乱码| 国产精品综合网| 欧美自拍丝袜亚洲| 久久久综合视频| 亚洲精品日日夜夜| 欧美a级一区二区| 91小视频免费看| 欧美videos中文字幕| 亚洲九九爱视频| 国产原创一区二区| 在线影视一区二区三区| 久久久www免费人成精品| 亚洲一区精品在线| 大桥未久av一区二区三区中文| 欧美性做爰猛烈叫床潮| 国产亚洲精品超碰| 日本午夜一区二区| 欧美午夜影院一区| 国产欧美精品一区二区色综合朱莉 | 99久久婷婷国产综合精品| 欧美喷水一区二区| 亚洲欧美激情视频在线观看一区二区三区 | 欧美一区二区在线看| 综合欧美一区二区三区| 国产成人综合自拍| 91麻豆精品国产91久久久使用方法 | 色香蕉成人二区免费| 国产夜色精品一区二区av| 亚洲国产综合视频在线观看| 99vv1com这只有精品| 国产免费久久精品| 国内成人免费视频| 日韩精品专区在线影院重磅| 天天色综合成人网| 欧美午夜一区二区| 夜夜嗨av一区二区三区| 91免费观看视频| 国产精品你懂的| youjizz国产精品| 中文字幕av资源一区| 国产传媒一区在线| 国产午夜久久久久| 国产精品69久久久久水密桃| 欧美精品一区二区三| 国产在线不卡一区| 久久久久成人黄色影片| 国产在线不卡一卡二卡三卡四卡| 精品福利一区二区三区免费视频| 奇米影视7777精品一区二区| 欧美电影免费观看高清完整版在线| 免费看欧美女人艹b| 日韩免费看的电影| 国产精品自拍在线| 中文字幕一区二区三区精华液| 成人av高清在线| 亚洲黄色免费网站| 欧美日韩一区二区在线视频| 日韩高清不卡一区二区三区| 日韩你懂的在线播放| 久久福利资源站| 欧美国产欧美亚州国产日韩mv天天看完整 | 91一区二区三区在线播放| 中文字幕亚洲欧美在线不卡| 色综合天天综合色综合av| 亚洲一区成人在线| 日韩免费看的电影| 国产91对白在线观看九色| 亚洲欧美国产高清| 56国语精品自产拍在线观看| 麻豆国产欧美一区二区三区| 欧美国产禁国产网站cc| 色婷婷激情综合| 美女在线观看视频一区二区| 中文字幕免费一区| 欧美日韩成人综合在线一区二区| 九色porny丨国产精品| 综合激情成人伊人| 欧美日韩国产影片| 大胆欧美人体老妇| 三级欧美韩日大片在线看| 精品国产自在久精品国产| 99久久99久久精品免费观看| 亚洲综合偷拍欧美一区色| 欧美一区二区大片| 99久久婷婷国产精品综合| 日本女优在线视频一区二区| 专区另类欧美日韩| 欧美成人一区二区三区| 欧美午夜免费电影| 国产成人av一区二区三区在线 | 免费日本视频一区| 亚洲色大成网站www久久九九| 日韩免费性生活视频播放| 在线国产电影不卡| 成人精品免费看| 日本vs亚洲vs韩国一区三区二区| 中文字幕色av一区二区三区| 欧美精品一区二区在线播放| 欧美久久久久免费| 色综合欧美在线| 岛国一区二区在线观看| 麻豆精品新av中文字幕| 亚洲图片欧美色图| 亚洲婷婷综合久久一本伊一区 | 色婷婷av一区二区三区软件| 国产成人av自拍| 韩国欧美一区二区| 免费成人在线播放| 日韩精品一二区| 日韩成人av影视| 首页国产丝袜综合| 午夜精品一区二区三区三上悠亚| 亚洲精品视频在线观看免费| 一区在线观看视频| 亚洲欧洲av在线| 中文字幕一区二区视频| 中文字幕免费不卡在线| 久久久亚洲高清| 久久久青草青青国产亚洲免观| 欧美zozo另类异族| 2021久久国产精品不只是精品| 日韩一区二区三| 欧美刺激脚交jootjob| 精品少妇一区二区三区在线播放 | 日韩欧美亚洲一区二区| 欧美一区二区三区性视频| 日韩欧美久久一区| 精品国产免费视频| 国产丝袜美腿一区二区三区| 久久综合成人精品亚洲另类欧美| 欧美电影免费观看高清完整版在线| 337p亚洲精品色噜噜狠狠| 欧美精品少妇一区二区三区| 日韩欧美在线1卡| 日韩欧美久久一区| 久久久久99精品一区| 国产精品久久久久影院亚瑟 | 欧美三级电影网站| 欧美日韩国产欧美日美国产精品| 欧美高清hd18日本| 欧美精品一区二区三区蜜臀| 中文字幕成人在线观看| 亚洲自拍偷拍九九九| 天堂蜜桃91精品| 国产成人免费在线观看不卡| 91久久精品一区二区| 777久久久精品| 欧美激情一区二区三区全黄 | 精品蜜桃在线看| 中文字幕一区二区三区乱码在线 | 欧美成人三级在线| 国产女人18水真多18精品一级做| 国产精品嫩草影院av蜜臀| 亚洲资源中文字幕| 久久福利视频一区二区| jiyouzz国产精品久久| 欧美精品一二三| 国产欧美日韩三级| 亚洲成av人片在线观看无码| 国产91精品久久久久久久网曝门| 91搞黄在线观看| www国产精品av| 亚洲国产成人91porn| 成人一区在线观看| 欧美大胆一级视频| 亚洲色图20p| 国产91富婆露脸刺激对白|