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

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

?? tclmacthrd.c

?? tcl是工具命令語言
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*  * tclMacThrd.c -- * *	This file implements the Mac-specific thread support. * * Copyright (c) 1991-1994 The Regents of the University of California. * Copyright (c) 1994-1998 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * * SCCS:  @(#) tclMacThrd.c 1.2 98/02/23 16:48:07 */#include "tclInt.h"#include "tclPort.h"#include "tclMacInt.h"#include <Threads.h>#include <Gestalt.h>#define TCL_MAC_THRD_DEFAULT_STACK (256*1024)typedef struct TclMacThrdData {    ThreadID threadID;    VOID *data;    struct TclMacThrdData *next;} TclMacThrdData;/* * This is an array of the Thread Data Keys.  It is a process-wide table. * Its size is originally set to 32, but it can grow if needed. */ static TclMacThrdData **tclMacDataKeyArray;#define TCL_MAC_INITIAL_KEYSIZE 32/* * These two bits of data store the current maximum number of keys * and the keyCounter (which is the number of occupied slots in the * KeyData array. *  */ static int maxNumKeys = 0;static int keyCounter = 0;/* * Prototypes for functions used only in this file */ TclMacThrdData *GetThreadDataStruct(Tcl_ThreadDataKey keyVal);TclMacThrdData *RemoveThreadDataStruct(Tcl_ThreadDataKey keyVal);/* * Note: The race evoked by the emulation layer for joinable threads * (see ../win/tclWinThrd.c) cannot occur on this platform due to * the cooperative implementation of multithreading. *//* *---------------------------------------------------------------------- * * TclMacHaveThreads -- * *	Do we have the Thread Manager? * * Results: *	1 if the ThreadManager is present, 0 otherwise. * * Side effects: *	If this is the first time this is called, the return is cached. * *---------------------------------------------------------------------- */intTclMacHaveThreads(void){    static initialized = false;    static int tclMacHaveThreads = false;    long response = 0;    OSErr err = noErr;        if (!initialized) {	err = Gestalt(gestaltThreadMgrAttr, &response);	if (err == noErr) {	    tclMacHaveThreads = response | (1 << gestaltThreadMgrPresent);	}    }    return tclMacHaveThreads;}/* *---------------------------------------------------------------------- * * Tcl_CreateThread -- * *	This procedure creates a new thread. * * Results: *	TCL_OK if the thread could be created.  The thread ID is *	returned in a parameter. * * Side effects: *	A new thread is created. * *---------------------------------------------------------------------- */intTcl_CreateThread(idPtr, proc, clientData, stackSize, flags)    Tcl_ThreadId *idPtr;		/* Return, the ID of the thread */    Tcl_ThreadCreateProc proc;		/* Main() function of the thread */    ClientData clientData;		/* The one argument to Main() */    int stackSize;			/* Size of stack for the new thread */    int flags;				/* Flags controlling behaviour of					 * the new thread */{    if (!TclMacHaveThreads()) {        return TCL_ERROR;    }    if (stackSize == TCL_THREAD_STACK_DEFAULT) {        stackSize = TCL_MAC_THRD_DEFAULT_STACK;    }#if TARGET_CPU_68K && TARGET_RT_MAC_CFM    {        ThreadEntryProcPtr entryProc;        entryProc = NewThreadEntryUPP(proc);                NewThread(kCooperativeThread, entryProc, (void *) clientData,             stackSize, kCreateIfNeeded, NULL, (ThreadID *) idPtr);    }#else    NewThread(kCooperativeThread, proc, (void *) clientData,         stackSize, kCreateIfNeeded, NULL, (ThreadID *) idPtr);#endif            if ((ThreadID) *idPtr == kNoThreadID) {        return TCL_ERROR;    } else {        if (flags & TCL_THREAD_JOINABLE) {	    TclRememberJoinableThread (*idPtr);	}        return TCL_OK;    }}/* *---------------------------------------------------------------------- * * Tcl_JoinThread -- * *	This procedure waits upon the exit of the specified thread. * * Results: *	TCL_OK if the wait was successful, TCL_ERROR else. * * Side effects: *	The result area is set to the exit code of the thread we *	waited upon. * *---------------------------------------------------------------------- */intTcl_JoinThread(id, result)    Tcl_ThreadId id;	/* Id of the thread to wait upon */    int*     result;	/* Reference to the storage the result			 * of the thread we wait upon will be			 * written into. */{    if (!TclMacHaveThreads()) {        return TCL_ERROR;    }    return TclJoinThread (id, result);}/* *---------------------------------------------------------------------- * * TclpThreadExit -- * *	This procedure terminates the current thread. * * Results: *	None. * * Side effects: *	This procedure terminates the current thread. * *---------------------------------------------------------------------- */voidTclpThreadExit(status)    int status;{    ThreadID curThread;        if (!TclMacHaveThreads()) {        return;    }        GetCurrentThread(&curThread);    TclSignalExitThread ((Tcl_ThreadId) curThread, status);    DisposeThread(curThread, NULL, false);}/* *---------------------------------------------------------------------- * * Tcl_GetCurrentThread -- * *	This procedure returns the ID of the currently running thread. * * Results: *	A thread ID. * * Side effects: *	None. * *---------------------------------------------------------------------- */Tcl_ThreadIdTcl_GetCurrentThread(){#ifdef TCL_THREADS    ThreadID curThread;    if (!TclMacHaveThreads()) {        return (Tcl_ThreadId) 0;    } else {        GetCurrentThread(&curThread);        return (Tcl_ThreadId) curThread;    }#else    return (Tcl_ThreadId) 0;#endif}/* *---------------------------------------------------------------------- * * TclpInitLock * *	This procedure is used to grab a lock that serializes initialization *	and finalization of Tcl.  On some platforms this may also initialize *	the mutex used to serialize creation of more mutexes and thread *	local storage keys. * * Results: *	None. * * Side effects: *	Acquire the initialization mutex. * *---------------------------------------------------------------------- */voidTclpInitLock(){#ifdef TCL_THREADS    /* There is nothing to do on the Mac. */;#endif}/* *---------------------------------------------------------------------- * * TclpInitUnlock * *	This procedure is used to release a lock that serializes initialization *	and finalization of Tcl. * * Results: *	None. * * Side effects: *	Release the initialization mutex. * *---------------------------------------------------------------------- */voidTclpInitUnlock(){#ifdef TCL_THREADS    /* There is nothing to do on the Mac */;#endif}/* *---------------------------------------------------------------------- * * TclpMasterLock * *	This procedure is used to grab a lock that serializes creation *	and finalization of serialization objects.  This interface is *	only needed in finalization; it is hidden during *	creation of the objects. * *	This lock must be different than the initLock because the *	initLock is held during creation of syncronization objects. * * Results: *	None. * * Side effects: *	Acquire the master mutex. * *---------------------------------------------------------------------- */voidTclpMasterLock(){#ifdef TCL_THREADS    /* There is nothing to do on the Mac */;#endif}/* *---------------------------------------------------------------------- * * TclpMasterUnlock * *	This procedure is used to release a lock that serializes creation *	and finalization of synchronization objects. * * Results: *	None. * * Side effects: *	Release the master mutex. * *---------------------------------------------------------------------- */voidTclpMasterUnlock(){#ifdef TCL_THREADS    /* There is nothing to do on the Mac */#endif}/* *---------------------------------------------------------------------- * * Tcl_GetAllocMutex * *	This procedure returns a pointer to a statically initialized *	mutex for use by the memory allocator.  The alloctor must *	use this lock, because all other locks are allocated... * * Results: *	A pointer to a mutex that is suitable for passing to *	Tcl_MutexLock and Tcl_MutexUnlock. * * Side effects: *	None. * *---------------------------------------------------------------------- */Tcl_Mutex *Tcl_GetAllocMutex(){    /* There is nothing to do on the Mac */    return NULL;}#ifdef TCL_THREADS/* *---------------------------------------------------------------------- * * Tcl_MutexLock -- * *	This procedure is invoked to lock a mutex.  This procedure *	handles initializing the mutex, if necessary.  The caller *	can rely on the fact that Tcl_Mutex is an opaque pointer. *	This routine will change that pointer from NULL after first use. * * Results: *	None. * * Side effects: *	May block the current thread.  The mutex is aquired when *	this returns.  Will allocate memory for a pthread_mutex_t *	and initialize this the first time this Tcl_Mutex is used. * *---------------------------------------------------------------------- */voidTcl_MutexLock(mutexPtr)    Tcl_Mutex *mutexPtr;	/* Really (pthread_mutex_t **) */{/* There is nothing to do on the Mac */}/* *---------------------------------------------------------------------- * * TclpMutexUnlock -- * *	This procedure is invoked to unlock a mutex.  The mutex must *	have been locked by Tcl_MutexLock. * * Results: *	None. * * Side effects: *	The mutex is released when this returns. * *---------------------------------------------------------------------- */voidTcl_MutexUnlock(mutexPtr)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩免费高清av| 欧美激情在线观看视频免费| 91精品免费在线| 欧美mv日韩mv国产| 国产精品国产三级国产aⅴ原创 | 欧美午夜一区二区| 欧美一区二区视频在线观看| 中文字幕久久午夜不卡| 亚洲线精品一区二区三区八戒| 免费观看成人鲁鲁鲁鲁鲁视频| 国产不卡视频一区二区三区| 欧美午夜精品久久久久久超碰| 日韩一区二区三区电影在线观看 | 久久99精品国产| 91在线你懂得| 欧美xxxx老人做受| 国产精品资源在线看| 懂色av一区二区三区免费观看| 欧美日韩国产不卡| 国产精品高潮呻吟久久| 免费人成网站在线观看欧美高清| 99riav久久精品riav| 精品国产乱码久久久久久久| 亚洲一区二区精品久久av| 国产成人在线免费观看| 91精品国产高清一区二区三区蜜臀| 国产精品国产三级国产普通话蜜臀| 久久激五月天综合精品| 欧美日韩亚洲另类| 亚洲乱码国产乱码精品精98午夜| 免费国产亚洲视频| 久久色视频免费观看| 国产91对白在线观看九色| 日韩精品高清不卡| 久久老女人爱爱| 欧美性三三影院| 成人动漫视频在线| 久久国产尿小便嘘嘘尿| 亚洲色图欧洲色图婷婷| 精品国产99国产精品| 一本一道综合狠狠老| 麻豆久久一区二区| 亚洲丶国产丶欧美一区二区三区| 欧美mv日韩mv亚洲| 久久久99精品免费观看不卡| 欧美在线一二三四区| 国产99精品视频| 亚洲欧美一区二区不卡| 久久99久久精品| 日韩亚洲欧美在线观看| 韩日精品视频一区| 亚洲综合丝袜美腿| 国产精品一区二区三区四区 | 在线不卡欧美精品一区二区三区| 久久亚洲综合色一区二区三区| 五月天久久比比资源色| 欧美午夜在线一二页| 亚洲美女免费在线| 99热在这里有精品免费| 欧美—级在线免费片| 国产精品91一区二区| wwwwww.欧美系列| 国产伦精品一区二区三区在线观看| 日韩欧美高清一区| 精品在线免费观看| 久久蜜桃一区二区| 国产成人av资源| 亚洲三级久久久| 欧美日韩一卡二卡| 美女一区二区久久| 精品成a人在线观看| 国产精品69毛片高清亚洲| 精品欧美一区二区在线观看| 麻豆精品一二三| 国产婷婷色一区二区三区在线| 成人精品国产一区二区4080| ●精品国产综合乱码久久久久| 99精品在线免费| 亚洲成人av资源| 欧美大肚乱孕交hd孕妇| 国产精品99久久久| 亚洲美女在线国产| 91精品欧美综合在线观看最新| 捆绑紧缚一区二区三区视频| 久久综合九色欧美综合狠狠 | 本田岬高潮一区二区三区| 亚洲色图都市小说| 欧美三级一区二区| 精品一区二区免费视频| 中文字幕色av一区二区三区| 欧洲色大大久久| 精品无码三级在线观看视频 | 一区二区三区中文在线| 欧美日韩mp4| 国产精品夜夜爽| 亚洲一二三四区不卡| 精品成a人在线观看| 91免费视频观看| 久色婷婷小香蕉久久| 亚洲品质自拍视频| 日韩美女视频在线| 91在线视频18| 国产精品一线二线三线精华| 亚洲愉拍自拍另类高清精品| 精品久久久久一区二区国产| 在线视频国产一区| 国产一区二区久久| 偷窥少妇高潮呻吟av久久免费| 久久超碰97人人做人人爱| 欧美经典一区二区| 欧美精品123区| 91麻豆swag| 国产精品18久久久| 日产国产欧美视频一区精品| 日韩伦理av电影| 国产欧美一区二区精品性| 欧美日韩免费高清一区色橹橹| 国产成人精品影院| 精品一区二区三区免费播放| 亚洲一区二区三区视频在线播放| 欧美国产综合色视频| 日韩免费一区二区三区在线播放| 在线观看日韩精品| 99视频在线精品| 国产亚洲精品bt天堂精选| 国内成人免费视频| 欧美精品一区视频| 国产成人在线视频网站| 综合网在线视频| 精品国产一区a| 在线观看精品一区| 久久av老司机精品网站导航| 久久久精品免费观看| 成人黄色av网站在线| 亚洲国产成人av网| 国产精品激情偷乱一区二区∴| 一本大道久久a久久精二百| 免费成人你懂的| 亚洲一区二区视频在线| 欧美草草影院在线视频| av在线不卡免费看| 老司机午夜精品| 欧美在线一区二区| 亚洲成a人片在线观看中文| 这里只有精品电影| 亚洲靠逼com| 日韩一级视频免费观看在线| 国产98色在线|日韩| 在线看日本不卡| 日韩精品高清不卡| 91精品国产综合久久小美女| 日本三级韩国三级欧美三级| 亚洲国产成人av网| 亚洲午夜久久久久久久久电影网 | 欧美成va人片在线观看| 日韩欧美在线一区二区三区| 欧美一区二区三区婷婷月色 | 久久精品国产99久久6| 在线精品视频免费观看| aaa国产一区| 91老师国产黑色丝袜在线| 91色九色蝌蚪| 久久新电视剧免费观看| www久久精品| 亚洲免费看黄网站| 欧美性猛交xxxx乱大交退制版 | 国产喂奶挤奶一区二区三区| 久久久综合精品| 成人欧美一区二区三区视频网页| 一区二区三区四区乱视频| 丝袜美腿亚洲综合| 精品无人区卡一卡二卡三乱码免费卡| 国产一区二区三区四区五区入口| 粉嫩嫩av羞羞动漫久久久| 国产剧情在线观看一区二区| eeuss影院一区二区三区| 欧美性大战久久| 精品黑人一区二区三区久久| 国产丝袜欧美中文另类| 夜夜嗨av一区二区三区中文字幕 | 免费不卡在线视频| 国产精品正在播放| 色婷婷一区二区| 日韩午夜在线观看| 国产精品久久久久久久久久免费看| 亚洲综合自拍偷拍| 国产在线视频精品一区| 91久久一区二区| 久久久久久久综合狠狠综合| 一区二区三区欧美在线观看| 九色综合狠狠综合久久| 99免费精品视频| 日韩一区二区免费在线观看| 亚洲欧美在线另类| 蜜桃久久av一区| 欧美日韩综合不卡| 中文在线免费一区三区高中清不卡| 亚洲第一精品在线| 丁香六月久久综合狠狠色| 91精品国产91久久综合桃花 |