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

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

?? exception1.c

?? pthread source code,you can compile directly
?? C
字號:
/* * File: exception1.c * * * -------------------------------------------------------------------------- * *      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 * * -------------------------------------------------------------------------- * * Test Synopsis: Test passing of exceptions back to the application. * * Test Method (Validation or Falsification): * -  * * Requirements Tested: * - * * Features Tested: * -  * * Cases Tested: * -  * * Description: * -  * * Environment: * -  * * Input: * - None. * * Output: * - File name, Line number, and failed expression on failure. * - No output on success. * * Assumptions: * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock *   pthread_testcancel, pthread_cancel, pthread_join * * Pass Criteria: * - Process returns zero exit status. * * Fail Criteria: * - Process returns non-zero exit status. */#if defined(_MSC_VER) || defined(__cplusplus)#include "test.h"/* * Create NUMTHREADS threads in addition to the Main thread. */enum {  NUMTHREADS = 4};void *exceptionedThread(void * arg){  int dummy = 0;  int result = ((int)PTHREAD_CANCELED + 1);  /* Set to async cancelable */  assert(pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL) == 0);  assert(pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL) == 0);  Sleep(100);#if defined(_MSC_VER) && !defined(__cplusplus)  __try  {    int zero = (int) arg; /* Passed in from arg to avoid compiler error */    int one = 1;    /*     * The deliberate exception condition (zero divide) is     * in an "if" to avoid being optimised out.     */    if (dummy == one/zero)      Sleep(0);  }  __except (EXCEPTION_EXECUTE_HANDLER)  {    /* Should get into here. */    result = ((int)PTHREAD_CANCELED + 2);  }#elif defined(__cplusplus)  try  {    /*     * I had a zero divide exception here but it     * wasn't being caught by the catch(...)     * below under Mingw32. That could be a problem.     */    throw dummy;  }#if defined(PtW32CatchAll)  PtW32CatchAll#else  catch (...)#endif  {    /* Should get into here. */    result = ((int)PTHREAD_CANCELED + 2);  }#endif  return (void *) result;}void *canceledThread(void * arg){  int result = ((int)PTHREAD_CANCELED + 1);  int count;  /* Set to async cancelable */  assert(pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL) == 0);  assert(pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL) == 0);#if defined(_MSC_VER) && !defined(__cplusplus)  __try  {    /*     * We wait up to 10 seconds, waking every 0.1 seconds,     * for a cancelation to be applied to us.     */    for (count = 0; count < 100; count++)      Sleep(100);  }  __except (EXCEPTION_EXECUTE_HANDLER)  {    /* Should NOT get into here. */    result = ((int)PTHREAD_CANCELED + 2);  }#elif defined(__cplusplus)  try  {    /*     * We wait up to 10 seconds, waking every 0.1 seconds,     * for a cancelation to be applied to us.     */    for (count = 0; count < 100; count++)      Sleep(100);  }#if defined(PtW32CatchAll)  PtW32CatchAll#else  catch (...)#endif  {    /* Should NOT get into here. */    result = ((int)PTHREAD_CANCELED + 2);  }#endif  return (void *) result;}intmain(){  int failed = 0;  int i;  pthread_t mt;  pthread_t et[NUMTHREADS];  pthread_t ct[NUMTHREADS];  assert((mt = pthread_self()).p != NULL);  for (i = 0; i < NUMTHREADS; i++)    {      assert(pthread_create(&et[i], NULL, exceptionedThread, (void *) 0) == 0);      assert(pthread_create(&ct[i], NULL, canceledThread, NULL) == 0);    }  /*   * Code to control or munipulate child threads should probably go here.   */  Sleep(1000);  for (i = 0; i < NUMTHREADS; i++)    {      assert(pthread_cancel(ct[i]) == 0);    }  /*   * Give threads time to run.   */  Sleep(NUMTHREADS * 1000);  /*   * Check any results here. Set "failed" and only print output on failure.   */  failed = 0;  for (i = 0; i < NUMTHREADS; i++)    {      int fail = 0;      int result = 0;	/* Canceled thread */      assert(pthread_join(ct[i], (void **) &result) == 0);      assert(!(fail = (result != (int) PTHREAD_CANCELED)));      failed = (failed || fail);      /* Exceptioned thread */      assert(pthread_join(et[i], (void **) &result) == 0);      assert(!(fail = (result != ((int) PTHREAD_CANCELED + 2))));      failed = (failed || fail);    }  assert(!failed);  /*   * Success.   */  return 0;}#else /* defined(_MSC_VER) || defined(__cplusplus) */#include <stdio.h>intmain(){  fprintf(stderr, "Test N/A for this compiler environment.\n");  return 0;}#endif /* defined(_MSC_VER) || defined(__cplusplus) */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91在线观看免费视频| 国产女人aaa级久久久级 | 国产精品妹子av| 亚洲国产精品一区二区www| 国内成+人亚洲+欧美+综合在线| 色吧成人激情小说| 国产日韩精品久久久| 日本网站在线观看一区二区三区 | 亚洲国产精品黑人久久久| 亚洲成av人片在线| 色中色一区二区| 久久精品一区蜜桃臀影院| 青娱乐精品在线视频| 欧美午夜宅男影院| 一区二区三区四区在线免费观看| 国产精品一级片在线观看| 欧美一区二区精品久久911| 亚洲影视在线播放| av福利精品导航| 一区二区欧美视频| 91麻豆国产福利在线观看| 日本一区二区三区在线不卡| 精品一区二区三区免费播放 | 久久综合精品国产一区二区三区| 亚洲国产中文字幕| 欧美婷婷六月丁香综合色| 亚洲精品视频在线| 99在线精品免费| 中文字幕欧美激情| 国产成人午夜精品影院观看视频| 久久综合五月天婷婷伊人| 久久精品国产色蜜蜜麻豆| 欧美精品日韩综合在线| 天天综合网 天天综合色| 欧美人xxxx| 日韩av一级电影| 日韩欧美aaaaaa| 国产剧情av麻豆香蕉精品| wwwwww.欧美系列| 福利一区二区在线| 中文字幕亚洲精品在线观看 | 久久这里只有精品视频网| 久久精品99国产国产精| 久久免费视频一区| 成人h动漫精品一区二| 成人免费在线视频| 欧美日韩专区在线| 免费人成精品欧美精品| 亚洲精品在线观看网站| 国产suv精品一区二区883| 国产精品盗摄一区二区三区| 色嗨嗨av一区二区三区| 三级久久三级久久久| 久久久国产精品麻豆| 不卡大黄网站免费看| 天天综合色天天| 欧美精品一区二区三区久久久 | 免费欧美高清视频| 精品国产乱子伦一区| 成人精品鲁一区一区二区| 亚洲激情图片qvod| 日韩免费视频线观看| 99精品视频一区二区三区| 亚洲综合色区另类av| 精品捆绑美女sm三区| 色天天综合久久久久综合片| 日本欧美韩国一区三区| 国产日韩精品一区| 91精品免费在线| 成人动漫精品一区二区| 日本亚洲一区二区| 欧美激情一区二区三区不卡 | 麻豆精品一二三| 中文字幕一区二区在线播放| 在线播放中文字幕一区| 成人国产精品免费观看| 麻豆91在线观看| 亚洲女与黑人做爰| 国产片一区二区三区| 欧美日韩成人综合在线一区二区| 国产剧情一区二区| 日本视频中文字幕一区二区三区| 国产精品天美传媒| 精品国产乱码久久久久久牛牛| 色婷婷综合激情| 成人免费视频免费观看| 欧美日韩一区二区三区四区 | 国产乱子轮精品视频| 亚洲图片一区二区| 日韩美女久久久| 久久综合网色—综合色88| 欧美日韩精品一区二区三区蜜桃| 成人avav在线| 国产乱妇无码大片在线观看| 婷婷夜色潮精品综合在线| 亚洲男人天堂av| 成人免费在线播放视频| 久久免费电影网| 日韩欧美一级精品久久| 56国语精品自产拍在线观看| 在线亚洲高清视频| 色偷偷成人一区二区三区91| 99久久国产综合色|国产精品| 国产91对白在线观看九色| 狠狠色综合色综合网络| 精品一二线国产| 美美哒免费高清在线观看视频一区二区 | 精品88久久久久88久久久| 91精品在线观看入口| 欧美日韩精品综合在线| 在线视频你懂得一区| 色www精品视频在线观看| 99精品视频在线免费观看| 99re这里都是精品| 99re在线视频这里只有精品| 色综合久久66| 欧美日韩不卡一区| 欧美一区二区三区系列电影| 欧美一级免费观看| 欧美成人vps| 国产清纯在线一区二区www| 国产嫩草影院久久久久| 国产精品国产a级| 自拍偷拍亚洲欧美日韩| 亚洲午夜一区二区三区| 免费在线观看日韩欧美| 激情久久五月天| 成人免费看片app下载| 99久久国产综合色|国产精品| 日本韩国精品在线| 欧美美女一区二区三区| 精品国产百合女同互慰| 国产精品视频免费| 亚洲永久精品国产| 乱中年女人伦av一区二区| 粉嫩av一区二区三区| 日本乱人伦一区| 91精品国产综合久久精品图片| 日韩亚洲欧美成人一区| 国产精品网友自拍| 性做久久久久久久免费看| 寂寞少妇一区二区三区| 波多野结衣中文字幕一区| 欧美三区在线视频| 久久久久久综合| 一区二区视频在线| 久久精品99久久久| 91国产免费观看| 精品国产伦一区二区三区观看体验| 国产精品久久三区| 青娱乐精品视频在线| 成人av在线播放网址| 欧美精品 日韩| 中文字幕精品一区二区三区精品| 亚洲午夜激情av| 国产激情精品久久久第一区二区| 91久久线看在观草草青青| 欧美xxxx老人做受| 一个色综合网站| 国产剧情一区在线| 91麻豆精品久久久久蜜臀| 国产精品看片你懂得| 免费的成人av| 日本韩国视频一区二区| 国产欧美日韩不卡免费| 日韩精品一级二级| 99热这里都是精品| 久久婷婷久久一区二区三区| 亚洲国产精品综合小说图片区| 高潮精品一区videoshd| 日韩精品一区二区三区在线播放| 一区二区三区不卡在线观看 | 中文字幕日韩一区| 久久黄色级2电影| 欧美日韩精品一区二区三区| 中文字幕乱码日本亚洲一区二区| 秋霞国产午夜精品免费视频| 91浏览器打开| 亚洲日穴在线视频| 成人免费视频免费观看| 久久久精品综合| 国内精品国产成人| 欧美一级国产精品| 丝袜国产日韩另类美女| 欧美在线观看一区二区| 亚洲免费成人av| 不卡欧美aaaaa| 国产精品美女久久久久aⅴ| 色欧美乱欧美15图片| 亚洲欧洲日产国码二区| 成人国产在线观看| 国产精品三级视频| 国产成人夜色高潮福利影视| 欧美成人精品二区三区99精品| 丝袜美腿亚洲一区| 日韩精品一区二区三区在线播放| 免费在线观看日韩欧美| 日韩亚洲欧美综合| 国产一区二区视频在线| 久久这里都是精品|