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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? thread.c

?? C標(biāo)準(zhǔn)庫源代碼,能提高對(duì)C的理解,不錯(cuò)的哦
?? C
字號(hào):
/***
*thread.c - Begin and end a thread
*
*       Copyright (c) 1989-1997, Microsoft Corporation. All rights reserved.
*
*Purpose:
*       This source contains the _beginthread() and _endthread()
*       routines which are used to start and terminate a thread.
*
*******************************************************************************/

#ifdef _MT

#include <cruntime.h>
#include <oscalls.h>
#include <internal.h>
#include <mtdll.h>
#include <msdos.h>
#include <malloc.h>
#include <process.h>
#include <rterr.h>
#include <dbgint.h>

/*
 * Startup code for new thread.
 */
static unsigned long WINAPI _threadstart(void *);

/*
 * declare pointers to per-thread FP initialization and termination routines
 */
_PVFV _FPmtinit;
_PVFV _FPmtterm;


/***
*_beginthread() - Create a child thread
*
*Purpose:
*       Create a child thread.
*
*Entry:
*       initialcode = pointer to thread's startup code address
*       stacksize = size of stack
*       argument = argument to be passed to new thread
*
*Exit:
*       success = handle for new thread if successful
*
*       failure = (unsigned long) -1L in case of error, errno and _doserrno
*                 are set
*
*Exceptions:
*
*******************************************************************************/

unsigned long __cdecl _beginthread (
        void (__cdecl * initialcode) (void *),
        unsigned stacksize,
        void * argument
        )
{
        _ptiddata ptd;                  /* pointer to per-thread data */
        unsigned long thdl;             /* thread handle */
        unsigned long errcode = 0L;     /* Return from GetLastError() */

        /*
         * Allocate and initialize a per-thread data structure for the to-
         * be-created thread.
         */
        if ( (ptd = _calloc_crt(1, sizeof(struct _tiddata))) == NULL )
                goto error_return;

        /*
         * Initialize the per-thread data
         */

        _initptd(ptd);

        ptd->_initaddr = (void *) initialcode;
        ptd->_initarg = argument;

        /*
         * Create the new thread. Bring it up in a suspended state so that
         * the _thandle and _tid fields are filled in before execution
         * starts.
         */
        if ( (ptd->_thandle = thdl = (unsigned long)
              CreateThread( NULL,
                            stacksize,
                            _threadstart,
                            (LPVOID)ptd,
                            CREATE_SUSPENDED,
                            (LPDWORD)&(ptd->_tid) ))
             == 0L )
        {
                errcode = GetLastError();
                goto error_return;
        }

        /*
         * Start the new thread executing
         */
        if ( ResumeThread( (HANDLE)thdl ) == (DWORD)(-1L) ) {
                errcode = GetLastError();
                goto error_return;
        }

        /*
         * Good return
         */
        return(thdl);

        /*
         * Error return
         */
error_return:
        /*
         * Either ptd is NULL, or it points to the no-longer-necessary block
         * calloc-ed for the _tiddata struct which should now be freed up.
         */
        _free_crt(ptd);

        /*
         * Map the error, if necessary.
         */
        if ( errcode != 0L )
                _dosmaperr(errcode);

        return((unsigned long)-1L);
}


/***
*_threadstart() - New thread begins here
*
*Purpose:
*       The new thread begins execution here.  This routine, in turn,
*       passes control to the user's code.
*
*Entry:
*       void *ptd       = pointer to _tiddata structure for this thread
*
*Exit:
*       Never returns - terminates thread!
*
*Exceptions:
*
*******************************************************************************/

static unsigned long WINAPI _threadstart (
        void * ptd
        )
{
        /*
         * Stash the pointer to the per-thread data stucture in TLS
         */
        if ( !TlsSetValue(__tlsindex, ptd) )
                _amsg_exit(_RT_THREAD);

        /*
         * Call fp initialization, if necessary
         */
        if ( _FPmtinit != NULL )
                (*_FPmtinit)();

        /*
         * Guard call to user code with a _try - _except statement to
         * implement runtime errors and signal support
         */
        __try {
                ( (void(__cdecl *)(void *))(((_ptiddata)ptd)->_initaddr) )
                    ( ((_ptiddata)ptd)->_initarg );

                _endthread();
        }
        __except ( _XcptFilter(GetExceptionCode(), GetExceptionInformation()) )
        {
                /*
                 * Should never reach here
                 */
                _exit( GetExceptionCode() );

        } /* end of _try - _except */

        /*
         * Never executed!
         */
        return(0L);
}


/***
*_endthread() - Terminate the calling thread
*
*Purpose:
*
*Entry:
*       void
*
*Exit:
*       Never returns!
*
*Exceptions:
*
*******************************************************************************/

void __cdecl _endthread (
        void
        )
{
        _ptiddata ptd;           /* pointer to thread's _tiddata struct */

        /*
         * Call fp termination, if necessary
         */
        if ( _FPmtterm != NULL )
                (*_FPmtterm)();

        if ( (ptd = _getptd()) == NULL )
                _amsg_exit(_RT_THREAD);

        /*
         * Close the thread handle (if there was one)
         */
        if ( ptd->_thandle != (unsigned long)(-1L) )
                (void) CloseHandle( (HANDLE)(ptd->_thandle) );

        /*
         * Free up the _tiddata structure & its subordinate buffers
         *      _freeptd() will also clear the value for this thread
         *      of the TLS variable __tlsindex.
         */
        _freeptd(ptd);

        /*
         * Terminate the thread
         */
        ExitThread(0);

}

#endif  /* _MT */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国内欧美视频一区二区| 欧美日本乱大交xxxxx| 精品三级在线看| 亚洲丶国产丶欧美一区二区三区| 91在线你懂得| 亚洲丝袜另类动漫二区| 不卡视频一二三四| 亚洲视频一二三区| 97久久人人超碰| 亚洲卡通欧美制服中文| 成人激情校园春色| 亚洲欧美怡红院| 91亚洲永久精品| 亚洲欧美另类在线| 欧美日韩精品一区二区在线播放| 亚洲国产成人精品视频| 欧美日韩aaa| 久草这里只有精品视频| 久久综合999| jizzjizzjizz欧美| 亚洲综合视频网| 欧美精品三级在线观看| 青青草91视频| 国产区在线观看成人精品| 国产伦精品一区二区三区免费 | 精品一区二区三区在线播放视频| 日韩欧美第一区| 国产一区二区三区在线观看免费视频 | 99久久精品国产精品久久| 国产亚洲短视频| av动漫一区二区| 亚洲国产cao| 日韩午夜小视频| 成人免费视频一区二区| 亚洲天堂免费在线观看视频| 欧美久久久一区| 精品一区二区久久久| 国产欧美日韩亚州综合 | 欧美日韩精品欧美日韩精品一 | 夫妻av一区二区| 亚洲美女精品一区| 欧美精品一级二级| 美腿丝袜亚洲一区| 国产精品色哟哟网站| 欧美色综合天天久久综合精品| 日韩精品亚洲一区二区三区免费| 26uuu精品一区二区| 色婷婷久久一区二区三区麻豆| 免费成人av资源网| 亚洲欧洲成人精品av97| 日韩欧美国产1| 成人丝袜高跟foot| 五月天视频一区| 日本一区二区免费在线观看视频 | 99精品热视频| 日本不卡在线视频| 亚洲精品水蜜桃| 久久精品一区二区三区不卡| 成人午夜电影网站| 精品在线一区二区| 亚洲成人自拍一区| 国产精品久久影院| 精品久久久久久久久久久院品网| 成人v精品蜜桃久久一区| 久久99精品国产麻豆婷婷| 一区二区三区视频在线看| 欧美经典一区二区| 日韩欧美第一区| 在线播放欧美女士性生活| 91在线观看美女| 粉嫩av一区二区三区| 精品一区中文字幕| 婷婷激情综合网| 亚洲国产裸拍裸体视频在线观看乱了| 2020国产精品| 日韩欧美123| 制服.丝袜.亚洲.中文.综合| 91精品福利视频| 成人av电影在线| 国产精品12区| 久久成人18免费观看| 午夜激情一区二区| 亚洲aⅴ怡春院| 国产精品福利影院| 欧美国产亚洲另类动漫| 久久久久久综合| 久久久亚洲午夜电影| 日韩欧美国产成人一区二区| 欧美一卡2卡3卡4卡| 欧美在线free| 在线观看国产一区二区| 日本韩国一区二区三区视频| 粉嫩在线一区二区三区视频| 韩日精品视频一区| 国产一区欧美二区| 国产精品18久久久久久久久久久久 | 久久久久久久久久久电影| 久久精品亚洲精品国产欧美| 久久亚洲二区三区| 国产精品久久久久桃色tv| 一区二区三区91| 天天色天天操综合| 美日韩一区二区三区| 高清成人在线观看| 91精品办公室少妇高潮对白| 91精品国产综合久久久久久久久久 | hitomi一区二区三区精品| 欧美自拍偷拍一区| 亚洲精品一区二区精华| 综合亚洲深深色噜噜狠狠网站| 亚洲国产精品人人做人人爽| 国产专区综合网| 99久久伊人久久99| 欧美欧美欧美欧美首页| 国产午夜精品久久| 亚洲午夜免费福利视频| 国产精品一区2区| 欧美日韩成人高清| 国产精品无遮挡| 日韩高清在线观看| 99这里只有精品| 日韩一区二区三区视频| 亚洲欧美日韩国产一区二区三区| 美女性感视频久久| 97精品视频在线观看自产线路二| 日韩一二在线观看| 亚洲三级理论片| 国产一区在线观看视频| 欧美日韩中文另类| 国产精品免费观看视频| 久久精品999| 欧美亚洲国产一区二区三区va| 久久久精品天堂| 日韩高清国产一区在线| 91蜜桃在线免费视频| 久久亚洲一区二区三区明星换脸 | 亚洲乱码日产精品bd | 国产凹凸在线观看一区二区| 欧美老女人第四色| 亚洲男人的天堂在线aⅴ视频| 国产精品白丝av| 精品入口麻豆88视频| 五月天一区二区| 色婷婷综合视频在线观看| 国产欧美久久久精品影院| 国模娜娜一区二区三区| 777a∨成人精品桃花网| 亚洲一区二区三区四区五区中文| 国产成人午夜精品5599| www日韩大片| 麻豆一区二区三| 欧美电影一区二区| 亚洲狠狠爱一区二区三区| 91在线免费播放| 中文字幕在线一区免费| 成熟亚洲日本毛茸茸凸凹| 精品国产91久久久久久久妲己| 日本欧美大码aⅴ在线播放| 欧美日韩国产另类一区| 亚洲国产成人精品视频| 欧美揉bbbbb揉bbbbb| 一区二区理论电影在线观看| 91亚洲国产成人精品一区二区三 | 国产乱码精品1区2区3区| 亚洲免费在线播放| 色综合天天性综合| 亚洲色大成网站www久久九九| 91在线你懂得| 亚洲综合在线第一页| 在线看国产一区| 天天色图综合网| 欧美成人三级电影在线| 精品一区二区久久| 久久精品一区四区| 成人av免费网站| 亚洲品质自拍视频网站| 色av成人天堂桃色av| 一区二区免费在线| 欧美一区二区三区日韩视频| 蜜桃av一区二区| 精品国精品国产尤物美女| 国产精品一级在线| 亚洲欧美影音先锋| 欧美人狂配大交3d怪物一区| 三级一区在线视频先锋| 精品粉嫩aⅴ一区二区三区四区 | 日韩va欧美va亚洲va久久| 欧美电影免费观看高清完整版 | 成av人片一区二区| 一区二区欧美国产| 欧美一级片在线| 国产精品一品视频| 尤物av一区二区| 欧美一区二区三区公司| 国产成人午夜视频| 亚洲一区二区在线视频| 精品三级在线观看| 色一情一伦一子一伦一区| 视频一区视频二区在线观看| 日韩一区二区精品在线观看|