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

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

?? pthread_cancel.c

?? POSIX Multithraed library for windows
?? 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 (_M_IA64)#define PTW32_PROGCTR(Context)  ((Context).StIIP)#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一区二区三区免费野_久草精品视频
成人福利视频网站| 久久久久国产精品人| 久久久亚洲午夜电影| 亚洲夂夂婷婷色拍ww47| 国产一区二区在线看| 欧美日韩情趣电影| 国产精品女主播在线观看| 麻豆成人久久精品二区三区小说| jiyouzz国产精品久久| 精品欧美黑人一区二区三区| 午夜精品视频一区| 在线观看日韩国产| 亚洲欧美综合在线精品| 国产精品一卡二卡| 久久蜜桃香蕉精品一区二区三区| 日欧美一区二区| 欧洲色大大久久| 一区二区在线看| 91视频www| 一区精品在线播放| 成人少妇影院yyyy| 久久久.com| 国产一区二区免费视频| 日韩免费高清电影| 日韩av在线发布| 欧美日韩色一区| 日韩成人伦理电影在线观看| 色综合久久久久综合| 国产成人精品免费一区二区| 欧美日韩精品一二三区| 亚洲与欧洲av电影| 在线免费观看日本一区| 亚洲欧美另类小说视频| 色呦呦一区二区三区| 亚洲图片你懂的| 91麻豆国产福利在线观看| 亚洲精品综合在线| 91福利国产成人精品照片| 一区二区三区视频在线看| 欧美性受xxxx黑人xyx| 日韩精品乱码av一区二区| 欧美一区二区三区在线观看视频| 欧美a级一区二区| 精品区一区二区| 从欧美一区二区三区| 亚洲三级在线播放| 欧美日韩国产影片| 激情久久五月天| 中文字幕成人av| 欧美日韩色一区| 国产中文一区二区三区| 亚洲欧美一区二区三区孕妇| 色综合久久久久综合99| 免费高清在线一区| 国产精品私人影院| 欧美在线一区二区| 久草精品在线观看| 成人免费在线播放视频| 欧美美女喷水视频| 国产一区二区在线视频| 亚洲欧洲制服丝袜| 欧美变态凌虐bdsm| 99久久精品国产一区二区三区 | a亚洲天堂av| 亚洲五码中文字幕| 久久九九全国免费| 欧美老年两性高潮| 成人三级伦理片| 日韩av成人高清| 亚洲素人一区二区| 亚洲精品一区二区三区影院| 97久久精品人人做人人爽50路 | 一区二区三区鲁丝不卡| 欧美成人在线直播| 欧美午夜精品一区二区三区| 久久成人18免费观看| 亚洲激情五月婷婷| 国产欧美日韩在线| 日韩写真欧美这视频| 91久久精品一区二区| 成人永久免费视频| 免费观看在线综合| 亚洲一区二区在线视频| 欧美激情中文不卡| 精品伦理精品一区| 欧美一级高清片在线观看| 在线看不卡av| 91在线观看一区二区| 国产乱人伦偷精品视频不卡| 日韩福利视频导航| 一区av在线播放| 综合久久一区二区三区| 久久一区二区三区四区| 日韩一区二区三免费高清| 在线观看日韩毛片| 色网站国产精品| 99综合电影在线视频| 国产精品亚洲综合一区在线观看| 日韩成人伦理电影在线观看| 亚洲mv在线观看| 亚洲成av人综合在线观看| 亚洲综合免费观看高清完整版在线 | 中文一区在线播放| 国产欧美日韩不卡免费| 久久亚洲春色中文字幕久久久| 91精品欧美综合在线观看最新| 欧美猛男gaygay网站| 欧美乱熟臀69xxxxxx| 欧美人狂配大交3d怪物一区| 欧洲国内综合视频| 欧美三级韩国三级日本三斤| 欧美亚洲综合一区| 欧美日韩中文字幕精品| 欧美日韩国产不卡| 7777女厕盗摄久久久| 91精品国产入口| 欧美大胆人体bbbb| 久久亚洲综合色| 国产精品美女久久久久久久| 亚洲三级视频在线观看| 亚洲免费观看在线视频| 亚洲国产中文字幕在线视频综合| 亚洲一区二区美女| 久久精品国内一区二区三区| 久久99精品国产.久久久久| 国内偷窥港台综合视频在线播放| 激情综合色综合久久| 国产成人亚洲精品青草天美| 粉嫩欧美一区二区三区高清影视| a美女胸又www黄视频久久| 欧美在线免费观看亚洲| 欧美一二区视频| 国产午夜精品一区二区三区四区| 亚洲国产精品传媒在线观看| 亚洲制服丝袜在线| 久久国产婷婷国产香蕉| 成人免费高清在线| 欧美中文字幕不卡| 欧美精品一区二区三| 亚洲日本电影在线| 日韩激情中文字幕| 福利电影一区二区| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 欧美日韩成人在线| 久久久久国产精品厨房| 夜夜嗨av一区二区三区中文字幕| 日韩精品国产欧美| caoporen国产精品视频| 欧美精品久久久久久久多人混战| 久久香蕉国产线看观看99| 亚洲免费视频中文字幕| 日本色综合中文字幕| 99热国产精品| 欧美成人免费网站| 亚洲在线免费播放| 国产乱子伦视频一区二区三区| 欧美在线不卡视频| 久久久国际精品| 三级久久三级久久久| aaa亚洲精品| 久久蜜臀精品av| 日韩高清在线电影| 色天天综合色天天久久| 国产午夜亚洲精品理论片色戒 | 成人国产电影网| 日韩精品一区二区三区在线播放| 亚洲欧美欧美一区二区三区| 久久er精品视频| 欧美日韩免费不卡视频一区二区三区| 欧美精品一区二区三| 日韩精品午夜视频| 欧洲一区二区av| 亚洲人午夜精品天堂一二香蕉| 黑人精品欧美一区二区蜜桃| 91麻豆精品国产91久久久资源速度 | 久久女同精品一区二区| 午夜久久久久久久久| 色欲综合视频天天天| 国产精品美女久久久久久2018| 精品一区二区三区在线视频| 欧美喷潮久久久xxxxx| 亚洲精品视频免费看| 99视频一区二区三区| 国产精品久久久久久久久搜平片| 精品夜夜嗨av一区二区三区| 日韩三级在线观看| 日韩av二区在线播放| 欧美精品欧美精品系列| 亚洲成人一区在线| 欧美日韩一区二区三区视频| 亚洲激情图片qvod| 91激情在线视频| 亚洲激情六月丁香| 色视频欧美一区二区三区| 日韩美女啊v在线免费观看| thepron国产精品| 国产精品久久久久久妇女6080 | 99久久久精品| 亚洲天天做日日做天天谢日日欢 | 国产成人精品综合在线观看|