====== OSA : OS_Wait ======
<color blue>**OS_Wait (condition)**</color>\\ 
=== ===

{{osa:ref:attr_call_task.png|Allowed only in task}}{{osa:ref:attr_call_ct_sw.png|Switches context}}

Wait until //condition// is true.

=== Call allowed: ===
Only in task


=== Parameters: ===
{| class = "fpl"
|-
|//''condition''//
|Any boolean expression
|}


=== Returns: ===
nothing

=== Example: ===
<code cpp>
void Task (void)
{
    for (;;) {
        /*...*/
        OS_Wait(a < 5 && TMR1IF);
        /*...*/
    }
}
</code>


=== Old style name ===
<color gray>**OS_WaitCondition**</color>\\ 






<color gray>**OS_Cond_Wait**</color>\\ 








=== See also ===

----
  * [[en:osa:ref:services:alphabetical|Alphabetical]]
  * [[en:osa:ref:services:brieflist|All services]]
~~UP~~