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

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

?? create.c

?? pthread source code,you can compile directly
?? C
字號:
/* * create.c * * Description: * This translation unit implements routines associated with spawning a new * thread. * * -------------------------------------------------------------------------- * *      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"#ifndef _UWIN#include <process.h>#endifintpthread_create (pthread_t * tid,		const pthread_attr_t * attr,		void *(*start) (void *), void *arg)     /*      * ------------------------------------------------------      * DOCPUBLIC      *      This function creates a thread running the start function,      *      passing it the parameter value, 'arg'. The 'attr'      *      argument specifies optional creation attributes.      *      The identity of the new thread is returned      *      via 'tid', which should not be NULL.      *      * PARAMETERS      *      tid      *              pointer to an instance of pthread_t      *      *      attr      *              optional pointer to an instance of pthread_attr_t      *      *      start      *              pointer to the starting routine for the new thread      *      *      arg      *              optional parameter passed to 'start'      *      *      * DESCRIPTION      *      This function creates a thread running the start function,      *      passing it the parameter value, 'arg'. The 'attr'      *      argument specifies optional creation attributes.      *      The identity of the new thread is returned      *      via 'tid', which should not be the NULL pointer.      *      * RESULTS      *              0               successfully created thread,      *              EINVAL          attr invalid,      *              EAGAIN          insufficient resources.      *      * ------------------------------------------------------      */{  pthread_t thread;  ptw32_thread_t * tp;  register pthread_attr_t a;  HANDLE threadH = 0;  int result = EAGAIN;  int run = PTW32_TRUE;  ThreadParms *parms = NULL;  long stackSize;  int priority;  pthread_t self;  /*   * Before doing anything, check that tid can be stored through   * without invoking a memory protection error (segfault).   * Make sure that the assignment below can't be optimised out by the compiler.   * This is assured by conditionally assigning *tid again at the end.   */  tid->x = 0;  if (attr != NULL)    {      a = *attr;    }  else    {      a = NULL;    }  if ((thread = ptw32_new ()).p == NULL)    {      goto FAIL0;    }  tp = (ptw32_thread_t *) thread.p;  priority = tp->sched_priority;  if ((parms = (ThreadParms *) malloc (sizeof (*parms))) == NULL)    {      goto FAIL0;    }  parms->tid = thread;  parms->start = start;  parms->arg = arg;#if defined(HAVE_SIGSET_T)  /*   * Threads inherit their initial sigmask from their creator thread.   */  self = pthread_self();  tp->sigmask = ((ptw32_thread_t *)self.p)->sigmask;#endif /* HAVE_SIGSET_T */  if (a != NULL)    {      stackSize = a->stacksize;      tp->detachState = a->detachstate;      priority = a->param.sched_priority;#if (THREAD_PRIORITY_LOWEST > THREAD_PRIORITY_NORMAL)      /* WinCE */#else      /* Everything else */      /*       * Thread priority must be set to a valid system level       * without altering the value set by pthread_attr_setschedparam().       */      /*       * PTHREAD_EXPLICIT_SCHED is the default because Win32 threads       * don't inherit their creator's priority. They are started with       * THREAD_PRIORITY_NORMAL (win32 value). The result of not supplying       * an 'attr' arg to pthread_create() is equivalent to defaulting to       * PTHREAD_EXPLICIT_SCHED and priority THREAD_PRIORITY_NORMAL.       */      if (PTHREAD_INHERIT_SCHED == a->inheritsched)	{	  /*	   * If the thread that called pthread_create() is a Win32 thread	   * then the inherited priority could be the result of a temporary	   * system adjustment. This is not the case for POSIX threads.	   */#if ! defined(HAVE_SIGSET_T)	  self = pthread_self ();#endif	  priority = ((ptw32_thread_t *) self.p)->sched_priority;	}#endif    }  else    {      /*       * Default stackSize       */      stackSize = PTHREAD_STACK_MIN;    }  tp->state = run ? PThreadStateInitial : PThreadStateSuspended;  tp->keys = NULL;  /*   * Threads must be started in suspended mode and resumed if necessary   * after _beginthreadex returns us the handle. Otherwise we set up a   * race condition between the creating and the created threads.   * Note that we also retain a local copy of the handle for use   * by us in case thread.p->threadH gets NULLed later but before we've   * finished with it here.   */#if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__)   tp->threadH =    threadH =    (HANDLE) _beginthreadex ((void *) NULL,	/* No security info             */			     (unsigned) stackSize,	/* default stack size   */			     ptw32_threadStart,			     parms,			     (unsigned)			     CREATE_SUSPENDED,			     (unsigned *) &(tp->thread));  if (threadH != 0)    {      if (a != NULL)	{	  (void) ptw32_setthreadpriority (thread, SCHED_OTHER, priority);	}      if (run)	{	  ResumeThread (threadH);	}    }#else /* __MINGW32__ && ! __MSVCRT__ */  /*   * This lock will force pthread_threadStart() to wait until we have   * the thread handle and have set the priority.   */  (void) pthread_mutex_lock (&tp->cancelLock);  tp->threadH =    threadH =    (HANDLE) _beginthread (ptw32_threadStart, (unsigned) stackSize,	/* default stack size   */			   parms);  /*   * Make the return code match _beginthreadex's.   */  if (threadH == (HANDLE) - 1L)    {      tp->threadH = threadH = 0;    }  else    {      if (!run)	{	  /* 	   * beginthread does not allow for create flags, so we do it now.	   * Note that beginthread itself creates the thread in SUSPENDED	   * mode, and then calls ResumeThread to start it.	   */	  SuspendThread (threadH);	}      if (a != NULL)	{	  (void) ptw32_setthreadpriority (thread, SCHED_OTHER, priority);	}    }  (void) pthread_mutex_unlock (&tp->cancelLock);#endif /* __MINGW32__ && ! __MSVCRT__ */  result = (threadH != 0) ? 0 : EAGAIN;  /*   * Fall Through Intentionally   */  /*   * ------------   * Failure Code   * ------------   */FAIL0:  if (result != 0)    {      ptw32_threadDestroy (thread);      tp = NULL;      if (parms != NULL)	{	  free (parms);	}    }  else    {      *tid = thread;    }#ifdef _UWIN  if (result == 0)    pthread_count++;#endif  return (result);}				/* pthread_create */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久奇米777| 懂色一区二区三区免费观看| 亚洲成人一区二区在线观看| 日日摸夜夜添夜夜添国产精品| 亚洲电影一区二区| 久色婷婷小香蕉久久| av福利精品导航| 亚洲男人天堂av网| 视频一区视频二区在线观看| 国产盗摄精品一区二区三区在线| 日本久久一区二区三区| 欧美一二区视频| 亚洲视频免费看| 蜜臀av性久久久久蜜臀aⅴ四虎 | 欧美一区二区三区系列电影| 久久网站热最新地址| 美美哒免费高清在线观看视频一区二区| 亚洲蜜桃精久久久久久久| 一区视频在线播放| 热久久一区二区| 99久久99久久精品国产片果冻 | 国产日产精品1区| 亚洲一区二区视频在线观看| 国产精品12区| 亚洲综合激情小说| 国产91精品露脸国语对白| 91精品麻豆日日躁夜夜躁| 亚洲免费成人av| 成人做爰69片免费看网站| 538在线一区二区精品国产| 日韩美女视频19| 懂色av一区二区三区蜜臀| 国产精品综合视频| 欧美性做爰猛烈叫床潮| 亚洲视频图片小说| 色综合婷婷久久| 日本一区二区三区四区| 久久精品国产亚洲a| 欧美午夜精品理论片a级按摩| 国产日韩精品一区二区浪潮av| 国产精品乱子久久久久| 国产成人亚洲综合色影视| 欧美一二三区在线| 丝袜a∨在线一区二区三区不卡| 日本韩国精品在线| 国产精品系列在线| 不卡欧美aaaaa| 久久久久久久久97黄色工厂| 91丝袜高跟美女视频| 欧美激情在线观看视频免费| 成人高清视频在线| 中文字幕一区在线观看| 色婷婷综合中文久久一本| 一区二区三区精密机械公司| 久久久不卡网国产精品二区| 蜜桃精品在线观看| 国产精品久久久久久一区二区三区 | 欧美一区二区久久久| 久久机这里只有精品| 久久久99久久| 日本高清免费不卡视频| 天堂久久久久va久久久久| 91精品国产综合久久久久久久 | 国产欧美日韩综合精品一区二区| 奇米影视在线99精品| 久久精品亚洲麻豆av一区二区| 韩日精品视频一区| 夜夜精品浪潮av一区二区三区| 成人午夜电影网站| 亚洲一区二区三区四区不卡| 国产午夜亚洲精品理论片色戒 | 美女精品一区二区| 一区二区三区精品视频| 欧美精品一区二区三区蜜臀| 91在线免费视频观看| 日韩在线一区二区| 亚洲电影在线播放| 亚洲超丰满肉感bbw| 久久久久久一二三区| 欧美麻豆精品久久久久久| 成a人片亚洲日本久久| 国产一区二区三区黄视频| 一区二区三区蜜桃网| 国产日本欧美一区二区| 欧美一区二区三区四区久久| 99视频精品在线| www.亚洲免费av| 韩国女主播一区| 麻豆久久一区二区| 亚洲一区二区三区四区五区黄| 国产精品国产三级国产aⅴ入口| 久久九九国产精品| 欧美色图免费看| 欧美日韩国产大片| 成人avav影音| 成人av高清在线| 精品1区2区3区| 欧美色图免费看| 欧美无乱码久久久免费午夜一区| 色天天综合久久久久综合片| 国产精品一区三区| 国产剧情在线观看一区二区| 紧缚奴在线一区二区三区| 美女任你摸久久 | 国产偷国产偷亚洲高清人白洁| xfplay精品久久| 欧美精品一区二区久久婷婷 | 亚洲特黄一级片| 国产精品久久夜| 亚洲已满18点击进入久久| 亚洲最新视频在线播放| 亚洲综合另类小说| 麻豆一区二区三区| 97久久精品人人澡人人爽| 欧美日韩一区 二区 三区 久久精品| 在线中文字幕一区| 在线观看91精品国产麻豆| 亚洲精品一区二区三区在线观看| 欧美日韩中文一区| 日韩午夜小视频| 国产蜜臀97一区二区三区| 亚洲伊人伊色伊影伊综合网| 亚洲精品欧美专区| 日韩电影在线一区二区三区| 国产精品自在在线| 北条麻妃一区二区三区| 69av一区二区三区| 中文字幕在线播放不卡一区| 日韩av网站免费在线| 一本大道av伊人久久综合| 久久亚洲精华国产精华液| 一区二区三区精品在线| 成人在线综合网站| 91精品国产福利| 亚洲午夜在线电影| 高清成人在线观看| 亚洲高清免费在线| av不卡一区二区三区| 日韩精品一区二区在线观看| 性欧美疯狂xxxxbbbb| 99久久精品一区| 国产视频亚洲色图| 久久激情五月激情| 欧美一区二区三区视频在线观看| 亚洲激情在线激情| 99精品久久久久久| 国产精品久久久久永久免费观看| 日本不卡在线视频| 欧美第一区第二区| 美日韩黄色大片| 欧美一区日韩一区| 日本麻豆一区二区三区视频| 欧美中文字幕一区二区三区亚洲| 国产精品三级视频| 国产福利一区在线| 国产精品短视频| 欧美日韩色一区| 偷拍日韩校园综合在线| 欧美精品欧美精品系列| 亚洲欧洲av色图| 精品一区二区三区在线播放视频| 69堂成人精品免费视频| 亚洲成人午夜电影| 色综合一个色综合| 热久久国产精品| 国产精品久久久久久亚洲伦| youjizz久久| 亚洲一区二区精品久久av| 欧美日韩免费电影| 激情成人午夜视频| 亚洲欧美色综合| 欧美不卡视频一区| www.久久精品| 一二三四社区欧美黄| 欧美日韩精品欧美日韩精品一| 精品一区二区成人精品| 一区二区三区日韩精品视频| 欧美另类videos死尸| 91亚洲精品久久久蜜桃网站| 免费成人结看片| 亚洲欧美国产高清| 精品国产伦一区二区三区观看方式 | 天堂蜜桃一区二区三区| 国产精品福利电影一区二区三区四区| 91精品国产免费| 欧美在线播放高清精品| 成人精品一区二区三区四区| 免费成人美女在线观看.| 一区二区三区在线免费观看| 国产视频一区在线播放| 日韩一区二区三区高清免费看看| 91热门视频在线观看| 另类专区欧美蜜桃臀第一页| 夜夜精品浪潮av一区二区三区| 欧美国产1区2区| 国产精品视频观看| 久久久久久久久久久99999| 日韩免费观看2025年上映的电影| 欧美日韩在线播| 色婷婷一区二区|