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

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

?? thr.c

?? gcc的組件
?? C
字號:
/* 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 GCC.GCC 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.GCC 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 withGCC; see the file COPYING.  If not, write to the Free SoftwareFoundation, 51 Franklin Street, Fifth Floor,Boston, MA 02110-1301, 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 "objc/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 void __attribute__((noreturn))__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);}/* Make the objc thread system aware that a thread which is managed   (started, stopped) by external code could access objc facilities   from now on.  This is used when you are interfacing with some   external non-objc-based environment/system - you must call   objc_thread_add () before an alien thread makes any calls to   Objective-C.  Do not cause the _objc_became_multi_threaded hook to   be executed. */void objc_thread_add (void){  objc_mutex_lock (__objc_runtime_mutex);  __objc_is_multi_threaded = 1;  __objc_runtime_threads_alive++;  objc_mutex_unlock (__objc_runtime_mutex);  }/* Make the objc thread system aware that a thread managed (started,   stopped) by some external code will no longer access objc and thus   can be forgotten by the objc thread system.  Call   objc_thread_remove () when your alien thread is done with making   calls to Objective-C. */voidobjc_thread_remove (void){  objc_mutex_lock (__objc_runtime_mutex);  __objc_runtime_threads_alive--;  objc_mutex_unlock (__objc_runtime_mutex);  }/* End of File */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91网站视频在线观看| 国产精品亲子乱子伦xxxx裸| 久久综合色综合88| 亚洲男人的天堂网| 精品一区二区三区在线播放视频 | 成人一区二区三区视频在线观看 | 日韩一级精品视频在线观看| 国产人妖乱国产精品人妖| 午夜精品在线看| 成人午夜电影久久影院| 欧美精品 国产精品| 国产精品久99| 国产一区二区三区四| 欧美视频在线播放| 国产精品国产三级国产普通话99| 亚洲mv在线观看| 91免费在线视频观看| 亚洲精品在线观看视频| 午夜精品福利视频网站| 色综合欧美在线| 久久久久久97三级| 国模一区二区三区白浆| 欧美一区二区三区免费在线看| 一区二区三区在线影院| 成人av网站免费| 久久久亚洲高清| 国产在线国偷精品产拍免费yy| 在线电影院国产精品| 亚洲高清免费一级二级三级| 色综合久久88色综合天天6| 亚洲国产精品av| 成人一区二区三区视频在线观看 | 欧美一区二区在线不卡| 亚洲最新视频在线播放| 色综合久久久久综合| 国产精品久久久久久久第一福利| 丁香一区二区三区| 欧美国产1区2区| 国产不卡在线视频| 久久精品在这里| 丰满放荡岳乱妇91ww| 欧美国产一区在线| 成人18视频在线播放| 国产精品看片你懂得| 91美女在线视频| 亚洲一区二区在线免费看| 欧美日韩一区二区欧美激情| 日韩电影在线一区| 欧美电影免费观看高清完整版 | 欧美一区二区啪啪| 久久免费午夜影院| 91麻豆精品视频| 国产精品91一区二区| 久久久噜噜噜久久中文字幕色伊伊 | 日韩一本二本av| 加勒比av一区二区| 国产日韩精品视频一区| av中文字幕在线不卡| 亚洲欧美日韩国产成人精品影院| 欧美日韩在线播放三区| 青青草国产成人av片免费| 精品国产髙清在线看国产毛片| 国产成人亚洲精品青草天美| 日韩久久一区二区| 欧美嫩在线观看| 国产一区亚洲一区| 亚洲欧美色一区| 日韩欧美中文字幕公布| 国产91精品欧美| 五月婷婷激情综合| 久久久91精品国产一区二区精品| 91香蕉国产在线观看软件| 日韩在线一区二区| 中文字幕av资源一区| 欧美性大战久久久| 国产精品综合视频| 亚洲香肠在线观看| 国产欧美日韩视频在线观看| 欧美日本国产视频| 粉嫩蜜臀av国产精品网站| 亚洲影视资源网| 久久久久久久久岛国免费| 欧美午夜精品理论片a级按摩| 青青草精品视频| 亚洲欧美综合在线精品| 久久综合狠狠综合久久综合88| 91浏览器在线视频| 国产一区二区精品久久91| 亚洲成人tv网| 最新成人av在线| 国产午夜精品一区二区三区视频| 日本精品裸体写真集在线观看| 国产高清无密码一区二区三区| 亚洲第一二三四区| 亚洲欧美经典视频| 中文久久乱码一区二区| 日韩女优制服丝袜电影| 欧美日韩另类一区| 一本到高清视频免费精品| 国产suv一区二区三区88区| 蜜臀av一区二区在线观看| 亚洲影院在线观看| 伊人一区二区三区| 国产精品剧情在线亚洲| 久久久亚洲高清| 日韩免费观看高清完整版 | 91精品国产综合久久久蜜臀图片| 国产成人a级片| 国产精品天美传媒| 日本一区二区三区在线观看| 欧美二区三区的天堂| 不卡欧美aaaaa| 国产一区二区三区电影在线观看| 亚洲超碰97人人做人人爱| 欧美videossexotv100| 欧美日韩在线一区二区| a在线欧美一区| 国产酒店精品激情| 久久99久久久久| 日韩精品欧美精品| 亚洲午夜av在线| 亚洲3atv精品一区二区三区| 亚洲人亚洲人成电影网站色| 久久久91精品国产一区二区三区| 日韩欧美一级二级三级| 在线播放/欧美激情| 欧美日韩国产一二三| 9l国产精品久久久久麻豆| 亚洲最新视频在线观看| 亚洲最大色网站| 亚洲综合免费观看高清在线观看| 亚洲欧美乱综合| 久久久综合精品| 成人免费在线视频| 亚洲天天做日日做天天谢日日欢| 中文字幕欧美国产| 国产精品国产三级国产三级人妇| 国产精品素人视频| 国产精品久久福利| 亚洲另类春色校园小说| 亚洲另类在线视频| 亚洲成人免费看| 日本v片在线高清不卡在线观看| 亚洲精品国产一区二区三区四区在线| 夜夜嗨av一区二区三区| 午夜伦欧美伦电影理论片| 视频一区二区三区在线| 麻豆免费看一区二区三区| 狠狠色狠狠色综合系列| 99re视频这里只有精品| 色综合久久天天| 欧美日韩免费高清一区色橹橹| 欧美日韩国产bt| 日韩女优电影在线观看| 欧美电影免费观看高清完整版在线观看| 欧美精品一区二区三| 国产欧美综合色| 一区二区三区蜜桃| 青青草一区二区三区| 国产河南妇女毛片精品久久久| 不卡一区中文字幕| 欧美在线视频不卡| 日韩午夜激情av| 亚洲毛片av在线| 日本不卡免费在线视频| 国产传媒日韩欧美成人| 色综合天天综合狠狠| 91精品国产欧美一区二区成人| 国产视频亚洲色图| 亚洲一线二线三线视频| 美女脱光内衣内裤视频久久网站| 国产不卡视频在线播放| 91丨九色丨黑人外教| 久久亚洲精品小早川怜子| 亚洲欧美另类在线| 精品中文av资源站在线观看| 91丝袜呻吟高潮美腿白嫩在线观看| 91在线视频播放地址| 欧美精品一区二区三区蜜桃视频 | 日韩黄色片在线观看| 99精品视频中文字幕| 欧美一区二区三区色| 日韩毛片一二三区| 激情伊人五月天久久综合| 成人国产精品免费观看| 久久香蕉国产线看观看99| 亚洲电影一级黄| av成人动漫在线观看| 精品粉嫩aⅴ一区二区三区四区| 亚洲成av人片在线| 972aa.com艺术欧美| 久久久亚洲精品一区二区三区| 亚洲成人资源在线| 91麻豆蜜桃一区二区三区| 国产精品美女www爽爽爽| 久久不见久久见中文字幕免费| 欧美日韩一二三区| 国产精品福利一区二区三区| 激情亚洲综合在线| 欧美精品一区二区三区蜜桃视频|