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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? thr.c

?? GCC編譯器源代碼
?? C
字號(hào):
/* GNU Objective C Runtime Thread Interface   Copyright (C) 1996, 1997 Free Software Foundation, Inc.   Contributed by Galen C. Hunt (gchunt@cs.rochester.edu)This file is part of GNU CC.GNU CC is free software; you can redistribute it and/or modify it under theterms of the GNU General Public License as published by the Free SoftwareFoundation; either version 2, or (at your option) any later version.GNU CC is distributed in the hope that it will be useful, but WITHOUT ANYWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESSFOR A PARTICULAR PURPOSE.  See the GNU General Public License for moredetails.You should have received a copy of the GNU General Public License along withGNU CC; see the file COPYING.  If not, write to the Free SoftwareFoundation, 59 Temple Place - Suite 330,Boston, MA 02111-1307, USA.  *//* As a special exception, if you link this library with files compiled with   GCC to produce an executable, this does not cause the resulting executable   to be covered by the GNU General Public License. This exception does not   however invalidate any other reasons why the executable file might be   covered by the GNU General Public License.  */#include <stdlib.h>#include "runtime.h"/* Global exit status. */int __objc_thread_exit_status = 0;/* Flag which lets us know if we ever became multi threaded */int __objc_is_multi_threaded = 0;/* The hook function called when the runtime becomes multi threaded */objc_thread_callback _objc_became_multi_threaded = NULL;/*  Use this to set the hook function that will be called when the   runtime initially becomes multi threaded.  The hook function is only called once, meaning only when the   2nd thread is spawned, not for each and every thread.  It returns the previous hook function or NULL if there is none.  A program outside of the runtime could set this to some function so  it can be informed; for example, the GNUstep Base Library sets it   so it can implement the NSBecomingMultiThreaded notification.  */objc_thread_callback objc_set_thread_callback(objc_thread_callback func){  objc_thread_callback temp = _objc_became_multi_threaded;  _objc_became_multi_threaded = func;  return temp;}/*  Private functions  These functions are utilized by the frontend, but they are not  considered part of the public interface.  *//*  First function called in a thread, starts everything else.  This function is passed to the backend by objc_thread_detach  as the starting function for a new thread. */struct __objc_thread_start_state{  SEL selector;  id object;  id argument;};static volatile void__objc_thread_detach_function(struct __objc_thread_start_state *istate){  /* Valid state? */  if (istate) {    id (*imp)(id,SEL,id);    SEL selector = istate->selector;    id object   = istate->object;    id argument = istate->argument;    /* Don't need anymore so free it */    objc_free(istate);    /* Clear out the thread local storage */    objc_thread_set_data(NULL);    /* Check to see if we just became multi threaded */    if (!__objc_is_multi_threaded)      {	__objc_is_multi_threaded = 1;	/* Call the hook function */	if (_objc_became_multi_threaded != NULL)	  (*_objc_became_multi_threaded)();      }    /* Call the method */    if ((imp = (id(*)(id, SEL, id))objc_msg_lookup(object, selector)))	(*imp)(object, selector, argument);    else      objc_error(object, OBJC_ERR_UNIMPLEMENTED,		 "objc_thread_detach called with bad selector.\n");  }  else    objc_error(nil, OBJC_ERR_BAD_STATE,	       "objc_thread_detach called with NULL state.\n");  /* Exit the thread */  objc_thread_exit();}/*  Frontend functions  These functions constitute the public interface to the Objective-C thread  and mutex functionality.  *//* Frontend thread functions *//*  Detach a new thread of execution and return its id.  Returns NULL if fails.  Thread is started by sending message with selector to object.  Message  takes a single argument.  */objc_thread_tobjc_thread_detach(SEL selector, id object, id argument){  struct __objc_thread_start_state *istate;  objc_thread_t        thread_id = NULL;  /* Allocate the state structure */  if (!(istate = (struct __objc_thread_start_state *)	objc_malloc(sizeof(*istate))))    return NULL;  /* Initialize the state structure */  istate->selector = selector;  istate->object = object;  istate->argument = argument;  /* lock access */  objc_mutex_lock(__objc_runtime_mutex);  /* Call the backend to spawn the thread */  if ((thread_id = __objc_thread_detach((void *)__objc_thread_detach_function,					istate)) == NULL)    {      /* failed! */      objc_mutex_unlock(__objc_runtime_mutex);      objc_free(istate);      return NULL;    }  /* Increment our thread counter */  __objc_runtime_threads_alive++;  objc_mutex_unlock(__objc_runtime_mutex);  return thread_id;}/* Set the current thread's priority. */intobjc_thread_set_priority(int priority){  /* Call the backend */  return __objc_thread_set_priority(priority);}/* Return the current thread's priority. */intobjc_thread_get_priority(void){  /* Call the backend */  return __objc_thread_get_priority();}/*  Yield our process time to another thread.  Any BUSY waiting that is done  by a thread should use this function to make sure that other threads can  make progress even on a lazy uniprocessor system.  */voidobjc_thread_yield(void){  /* Call the backend */  __objc_thread_yield();}/*  Terminate the current tread.  Doesn't return.  Actually, if it failed returns -1.  */intobjc_thread_exit(void){  /* Decrement our counter of the number of threads alive */  objc_mutex_lock(__objc_runtime_mutex);  __objc_runtime_threads_alive--;  objc_mutex_unlock(__objc_runtime_mutex);  /* Call the backend to terminate the thread */  return __objc_thread_exit();}/*  Returns an integer value which uniquely describes a thread.  Must not be  NULL which is reserved as a marker for "no thread".  */objc_thread_tobjc_thread_id(void){  /* Call the backend */  return __objc_thread_id();}/*  Sets the thread's local storage pointer.   Returns 0 if successful or -1 if failed.  */intobjc_thread_set_data(void *value){  /* Call the backend */  return __objc_thread_set_data(value);}/*  Returns the thread's local storage pointer.  Returns NULL on failure.  */void *objc_thread_get_data(void){  /* Call the backend */  return __objc_thread_get_data();}/* Frontend mutex functions *//*  Allocate a mutex.  Return the mutex pointer if successful or NULL if the  allocation failed for any reason.  */objc_mutex_tobjc_mutex_allocate(void){  objc_mutex_t mutex;  /* Allocate the mutex structure */  if (!(mutex = (objc_mutex_t)objc_malloc(sizeof(struct objc_mutex))))    return NULL;  /* Call backend to create the mutex */  if (__objc_mutex_allocate(mutex))    {      /* failed! */      objc_free(mutex);      return NULL;    }  /* Initialize mutex */  mutex->owner = NULL;  mutex->depth = 0;  return mutex;}/*  Deallocate a mutex.  Note that this includes an implicit mutex_lock to  insure that no one else is using the lock.  It is legal to deallocate  a lock if we have a lock on it, but illegal to deallocate a lock held  by anyone else.  Returns the number of locks on the thread.  (1 for deallocate).  */intobjc_mutex_deallocate(objc_mutex_t mutex){  int depth;  /* Valid mutex? */  if (!mutex)    return -1;  /* Acquire lock on mutex */  depth = objc_mutex_lock(mutex);  /* Call backend to destroy mutex */  if (__objc_mutex_deallocate(mutex))    return -1;  /* Free the mutex structure */  objc_free(mutex);  /* Return last depth */  return depth;}/*  Grab a lock on a mutex.  If this thread already has a lock on this mutex  then we increment the lock count.  If another thread has a lock on the   mutex we block and wait for the thread to release the lock.  Returns the lock count on the mutex held by this thread.  */intobjc_mutex_lock(objc_mutex_t mutex){  objc_thread_t thread_id;  int status;  /* Valid mutex? */  if (!mutex)    return -1;  /* If we already own the lock then increment depth */  thread_id = objc_thread_id();  if (mutex->owner == thread_id)    return ++mutex->depth;  /* Call the backend to lock the mutex */  status = __objc_mutex_lock(mutex);  /* Failed? */  if (status)    return status;  /* Successfully locked the thread */  mutex->owner = thread_id;  return mutex->depth = 1;}/*  Try to grab a lock on a mutex.  If this thread already has a lock on  this mutex then we increment the lock count and return it.  If another  thread has a lock on the mutex returns -1.  */intobjc_mutex_trylock(objc_mutex_t mutex){  objc_thread_t thread_id;  int status;  /* Valid mutex? */  if (!mutex)    return -1;  /* If we already own the lock then increment depth */   thread_id = objc_thread_id();  if (mutex->owner == thread_id)    return ++mutex->depth;      /* Call the backend to try to lock the mutex */  status = __objc_mutex_trylock(mutex);  /* Failed? */  if (status)    return status;  /* Successfully locked the thread */  mutex->owner = thread_id;  return mutex->depth = 1;}/*   Unlocks the mutex by one level.  Decrements the lock count on this mutex by one.  If the lock count reaches zero, release the lock on the mutex.  Returns the lock count on the mutex.  It is an error to attempt to unlock a mutex which this thread   doesn't hold in which case return -1 and the mutex is unaffected.  */intobjc_mutex_unlock(objc_mutex_t mutex){  objc_thread_t thread_id;  int status;  /* Valid mutex? */  if (!mutex)    return -1;  /* If another thread owns the lock then abort */  thread_id = objc_thread_id();  if (mutex->owner != thread_id)    return -1;  /* Decrement depth and return */  if (mutex->depth > 1)    return --mutex->depth;  /* Depth down to zero so we are no longer the owner */  mutex->depth = 0;  mutex->owner = NULL;  /* Have the backend unlock the mutex */  status = __objc_mutex_unlock(mutex);  /* Failed? */  if (status)    return status;  return 0;}/* Frontend condition mutex functions *//*  Allocate a condition.  Return the condition pointer if successful or NULL  if the allocation failed for any reason.  */objc_condition_t objc_condition_allocate(void){  objc_condition_t condition;      /* Allocate the condition mutex structure */  if (!(condition = 	(objc_condition_t)objc_malloc(sizeof(struct objc_condition))))    return NULL;  /* Call the backend to create the condition mutex */  if (__objc_condition_allocate(condition))    {      /* failed! */      objc_free(condition);      return NULL;    }  /* Success! */  return condition;}/*  Deallocate a condition. Note that this includes an implicit   condition_broadcast to insure that waiting threads have the opportunity  to wake.  It is legal to dealloc a condition only if no other  thread is/will be using it. Here we do NOT check for other threads  waiting but just wake them up.  */intobjc_condition_deallocate(objc_condition_t condition){  /* Broadcast the condition */  if (objc_condition_broadcast(condition))    return -1;  /* Call the backend to destroy */  if (__objc_condition_deallocate(condition))    return -1;  /* Free the condition mutex structure */  objc_free(condition);  return 0;}/*  Wait on the condition unlocking the mutex until objc_condition_signal()  or objc_condition_broadcast() are called for the same condition. The  given mutex *must* have the depth set to 1 so that it can be unlocked  here, so that someone else can lock it and signal/broadcast the condition.  The mutex is used to lock access to the shared data that make up the  "condition" predicate.  */intobjc_condition_wait(objc_condition_t condition, objc_mutex_t mutex){  objc_thread_t thread_id;  /* Valid arguments? */  if (!mutex || !condition)    return -1;  /* Make sure we are owner of mutex */  thread_id = objc_thread_id();  if (mutex->owner != thread_id)    return -1;  /* Cannot be locked more than once */  if (mutex->depth > 1)    return -1;  /* Virtually unlock the mutex */  mutex->depth = 0;  mutex->owner = (objc_thread_t)NULL;  /* Call the backend to wait */  __objc_condition_wait(condition, mutex);  /* Make ourselves owner of the mutex */  mutex->owner = thread_id;  mutex->depth = 1;  return 0;}/*  Wake up all threads waiting on this condition. It is recommended that   the called would lock the same mutex as the threads in objc_condition_wait  before changing the "condition predicate" and make this call and unlock it  right away after this call.  */intobjc_condition_broadcast(objc_condition_t condition){  /* Valid condition mutex? */  if (!condition)    return -1;  return __objc_condition_broadcast(condition);}/*  Wake up one thread waiting on this condition. It is recommended that   the called would lock the same mutex as the threads in objc_condition_wait  before changing the "condition predicate" and make this call and unlock it  right away after this call.  */intobjc_condition_signal(objc_condition_t condition){  /* Valid condition mutex? */  if (!condition)    return -1;  return __objc_condition_signal(condition);}/* End of File */

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人在线电影| 成人小视频免费在线观看| 欧美国产成人精品| 国产自产视频一区二区三区| 国产人伦精品一区二区| 成人h版在线观看| 亚洲成a人片在线不卡一二三区| 欧美午夜精品免费| 狠狠色丁香婷婷综合久久片| 亚洲欧美在线高清| 欧美一区二区三区婷婷月色 | 麻豆国产精品777777在线| 久久久久久毛片| 91精品福利视频| 精品一区二区综合| 亚洲女子a中天字幕| 日韩精品资源二区在线| av一区二区不卡| 日本vs亚洲vs韩国一区三区| 日本一区二区三区电影| 欧美高清hd18日本| jizz一区二区| 久久99国产精品成人| 亚洲激情图片小说视频| 久久综合久久99| 欧美电影在线免费观看| zzijzzij亚洲日本少妇熟睡| 日韩精品一二三区| 亚洲色图欧美在线| 26uuu欧美| 欧美狂野另类xxxxoooo| aaa欧美色吧激情视频| 久久99精品久久久| 亚洲成人av中文| 国产精品不卡在线| 精品日韩一区二区三区免费视频| 色老汉av一区二区三区| 国产精品18久久久久久vr| 亚洲成av人片在www色猫咪| 中文字幕在线播放不卡一区| 久久日韩粉嫩一区二区三区 | 欧美成人r级一区二区三区| 91成人在线观看喷潮| 国产不卡免费视频| 日本不卡一二三| 一区二区三区加勒比av| 中文字幕亚洲在| 国产无人区一区二区三区| 日韩午夜精品电影| 91.麻豆视频| 欧美日本在线看| 欧美亚洲国产一区在线观看网站| 成人精品鲁一区一区二区| 精品亚洲porn| 蜜桃视频第一区免费观看| 香港成人在线视频| 亚洲国产精品久久久久婷婷884 | 亚洲一区在线看| 中文字幕一区av| 中文av一区特黄| 国产欧美一区二区精品婷婷| 久久久不卡网国产精品一区| 亚洲色图视频网| 亚洲精品视频自拍| 亚洲在线视频免费观看| 一区二区三区日本| 亚洲免费三区一区二区| 亚洲日本欧美天堂| 亚洲精品国产一区二区精华液| 国产精品二三区| 亚洲欧美另类综合偷拍| 亚洲男人的天堂在线aⅴ视频| 亚洲人成精品久久久久久| 国产精品久久久久久久久免费相片| 国产女人aaa级久久久级| 国产日韩欧美不卡| 国产精品系列在线| 亚洲欧洲性图库| 亚洲乱码中文字幕| 亚洲午夜久久久久久久久电影院| 一区二区三区四区国产精品| 亚洲在线一区二区三区| 丝袜亚洲精品中文字幕一区| 亚洲电影激情视频网站| 日日欢夜夜爽一区| 精品无人区卡一卡二卡三乱码免费卡| 激情亚洲综合在线| 高清不卡一区二区在线| 91亚洲男人天堂| 欧美唯美清纯偷拍| 日韩情涩欧美日韩视频| 久久网站最新地址| 中文字幕制服丝袜一区二区三区 | 色婷婷亚洲婷婷| 欧美日韩在线播放| 欧美成人一区二区三区在线观看| 久久久久亚洲蜜桃| 中文字幕一区免费在线观看| 亚洲乱码国产乱码精品精的特点 | 91精品办公室少妇高潮对白| 91精品国模一区二区三区| 精品国产乱码久久久久久免费| 国产欧美日韩在线| 亚洲一区二区av在线| 久久99久久久欧美国产| 成人免费av在线| 欧美精品乱码久久久久久按摩| 精品久久久久久久久久久院品网| 国产精品传媒视频| 日韩av在线免费观看不卡| 国产成人精品一区二区三区四区 | 欧美中文字幕亚洲一区二区va在线 | 成人av集中营| 在线综合视频播放| 国产欧美精品一区二区色综合| 亚洲一区二区精品久久av| 国产在线观看一区二区| 欧洲av一区二区嗯嗯嗯啊| 欧美精品一区二区三| 亚洲欧美日韩国产综合在线| 麻豆成人91精品二区三区| 99精品偷自拍| 日韩三级伦理片妻子的秘密按摩| 中文字幕精品—区二区四季| 男女性色大片免费观看一区二区| fc2成人免费人成在线观看播放| 555www色欧美视频| 最新中文字幕一区二区三区| 麻豆精品新av中文字幕| 色婷婷av一区二区三区gif | 亚洲欧美日韩在线不卡| 麻豆一区二区99久久久久| 91在线视频免费观看| 欧美tickling挠脚心丨vk| 亚洲成人一区在线| 成人av资源网站| 2021中文字幕一区亚洲| 午夜欧美在线一二页| 99re8在线精品视频免费播放| 久久综合久久久久88| 男男视频亚洲欧美| 在线观看三级视频欧美| 亚洲欧洲日韩综合一区二区| 国产精品99久久久| 精品国产乱码久久久久久免费| 天堂在线亚洲视频| 欧美亚洲免费在线一区| 亚洲人xxxx| 99精品在线观看视频| 国产精品网站在线播放| 国产精品自产自拍| 欧美大肚乱孕交hd孕妇| 天天色图综合网| 欧美日韩在线一区二区| 亚洲一区影音先锋| 91免费国产在线观看| 欧美韩日一区二区三区四区| 韩日欧美一区二区三区| 日韩免费一区二区| 美女脱光内衣内裤视频久久网站| 69堂亚洲精品首页| 天天综合日日夜夜精品| 欧美日韩精品系列| 亚洲超碰精品一区二区| 欧美性色黄大片| 亚洲国产成人91porn| 欧美日韩成人在线| 天天色天天操综合| 91精品国产福利在线观看| 日韩高清不卡一区二区| 日韩亚洲欧美高清| 免费观看成人av| 日韩精品一区二| 韩国视频一区二区| 精品动漫一区二区三区在线观看| 毛片av中文字幕一区二区| 精品少妇一区二区三区在线播放| 狠狠色狠狠色合久久伊人| 久久精品亚洲精品国产欧美kt∨| 国产精品99久久久久久有的能看| 国产亚洲欧美日韩在线一区| 成人免费的视频| 亚洲精品国产一区二区精华液| 在线免费不卡视频| 婷婷国产在线综合| 久久你懂得1024| youjizz国产精品| 一区二区成人在线| 欧美巨大另类极品videosbest | 91色|porny| 亚洲国产综合色| 日韩三级伦理片妻子的秘密按摩| 九九**精品视频免费播放| 国产欧美一区二区三区沐欲 | 精品国一区二区三区| 成人丝袜高跟foot| 亚洲一级电影视频| 精品久久久三级丝袜| 成人高清在线视频| 亚洲国产精品一区二区尤物区|