亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
欧美一区二区视频在线观看2022| 久久精品在线免费观看| 精品理论电影在线| 亚洲免费毛片网站| 国产乱码字幕精品高清av | 亚洲视频 欧洲视频| 日韩不卡一二三区| 91蝌蚪porny成人天涯| 国产亚洲污的网站| 免费成人av资源网| 777色狠狠一区二区三区| 亚洲欧美中日韩| 国产成人av影院| 日韩片之四级片| 天天av天天翘天天综合网色鬼国产| 成人精品一区二区三区中文字幕| 精品日韩一区二区| 日韩电影在线一区二区三区| 在线看不卡av| 亚洲激情男女视频| 91麻豆精东视频| 最新不卡av在线| 91丝袜美腿高跟国产极品老师| 国产欧美日韩不卡| 高清久久久久久| 久久欧美中文字幕| 国产一区欧美一区| 欧美精品一区二区三区很污很色的 | 国产日产亚洲精品系列| 六月婷婷色综合| 日韩欧美国产一区在线观看| 日本在线观看不卡视频| 欧美日韩一卡二卡三卡| 亚洲一区二区三区四区五区中文 | 麻豆极品一区二区三区| 欧美一区二区三区在线看| 日韩精品一二三区| 777奇米四色成人影色区| 日本一区中文字幕 | 日韩精品国产欧美| 欧美一级专区免费大片| 麻豆一区二区在线| 久久综合狠狠综合久久综合88| 精品一区二区三区免费| 久久亚洲私人国产精品va媚药| 国产精品正在播放| 亚洲欧洲99久久| 日本黄色一区二区| 丝袜美腿成人在线| 日韩天堂在线观看| 国产精品一区免费在线观看| 中文字幕av一区 二区| 色婷婷久久久久swag精品 | 中国色在线观看另类| 91碰在线视频| 日韩精品一区第一页| 亚洲精品在线观看网站| 成人99免费视频| 亚洲国产精品久久久男人的天堂| 91精品国产乱码| 国产成人在线色| 一区二区在线观看av| 欧美一区二区三区四区五区 | 天天影视涩香欲综合网 | 精品亚洲成a人| 中文字幕亚洲在| 在线91免费看| 成人精品视频一区| 一区二区不卡在线播放| 国产a级毛片一区| 日本一区二区视频在线| 色综合一区二区| 蜜桃久久精品一区二区| 中文字幕乱码日本亚洲一区二区 | 99精品久久久久久| 天堂资源在线中文精品| 国产视频一区二区三区在线观看| 色先锋aa成人| 国产酒店精品激情| 日韩精品色哟哟| 国产精品视频线看| 日韩欧美国产综合| 在线观看国产91| 国产精品456| 91精品国产综合久久精品| 精品精品国产高清一毛片一天堂| 成人黄色av网站在线| 午夜av一区二区三区| 国产精品妹子av| 精品久久人人做人人爱| 欧美三级电影精品| 成人短视频下载 | 日韩美女啊v在线免费观看| 日韩午夜在线影院| 欧美性猛片aaaaaaa做受| 成人丝袜视频网| 国产原创一区二区三区| 日本不卡1234视频| 亚洲成人福利片| 亚洲精品日韩综合观看成人91| 国产视频一区不卡| 精品国产sm最大网站| 日韩一级片网站| 欧美一区日本一区韩国一区| 欧美三区在线观看| 激情文学综合丁香| 精品在线免费观看| 蜜臀a∨国产成人精品| 天天做天天摸天天爽国产一区| 一区二区成人在线观看| 亚洲同性同志一二三专区| 国产精品毛片大码女人| 国产精品传媒在线| 国产精品国产三级国产普通话蜜臀 | 色诱视频网站一区| 一本久久综合亚洲鲁鲁五月天 | 中文字幕精品三区| 国产女人aaa级久久久级| 国产午夜精品一区二区三区嫩草| 精品国产乱码久久久久久夜甘婷婷 | 色一情一乱一乱一91av| 91亚洲国产成人精品一区二三| 成人免费高清视频| 91小视频免费看| 91官网在线免费观看| 欧美日韩在线三区| 欧美一级黄色片| 久久综合国产精品| 国产精品久久久久久久第一福利| 亚洲婷婷综合色高清在线| 一区二区在线观看免费视频播放| 一区二区三区不卡在线观看| 亚洲妇熟xx妇色黄| 麻豆视频观看网址久久| 国产在线乱码一区二区三区| 高清国产一区二区三区| 99久久免费精品高清特色大片| 色综合天天综合网天天狠天天 | 亚洲人成精品久久久久久 | 欧美在线观看一二区| 欧美一区二区在线看| 久久综合一区二区| 中文字幕在线一区二区三区| 亚洲综合无码一区二区| 麻豆91精品视频| 日韩精品一区二区三区在线播放 | 青娱乐精品视频在线| 久草热8精品视频在线观看| 国产米奇在线777精品观看| 9久草视频在线视频精品| 欧美日韩在线播放三区四区| 精品1区2区在线观看| 亚洲精品中文在线| 国内精品自线一区二区三区视频| 9i在线看片成人免费| 91精品福利在线一区二区三区| 国产清纯在线一区二区www| 亚洲第一电影网| 丁香桃色午夜亚洲一区二区三区| 在线免费不卡视频| 2014亚洲片线观看视频免费| 一区二区三区精品在线| 欧洲日韩一区二区三区| 欧美精品一区二区三区很污很色的| 亚洲人精品一区| 国产在线播放一区二区三区 | 国产成人久久精品77777最新版本| 91女厕偷拍女厕偷拍高清| 日韩免费看的电影| 亚洲国产一区二区a毛片| 懂色av一区二区在线播放| 91精品国产色综合久久| 亚洲日本中文字幕区| 国产精品伊人色| 欧美一级日韩一级| 亚洲成人动漫一区| 91一区在线观看| 国产精品欧美经典| 国产一区二区三区四区五区美女 | 国产成人精品影视| 欧美成人性福生活免费看| 亚洲高清视频中文字幕| 99久久99久久综合| 欧美极品aⅴ影院| 国产在线不卡视频| 精品国内片67194| 日本aⅴ精品一区二区三区| 欧美综合久久久| 伊人一区二区三区| 色综合视频一区二区三区高清| 国产精品毛片久久久久久久| 国产精品亚洲专一区二区三区| 日韩精品最新网址| 免费在线观看视频一区| 制服丝袜在线91| 日韩电影在线一区二区三区| 欧美日本乱大交xxxxx| 亚洲国产中文字幕| 欧美日韩激情一区二区| 午夜精品福利在线|