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

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

?? stos.c

?? stos Linux 源碼示范程序。 可以移植到其他平臺(tái)
?? C
?? 第 1 頁 / 共 3 頁
字號(hào):
Limitations :
Returns     : ST_NO_ERROR
*******************************************************************************/
ST_ErrorCode_t  STOS_TaskExit ( void * Param )
{
    Param = Param;   /* To avoid warnings */

#if defined (ST_OS20) || defined (ST_OS21)
    /* Nothing to do */

    return ST_NO_ERROR;

#elif defined (ST_OSLINUX)

#ifdef MODULE
    while (!kthread_should_stop())
         schedule_timeout(10); /* 10 jiffies */

    return ST_NO_ERROR;
#else
    return ST_NO_ERROR;
#endif  /* MODULE */

#else
    #error STOS_TaskExit() can only be used with OS20, OS21 or LINUX!
#endif
}

/*******************************************************************************
Name        : STOS_SemaphoreCreateFifo
Description : OS-independent implementation of semaphore_create_fifo().
              Allocates memory for semaphore structure and initializes semaphore.
              The STOS_SemaphoreCreateFifo() function call is supposed to be independent of the OS used but needs
              a partition_p argument. Depending on the OS used, a different partition must be used.
Parameters  : Partition where to create semaphore, initial value of the semaphore
              If Partition_p = NULL:
                 - For OS20, the STOS function recognizes that it needs to use system_partition.
                 - For OS21, the semaphore_create() function is used instead of semaphore_create_p().
                 - For Linux, the Partition_p parameter is not used.
Assumptions :
Limitations :
Returns     : Address of initialized semaphore or NULL if not enough memory
*******************************************************************************/
semaphore_t * STOS_SemaphoreCreateFifo(partition_t * Partition_p, const int InitialValue)
{
#if defined (ST_OS20)
    semaphore_t * Semaphore_p;

    if(Partition_p == NULL)
    {
        Semaphore_p = (semaphore_t *) memory_allocate(system_partition, sizeof(semaphore_t));
    }
    else
    {
        Semaphore_p = (semaphore_t *) memory_allocate(Partition_p, sizeof(semaphore_t));
    }

    if (Semaphore_p != NULL)
    {
        semaphore_init_fifo(Semaphore_p, InitialValue);
    }
    return(Semaphore_p);

#elif defined (ST_OS21)
    if(Partition_p == NULL)
    {
        return(semaphore_create_fifo(InitialValue));
    }
    else
    {
        return(semaphore_create_fifo_p(Partition_p, InitialValue));
    }

#elif defined (ST_OSLINUX)
    return(semaphore_create_fifo(InitialValue));

#else
    #error STOS_SemaphoreCreateFifo() can only be used with OS20, OS21 or LINUX!
#endif
}

/*******************************************************************************
Name        : STOS_SemaphoreCreateFifoTimeOut
Description : OS-independent implementation of semaphore_create_fifo_timeout()
              Allocates memory for semaphore structure and initializes semaphore
              The STOS_SemaphoreCreateFifo() function call is supposed to be independent of the OS used but needs
              a partition_p argument. Depending on the OS used, a different partition must be used.
Parameters  : Partition where to create semaphore, initial value of the semaphore
              If Partition_p = NULL:
                 - the STOS function recognizes that it needs to use system_partition for OS20.
                 - For OS21, the semaphore_create() function is used instead of semaphore_create_p().
Assumptions :
Limitations :
Returns     : Address of initialized semaphore or NULL if not enough memory
*******************************************************************************/
semaphore_t * STOS_SemaphoreCreateFifoTimeOut(partition_t * Partition_p, const int InitialValue)
{
#if defined (ST_OS20)
    semaphore_t * Semaphore_p;

    if(Partition_p == NULL)
    {
        Semaphore_p = (semaphore_t *) memory_allocate(system_partition, sizeof(semaphore_t));
    }
    else
    {
        Semaphore_p = (semaphore_t *) memory_allocate(Partition_p, sizeof(semaphore_t));
    }

    if (Semaphore_p != NULL)
    {
        semaphore_init_fifo_timeout(Semaphore_p, InitialValue);
    }
    return(Semaphore_p);

#elif defined (ST_OS21)
    /* OS21 does not have semaphore_create_fifo_timeout() function so calls to
       STOS_SemaphoreCreateFifo() and STOS_SemaphoreCreateFifoTimeOut() are equivalent */
    if(Partition_p == NULL)
    {
        return(semaphore_create_fifo(InitialValue));
    }
    else
    {
        return(semaphore_create_fifo_p(Partition_p, InitialValue));
    }

#elif defined (ST_OSLINUX)
    return(semaphore_create_fifo_timeout(InitialValue));

#else
    #error STOS_SemaphoreCreateFifoTimeOut() can only be used with OS20, OS21 or LINUX!
#endif
}

/*******************************************************************************
Name        : STOS_SemaphoreCreatePriority
Description : OS-independent implementation of semaphore_create_priority().
              Allocates memory for semaphore structure and initializes semaphore.
              The STOS_SemaphoreCreatePriority() function call is supposed to be independent of the OS used but needs
              a partition_p argument. Depending on the OS used, a different partition must be used.
Parameters  : Partition where to create semaphore, initial value of the semaphore
              If Partition_p = NULL:
                 - the STOS function recognizes that it needs to use system_partition for OS20.
                 - For OS21, the semaphore_create() function is used instead of semaphore_create_p().
Assumptions :
Limitations :
Returns     : Address of initialized semaphore or NULL if not enough memory
*******************************************************************************/
semaphore_t * STOS_SemaphoreCreatePriority(partition_t * Partition_p, const int InitialValue)
{
#if defined (ST_OS20)
    semaphore_t * Semaphore_p;

    if(Partition_p == NULL)
    {
        Semaphore_p = (semaphore_t *) memory_allocate(system_partition, sizeof(semaphore_t));
    }
    else
    {
        Semaphore_p = (semaphore_t *) memory_allocate(Partition_p, sizeof(semaphore_t));
    }

    if (Semaphore_p != NULL)
    {
        semaphore_init_priority(Semaphore_p, InitialValue);
    }
    return(Semaphore_p);

#elif defined (ST_OS21)
    if(Partition_p == NULL)
    {
        return(semaphore_create_priority(InitialValue));
    }
    else
    {
        return(semaphore_create_priority_p(Partition_p, InitialValue));
    }

#elif defined (ST_OSLINUX)
    return(semaphore_create_priority(InitialValue));

#else
    #error STOS_SemaphoreCreatePriority() can only be used with OS20, OS21 or LINUX!
#endif
}

/*******************************************************************************
Name        : STOS_SemaphoreCreatePriorityTimeOut
Description : OS-independent implementation of semaphore_create_priority_timeout().
              Allocates memory for semaphore structure and initializes semaphore.
              The STOS_SemaphoreCreatePriority() function call is supposed to be independent of the OS used but needs
              a partition_p argument. Depending on the OS used, a different partition must be used.
Parameters  : Partition where to create semaphore, initial value of the semaphore
              If Partition_p = NULL:
                 - the STOS function recognizes that it needs to use system_partition for OS20.
                 - For OS21, the semaphore_create() function is used instead of semaphore_create_p().
Assumptions :
Limitations :
Returns     : Address of initialized semaphore or NULL if not enough memory
*******************************************************************************/
semaphore_t * STOS_SemaphoreCreatePriorityTimeOut(partition_t * Partition_p, const int InitialValue)
{
#if defined (ST_OS20)
    semaphore_t * Semaphore_p;

    if(Partition_p == NULL)
    {
        Semaphore_p = (semaphore_t *) memory_allocate(system_partition, sizeof(semaphore_t));
    }
    else
    {
        Semaphore_p = (semaphore_t *) memory_allocate(Partition_p, sizeof(semaphore_t));
    }

    if (Semaphore_p != NULL)
    {
        semaphore_init_priority_timeout(Semaphore_p, InitialValue);
    }
    return(Semaphore_p);

#elif defined (ST_OS21)
    /* OS21 does not have semaphore_create_priority_timeout() function so calls to
       STOS_SemaphoreCreatePriority() and STOS_SemaphoreCreatePriorityTimeOut() are equivalent */
    if(Partition_p == NULL)
    {
        return(semaphore_create_priority(InitialValue));
    }
    else
    {
        return(semaphore_create_priority_p(Partition_p, InitialValue));
    }

#elif defined (ST_OSLINUX)
    return(semaphore_create_priority(InitialValue));

#else
    #error STOS_SemaphoreCreatePriorityTimeOut() can only be used with OS20, OS21 or LINUX!
#endif
}

/*******************************************************************************
Name        : STOS_SemaphoreDelete
Description : OS-independent implementation of semaphore_delete
Parameters  : Partition of the semaphore to delete, pointer on semaphore
              Partition is the same as used for STOS_SemaphoreCreate.
              If Partition_p = NULL, then we use the predefined system_partition for OS20.
              For OS21, this parameter is unused.
Assumptions : A call to STOS_SemaphoreCreate was made to create the semaphore to be deleted
Limitations : For OS20, don't use after call to semaphore_create because semaphore_delete()
              already deallocates memory in that case. Only use after STOS_SemaphoreCreate.
Returns     : STOS_SUCCESS or STOS_FAILURE
*******************************************************************************/
int STOS_SemaphoreDelete(partition_t * Partition_p, semaphore_t * Semaphore_p)
{
    assert(Semaphore_p != NULL);

#if defined (ST_OS20)
    semaphore_delete(Semaphore_p);

    if(Partition_p == NULL)
    {
        memory_deallocate(system_partition, (void *) Semaphore_p);
    }
    else
    {
        memory_deallocate(Partition_p, (void *) Semaphore_p);
    }
    return(STOS_SUCCESS);

#elif defined (ST_OS21)
    return(semaphore_delete(Semaphore_p));

#elif defined (ST_OSLINUX)
    return(semaphore_delete(Semaphore_p));

#else
    #error STOS_SemaphoreDelete() can only be used with OS20, OS21 or LINUX!
#endif
}

/*******************************************************************************
Name        : STOS_SemaphoreSignal
Description : OS-independent implementation of semaphore_signal
Parameters  : semaphore to signal to
Assumptions :
Limitations :
Returns     : Nothing
*******************************************************************************/
void STOS_SemaphoreSignal(semaphore_t * Semaphore_p)
{
    assert(Semaphore_p != NULL);

#if (defined (ST_OS20)) || (defined (ST_OS21)) || (defined (ST_OSLINUX))
    semaphore_signal(Semaphore_p);

#else
    #error STOS_SemaphoreSignal() can only be used with OS20, OS21 or LINUX!
#endif
}

/*******************************************************************************
Name        : STOS_SemaphoreWait
Description : OS-independent implementation of semaphore_wait
Parameters  : semaphore to wait for
Assumptions :
Limitations :
Returns     : Always returns STOS_SUCCESS
*******************************************************************************/
int STOS_SemaphoreWait(semaphore_t * Semaphore_p)
{
    assert(Semaphore_p != NULL);

#if (defined (ST_OS20)) || (defined (ST_OS21)) || (defined (ST_OSLINUX))
    semaphore_wait(Semaphore_p);
    return(STOS_SUCCESS);
#else
    #error STOS_SemaphoreWait() can only be used with OS20, OS21 or LINUX!
#endif
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品美女久久久久aⅴ| 国产精品一区不卡| 国产婷婷色一区二区三区| 色婷婷av一区二区三区gif| 91猫先生在线| 国产成人精品三级| 国产不卡一区视频| 国模一区二区三区白浆| 国产又黄又大久久| 精品无人区卡一卡二卡三乱码免费卡| 亚洲国产视频在线| 婷婷国产在线综合| 亚洲一区二区三区视频在线播放| 一区二区三区欧美在线观看| 综合色天天鬼久久鬼色| 中文字幕精品综合| 亚洲欧美日韩小说| 亚洲裸体xxx| 亚洲国产精品久久人人爱蜜臀 | 91麻豆精品久久久久蜜臀| 欧美日韩一区 二区 三区 久久精品| 99久久精品免费看| 欧美另类变人与禽xxxxx| 欧美性受xxxx| 日韩欧美国产成人一区二区| 日韩欧美激情一区| 欧美mv日韩mv亚洲| 欧美激情在线观看视频免费| 久久精品人人爽人人爽| 亚洲人成在线观看一区二区| 亚洲欧美国产三级| 一区二区在线看| 麻豆视频一区二区| 国产一区二区91| 色综合视频在线观看| 91污片在线观看| 91麻豆国产自产在线观看| 欧美视频在线一区二区三区| 欧美色综合久久| 8v天堂国产在线一区二区| 日韩一区二区不卡| 欧美精品一区二区三区一线天视频| 国产精品欧美经典| 亚洲精品成人精品456| 美女视频黄 久久| 成人性生交大片免费| 高清国产午夜精品久久久久久| 一本一道综合狠狠老| 欧美视频中文一区二区三区在线观看| 精品久久久久久久久久久久包黑料| 国产亚洲欧美在线| 国产精品水嫩水嫩| 一区二区不卡在线播放 | 亚洲欧美视频在线观看| 午夜精品久久久久久久99水蜜桃| 麻豆91在线看| 99re66热这里只有精品3直播 | 日产国产欧美视频一区精品| 国产综合色视频| 91福利国产精品| 欧美大片一区二区三区| 樱花影视一区二区| 蜜臀久久久久久久| 97se亚洲国产综合在线| 欧美一级高清片在线观看| 国产精品网站在线播放| 日本欧美大码aⅴ在线播放| 国产成人av电影免费在线观看| 欧美日韩国产大片| 国产人妖乱国产精品人妖| 亚洲日穴在线视频| 福利一区福利二区| 在线播放中文一区| 亚洲激情成人在线| 国产一区二区成人久久免费影院| 成a人片国产精品| 91精品国产91久久综合桃花| 亚洲欧洲av在线| 久久成人综合网| 日本乱人伦一区| 国产无一区二区| 奇米一区二区三区av| 色综合天天视频在线观看| 精品精品欲导航| 亚洲成av人片在www色猫咪| 97久久超碰国产精品| 2024国产精品| 久草在线在线精品观看| 91麻豆国产福利在线观看| 国产精品美女一区二区三区| 久久精品国产精品亚洲精品| 97精品电影院| 国产精品成人免费| 久久精品国产秦先生| 日韩免费看的电影| 亚洲成在线观看| 欧美视频中文字幕| 亚洲三级久久久| 色哟哟一区二区三区| 中文字幕不卡一区| 蜜臀国产一区二区三区在线播放| 在线免费观看不卡av| 亚洲欧美在线视频| av在线不卡电影| 欧美国产欧美综合| 成人黄色小视频在线观看| 久久综合999| 国产99精品国产| 精品免费99久久| 国产麻豆欧美日韩一区| 日韩免费观看高清完整版| 精品影院一区二区久久久| 欧美精品 日韩| 亚洲欧美激情小说另类| 在线亚洲欧美专区二区| 亚洲女同女同女同女同女同69| 91麻豆高清视频| 亚洲日本韩国一区| 欧美日韩亚洲综合一区二区三区| 亚洲欧美日韩一区| 欧美日韩免费一区二区三区视频| 亚洲午夜久久久久久久久电影院| 成人av网站在线观看免费| 亚洲麻豆国产自偷在线| 一本大道久久a久久精二百| 亚洲高清在线视频| 欧美日韩久久一区| 另类的小说在线视频另类成人小视频在线 | 日韩一区二区视频| 国产九色sp调教91| 国产午夜精品在线观看| fc2成人免费人成在线观看播放| 亚洲欧洲国产专区| 不卡视频一二三四| 亚洲国产成人av好男人在线观看| 欧美日韩国产不卡| 国产一区二区三区日韩| 国产清纯白嫩初高生在线观看91| 一本高清dvd不卡在线观看| 亚洲欧美国产毛片在线| 欧美在线观看视频在线| 日本麻豆一区二区三区视频| 日韩精品专区在线影院重磅| 99久久综合国产精品| 亚洲精品高清视频在线观看| 日韩欧美国产三级| 国产精品亚洲成人| 亚洲午夜国产一区99re久久| 欧美男男青年gay1069videost| 国产精品资源在线观看| 亚洲欧洲一区二区在线播放| 国产精品456| 亚洲中国最大av网站| 欧美日本在线看| 成人sese在线| 亚洲电影一级黄| 国产日韩欧美精品一区| 91视频一区二区| 久久99热狠狠色一区二区| 日本一区二区电影| 欧美一区二区三区日韩视频| 国产精品亚洲成人| 日本不卡高清视频| 久久久精品一品道一区| 欧美人狂配大交3d怪物一区| 国产精品一区二区三区乱码| 日日骚欧美日韩| 国产视频不卡一区| 91首页免费视频| 久久99精品久久久久久国产越南 | 亚洲成人av电影| 国产精品你懂的| 欧美精品色一区二区三区| 色香色香欲天天天影视综合网| 亚洲国产成人av好男人在线观看| 中文幕一区二区三区久久蜜桃| 宅男在线国产精品| 欧美性色aⅴ视频一区日韩精品| 极品美女销魂一区二区三区| 亚洲成人av电影| 国产精品久久久久久久久久久免费看 | 国产精品二三区| 日本久久一区二区| 国产在线精品一区二区三区不卡 | 一区二区三区中文免费| 精品日韩av一区二区| 欧美亚洲综合在线| 丁香婷婷综合色啪| 蜜桃视频免费观看一区| 国产精品青草久久| 久久久亚洲高清| 91精品国产综合久久福利软件| 色先锋aa成人| 91麻豆精品视频| 国产成人av电影在线| 国产高清不卡一区二区| 日韩国产欧美在线观看| 日韩精品亚洲专区| 亚洲综合男人的天堂| 亚洲午夜久久久久中文字幕久|