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

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

?? tx_efs.c

?? ThreadX優秀的硬實時操作系統.This Express Start Guide is designed to help you install and use ThreadX for the
?? C
?? 第 1 頁 / 共 2 頁
字號:
/**************************************************************************/ 
/*                                                                        */ 
/*            Copyright (c) 1996-2000 by Express Logic Inc.               */ 
/*                                                                        */ 
/*  This software is copyrighted by and is the sole property of Express   */ 
/*  Logic, Inc.  All rights, title, ownership, or other interests         */ 
/*  in the software remain the property of Express Logic, Inc.  This      */ 
/*  software may only be used in accordance with the corresponding        */ 
/*  license agreement.  Any unauthorized use, duplication, transmission,  */ 
/*  distribution, or disclosure of this software is expressly forbidden.  */ 
/*                                                                        */
/*  This Copyright notice may not be removed or modified without prior    */ 
/*  written consent of Express Logic, Inc.                                */ 
/*                                                                        */ 
/*  Express Logic, Inc. reserves the right to modify this software        */ 
/*  without notice.                                                       */ 
/*                                                                        */ 
/*  Express Logic, Inc.                                                   */
/*  11440 West Bernardo Court               info@expresslogic.com         */
/*  Suite 366                               http://www.expresslogic.com   */
/*  San Diego, CA  92127                                                  */
/*                                                                        */
/**************************************************************************/


/**************************************************************************/
/**************************************************************************/
/**                                                                       */ 
/** ThreadX Component                                                     */ 
/**                                                                       */
/**   Event Flags (EVE)                                                   */
/**                                                                       */
/**************************************************************************/
/**************************************************************************/

#define TX_SOURCE_CODE


/* Include necessary system files.  */

#include    "tx_api.h"
#include    "tx_thr.h"
#include    "tx_tim.h"
#include    "tx_eve.h"


/**************************************************************************/ 
/*                                                                        */ 
/*  FUNCTION                                               RELEASE        */ 
/*                                                                        */ 
/*    _tx_event_flags_set                                 PORTABLE C      */ 
/*                                                           3.0f         */ 
/*  AUTHOR                                                                */ 
/*                                                                        */ 
/*    William E. Lamie, Express Logic, Inc.                               */ 
/*                                                                        */ 
/*  DESCRIPTION                                                           */ 
/*                                                                        */ 
/*    This function sets the specified flags in the event group based on  */ 
/*    the set option specified.  All threads suspended on the group whose */ 
/*    get request can now be satisfied are resumed.                       */ 
/*                                                                        */ 
/*  INPUT                                                                 */ 
/*                                                                        */ 
/*    group_ptr                         Pointer to group control block    */ 
/*    flags_to_set                      Event flags to set                */ 
/*    set_option                        Specified either AND or OR        */ 
/*                                        operation on the event flags    */ 
/*                                                                        */ 
/*  OUTPUT                                                                */ 
/*                                                                        */ 
/*    TX_SUCCESS                        Always returns success            */ 
/*                                                                        */ 
/*  CALLS                                                                 */ 
/*                                                                        */ 
/*    _tx_timer_deactivate              Deactivate timer routine          */ 
/*    _tx_thread_resume                 Resume thread service             */ 
/*    _tx_thread_system_return          Return to system routine          */ 
/*                                                                        */ 
/*  CALLED BY                                                             */ 
/*                                                                        */ 
/*    Application Code                                                    */ 
/*                                                                        */ 
/*  RELEASE HISTORY                                                       */ 
/*                                                                        */ 
/*    DATE              NAME                      DESCRIPTION             */ 
/*                                                                        */ 
/*  12-31-1996     William E. Lamie         Initial Version 3.0           */ 
/*  07-04-1997     William E. Lamie         Corrected a problem setting   */ 
/*                                            event flags from ISRs with  */ 
/*                                            thread preemption, resulting*/ 
/*                                            in version 3.0a             */ 
/*  11-11-1997     William E. Lamie         Modified comment(s),          */ 
/*                                            resulting in version 3.0b.  */ 
/*  03-01-1998     William E. Lamie         Corrected problem building    */ 
/*                                            the satisfied thread list   */ 
/*                                            when two or more threads    */ 
/*                                            are satisfied, resulting in */ 
/*  01-01-1999     William E. Lamie         Corrected problem setting     */ 
/*                                            events from ISRs while the  */ 
/*                                            same event flag group is    */ 
/*                                            being set from a thread,    */ 
/*                                            resulting in version 3.0e.  */ 
/*  11-01-1999     William E. Lamie         Modified comment(s),          */ 
/*                                            added logic to track events,*/ 
/*                                            added logic the optimizes   */ 
/*                                            processing when a single    */ 
/*                                            thread is suspended on the  */ 
/*                                            event flag group, resulting */ 
/*                                            in version 3.0f.            */ 
/*                                                                        */ 
/**************************************************************************/ 
UINT    _tx_event_flags_set(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG flags_to_set, 
                    UINT set_option)
{

TX_INTERRUPT_SAVE_AREA

REG_1   UINT        status;                 /* Return status                 */
REG_2   TX_THREAD   *thread_ptr;            /* Working thread pointer        */
REG_3   TX_THREAD   *next_thread_ptr;       /* Next thread in satisfied list */
REG_4   TX_THREAD   *satisfied_list;        /* Event satisfied list pointer  */
REG_5   TX_THREAD   *last_satisfied;        /* Last satisfied pointer        */
TX_THREAD           *suspended_list;        /* Temporary copy of suspend list*/
ULONG               suspended_count;        /* Number of suspended threads   */ 
ULONG               current_event_flags;    /* Current event flags           */
UINT                get_option;             /* Suspended thread's get option */


    /* Disable interrupts to remove the semaphore from the created list.  */
    TX_DISABLE

    /* Log this kernel call.  */
    TX_EL_EVENT_FLAGS_SET_INSERT

    /* Determine how to set this group's event flags.  */
    if (set_option & TX_EVENT_FLAGS_AND_MASK)
    {

        /* "AND" the flags into the current events of the group.  */
        group_ptr -> tx_event_flags_current =
            group_ptr -> tx_event_flags_current & flags_to_set;
    
        /* There is no need to check for any suspended threads since no
           new bits are set.  */
        TX_RESTORE
        return(TX_SUCCESS);
    }
    else
    {

        /* "OR" the flags into the current events of the group.  */
        group_ptr -> tx_event_flags_current =
            group_ptr -> tx_event_flags_current | flags_to_set;
    }

    /* Determine if there are any threads suspended on the event flag group.  */
    if (group_ptr -> tx_event_flags_suspension_list)
    {

        /* Determine if there is just a single thread waiting on the event 
           flag group.  */
        if (group_ptr -> tx_event_flags_suspended_count == 1)
        {

            /* Single thread waiting for event flags.  Bypass the multiple thread
               logic.  */

            /* Setup thread pointer.  */
            thread_ptr =  group_ptr -> tx_event_flags_suspension_list;

            /* Determine if this thread's get event flag request has been met.  */
            if (thread_ptr -> tx_suspend_option & TX_EVENT_FLAGS_AND_MASK)
            {

                /* All flags must be present to satisfy request.  */
                if ((group_ptr -> tx_event_flags_current & thread_ptr -> tx_suspend_info) == 
                                                                thread_ptr -> tx_suspend_info)
    
                    /* Yes, all the events are present.  */
                    status =  TX_SUCCESS;
                else

                    /* No, not all the events are present.  */
                    status =  TX_NO_EVENTS;
            }
            else
            {

                /* Any of the events will satisfy the request.  */
                if (group_ptr -> tx_event_flags_current & thread_ptr -> tx_suspend_info)

                    /* Yes, one or more of the requested events are set.  */
                    status =  TX_SUCCESS;
                else
    
                    /* No, none of the events are currently set.  */
                    status =  TX_NO_EVENTS;
            }

            /* Was the suspended thread's event request satisfied?  */
            if (status == TX_SUCCESS)
            {

                /* Yes, resume the thread and apply any event flag
                   clearing.  */

                /* Return the actual event flags that satisfied the request.  */
                *((ULONG *) thread_ptr -> tx_additional_suspend_info) =  
                                                    group_ptr -> tx_event_flags_current;

                /* Determine whether or not clearing needs to take place.  */
                if (thread_ptr -> tx_suspend_option & TX_EVENT_FLAGS_CLEAR_MASK)
                {

                    /* Yes, clear the flags that satisfied this request.  */
                    group_ptr -> tx_event_flags_current =
                        group_ptr -> tx_event_flags_current & ~(thread_ptr -> tx_suspend_info);
                }

                /* Clear the suspension information in the event flag group.  */
                group_ptr -> tx_event_flags_suspension_list =  TX_NULL;
                group_ptr -> tx_event_flags_suspended_count =  0;

                /* Clear cleanup routine to avoid timeout.  */
                thread_ptr -> tx_suspend_cleanup =  TX_NULL;

                /* Temporarily disable preemption.  */
                _tx_thread_preempt_disable++;

                /* Restore interrupts.  */
                TX_RESTORE

                /* Deactivate the timeout timer if necessary.  */
                if (thread_ptr -> tx_thread_timer.tx_list_head)
                {

                    /* Deactivate the thread's timeout timer.  */
                    _tx_timer_deactivate(&(thread_ptr -> tx_thread_timer));
                }
                else
                {

                    /* Clear the remaining time to ensure timer doesn't get activated.  */
                    thread_ptr -> tx_thread_timer.tx_remaining_ticks =  0;
                }

                /* Put return status into the thread control block.  */
                thread_ptr -> tx_suspend_status =  TX_SUCCESS;        

                /* Resume thread.  */
                if (_tx_thread_resume(thread_ptr))

                    /* Preemption is required, transfer control back to 
                       system.  */
                    _tx_thread_system_return();

                /* Return successful status.  */
                return(TX_SUCCESS);    
            }
            else
            {

                /* Flags of single suspended thread were not satisfied.  */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线观看亚洲一区| 国产精品成人在线观看| 欧美韩日一区二区三区四区| 亚洲午夜一区二区三区| 国产精品夜夜嗨| 91精品国产手机| 亚洲女女做受ⅹxx高潮| 黄一区二区三区| 欧美日韩亚洲综合一区二区三区| 久久久精品人体av艺术| 日韩国产在线一| 91污在线观看| 国产精品无圣光一区二区| 免费在线观看一区二区三区| 色综合久久综合网97色综合| 国产欧美一二三区| 经典三级视频一区| 在线综合+亚洲+欧美中文字幕| 亚洲乱码中文字幕| 91小视频免费观看| 国产精品视频你懂的| 国产一区二区三区久久久| 日韩一区二区三| 秋霞影院一区二区| 欧美另类变人与禽xxxxx| 亚洲综合成人在线视频| 91激情五月电影| 一区二区三区自拍| 日本高清不卡aⅴ免费网站| 国产精品美女视频| 91看片淫黄大片一级在线观看| 国产精品天天摸av网| 成人毛片在线观看| 亚洲狼人国产精品| 欧美亚洲一区二区在线| 亚洲精品成a人| 欧美人体做爰大胆视频| 五月天激情小说综合| 欧美日韩免费一区二区三区视频| 亚洲韩国一区二区三区| 欧美精品v国产精品v日韩精品| 婷婷一区二区三区| 日韩午夜电影在线观看| 国产一区二区三区综合 | 国产乱码精品一品二品| 日韩女优av电影| 高清久久久久久| 自拍偷拍欧美精品| 欧美色区777第一页| 日韩福利电影在线| 久久久国产一区二区三区四区小说| 国产成人精品aa毛片| 1024成人网| 欧美美女一区二区| av在线这里只有精品| 亚洲伦在线观看| 日韩网站在线看片你懂的| 国产馆精品极品| 亚洲亚洲人成综合网络| 日韩精品中文字幕在线一区| 成人av网站大全| 午夜精品视频在线观看| 精品对白一区国产伦| 国产成人一区在线| 亚洲午夜免费视频| 国产亚洲欧美日韩俺去了| 色诱视频网站一区| 日韩国产欧美在线视频| 国产精品色呦呦| 日韩手机在线导航| 一本色道久久综合亚洲aⅴ蜜桃 | 日韩一区二区电影在线| 国产999精品久久| 日韩国产一区二| 国产精品成人一区二区艾草| 欧美一级日韩免费不卡| 国产精品影视天天线| 亚洲福利视频一区二区| 国产欧美一区二区三区在线看蜜臀 | 91精品国产91久久久久久一区二区 | 一本到不卡精品视频在线观看| 亚洲精品国产成人久久av盗摄| 欧美mv日韩mv国产网站| 不卡的电视剧免费网站有什么| 亚洲国产aⅴ天堂久久| 国产色产综合色产在线视频| 91麻豆精品国产自产在线| 91免费观看视频在线| 国产一区二区三区电影在线观看| 亚洲成人av一区二区三区| 成人激情小说网站| 一区二区欧美精品| 99r国产精品| 国产精品国产自产拍高清av| 国产成人午夜精品影院观看视频 | 精品少妇一区二区三区视频免付费 | 亚洲大片精品永久免费| 精品黑人一区二区三区久久| 色综合久久中文字幕综合网| 国产福利一区二区三区视频 | 亚洲一区二区三区国产| 国产精品成人免费| 久久亚洲精品小早川怜子| 欧美日韩的一区二区| 色狠狠av一区二区三区| 大美女一区二区三区| 国产一区二区视频在线播放| 捆绑变态av一区二区三区| 视频一区免费在线观看| 亚洲观看高清完整版在线观看| 亚洲欧美日韩综合aⅴ视频| 国产亚洲成aⅴ人片在线观看| 91精品国产乱| 欧美精品 日韩| 8x8x8国产精品| 日韩三级高清在线| 日韩一区二区免费电影| 精品国一区二区三区| 精品成人a区在线观看| www日韩大片| 欧美激情在线观看视频免费| 中文字幕乱码亚洲精品一区| 中文字幕高清一区| ...av二区三区久久精品| 亚洲欧美日韩一区二区三区在线观看| 亚洲欧洲日韩在线| 伊人性伊人情综合网| 亚洲成人www| 精品在线观看免费| 国产成人夜色高潮福利影视| 成人av免费在线观看| 日本精品视频一区二区三区| 精品视频123区在线观看| 欧美二区三区的天堂| 精品国产一区二区三区久久影院| 国产网站一区二区三区| 国产精品女同一区二区三区| 亚洲精品免费在线观看| 日韩黄色小视频| 成人免费毛片片v| 欧美日韩一区二区电影| 精品久久久网站| 自拍偷拍欧美激情| 麻豆精品国产传媒mv男同| 国产电影一区二区三区| 色婷婷久久久亚洲一区二区三区| 337p亚洲精品色噜噜| 久久久久久久久久久久久久久99 | 怡红院av一区二区三区| 六月丁香综合在线视频| 欧美日韩国产精品自在自线| 欧美成人综合网站| 亚洲美女区一区| 极品少妇xxxx偷拍精品少妇| 97se亚洲国产综合自在线不卡| 9191国产精品| 最新日韩在线视频| 激情欧美一区二区三区在线观看| 色婷婷综合久久久久中文一区二区 | 69堂精品视频| 精品成人一区二区| 亚洲国产另类av| 成人免费毛片片v| 日韩午夜三级在线| 亚洲激情在线激情| 成人h精品动漫一区二区三区| 91精品午夜视频| 亚洲人成小说网站色在线| 日本网站在线观看一区二区三区| 一本到高清视频免费精品| 国产三级欧美三级日产三级99| 婷婷久久综合九色综合绿巨人 | 中文字幕在线播放不卡一区| 日av在线不卡| 欧美色视频在线| 日韩美女久久久| 福利一区福利二区| 26uuuu精品一区二区| 免费在线观看成人| 欧美日韩国产一级片| 亚洲人123区| 99国产精品国产精品久久| 久久久www免费人成精品| 另类小说一区二区三区| 欧美一级片在线| 日日摸夜夜添夜夜添精品视频| 色呦呦网站一区| 亚洲精品乱码久久久久久日本蜜臀| 成人黄色在线看| 中文字幕一区二区三区四区| 国产99久久久国产精品免费看 | 日韩欧美国产午夜精品| 婷婷综合另类小说色区| 欧美四级电影在线观看| 亚洲制服欧美中文字幕中文字幕| 99riav久久精品riav| 亚洲色欲色欲www| 色呦呦网站一区| 亚洲成av人片| 日韩三级高清在线|