?? brl_defs.h
字號:
<HTML><HEAD><TITLE>/home/asysweb/public_html/cortex/examples/exmpl5/src/brl_defs.h</TITLE></HEAD><BODY><pre><font color="#6920ac">/*************************************************************************/</font><font color="#6920ac">/* */</font><font color="#6920ac">/* Copyright (c) 1997-1999 Australian Real Time Embedded Systems */</font><font color="#6920ac">/* */</font><font color="#6920ac">/* PROPRIETARY RIGHTS of Australian Real Time Embedded Systems */</font><font color="#6920ac">/* are involved in the subject matter of this material. All reproduction,*/</font><font color="#6920ac">/* manufacturing, use, and sales rights pertaining to this subject matter*/</font><font color="#6920ac">/* are governed by the license agreement. The recipient of this software */</font><font color="#6920ac">/* implicitly accepts the terms of the license. */</font><font color="#6920ac">/* */</font><font color="#6920ac">/*************************************************************************/</font><font color="#6920ac">/* * Barrier Locks Implementation Example * ------------------------------------ * * An application uses a barrier synchronisation primitive to ensure that * all parallel processes have completed execution of a code block before * permitting the processes to continue to the next block. The a * participating parallel task arrives at a barrier it will wait until * all the participating tasks arrive. All tasks can proceed after * the last participating task arrives at the barrier. */</font><b><font color='DarkGreen'>#ifndef</font></b><font color="maroon"> __BRL_DEFS__H</font><b><font color='DarkGreen'>#define</font></b> <font color="maroon"><a name="__BRL_DEFS__H">__BRL_DEFS__H</a></font><b><font color='DarkGreen'>#ifdef</font></b><font color="maroon"> __cplusplus</font><i>extern</i> <font color="DarkGreen">"C"</font> {<b><font color='DarkGreen'>#endif</font></b><font color="maroon"> <font color="#6920ac">/* __cplusplus */</font></font><b><font color='DarkGreen'>#include</font></b> <a href="cortex.h.FIND-INC"><font color="blue">"cortex.h"</font></a><font color="#6920ac">/*********************** * GLOBAL CONSTANSTS * ***********************/</font><font color="#6920ac">/* None */</font><font color="#6920ac">/***************** * GLOBAL MACROS * *****************/</font><font color="#6920ac">/* None */</font><font color="#6920ac">/*********************** * GLOBAL DATA TYPES * ***********************/</font><font color="#6920ac">/* Barrier Block control block */</font><i><a name="brrl_Barrier_t">typedef</a></i> <i>struct</i> brrl_Barrier_s { <i>crtx_Int_t</i> Count; <font color="#6920ac">/* number of expected tasks */</font> <i>crtx_Int_t</i> Arrived; <font color="#6920ac">/* number of arrived tasks */</font> <i>mutx_Mutex_t</i> *pMutex; <font color="#6920ac">/* exclusive access mutex */</font> <i>mutx_Condition_t</i> *pWaitingList; <font color="#6920ac">/* wating list for arrived tasks */</font>} <i><font color='DarkBlue'>brrl_Barrier_t</font></i>;<font color="#6920ac">/***************** * GLOBAL DATA * *****************/</font><font color="#6920ac">/* None */</font><font color="#6920ac">/*************************** * PROCEDURES PROTOTYPES * ***************************/</font><font color="#6920ac">/* create/initialise barrier lock */</font><font size="+1"><i>brrl_Barrier_t</i> *<a href="brrl_Create.FIND-FUNC">brrl_Create</a>(<i>crtx_Int_t</i> Count_a);</font><font color="#6920ac">/* destroy barrier lock */</font><font size="+1"><i>crtx_Void_t</i> <a href="brrl_Delete.FIND-FUNC">brrl_Delete</a>(<i>brrl_Barrier_t</i> *pBarrier_a);</font><font color="#6920ac">/* blocking at the barrier lock */</font><font size="+1"><i>crtx_Void_t</i> <a href="brrl_Wait.FIND-FUNC">brrl_Wait</a>(<i>brrl_Barrier_t</i> *pBarrier_a);</font><font color="#6920ac">/* ===== END OF THE DEFINITION FILE ===== */</font><b><font color='DarkGreen'>#ifdef</font></b><font color="maroon"> __cplusplus</font>}<b><font color='DarkGreen'>#endif</font></b><font color="maroon"> <font color="#6920ac">/* __cplusplus */</font></font><b><font color='DarkGreen'>#endif</font></b><font color="maroon"> <font color="#6920ac">/* __BRL_DEFS__H */</font></font></pre></BODY></HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -