1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
6<META http-equiv="Content-Style-Type" content="text/css">
7<TITLE>OS_SignalEvent</TITLE>
8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">OS_SignalEvent <IMG src="../../image/NTR.gif" align=middle><IMG src="../../image/TWL.gif" align=middle></H1>
12<H2>Syntax</H2>
13<DL>
14  <DD>
15  <PRE><CODE>#include &lt;nitro/os.h&gt;</CODE></PRE>
16  <PRE><CODE>void OS_SignalEvent(
17     OSEvent*   event,
18     u32        setPattern );
19  </CODE></PRE>
20</DL>
21<H2>Arguments</H2>
22<TABLE border="1" width="100%">
23  <TBODY>
24    <TR>
25      <TD width="13%"><EM><STRONG>event</STRONG></EM></TD>
26      <TD width="87%">Pointer to an event structure.</TD>
27    </TR>
28    <TR>
29      <TD width="13%"><EM><STRONG>setPattern</STRONG></EM></TD>
30      <TD width="87%">Bit pattern of the event flag to set.</TD>
31    </TR>
32  </TBODY>
33</TABLE>
34<H2>Return Values</H2>
35<P>None.</P>
36<H2>Description</H2>
37<P>Generates an event and signals threads waiting for an event.</P>
38<P><EM><B>event</B></EM> is a pointer to an event structure. This function sets the bits expressed by <B><I>setPattern</I></B> in the event flag member of this structure. As a result, execution rights may be transferred to a thread that is waiting for an event.</P>
39<P>Internally, after the event flag is changed, all threads registered in <B><I>event</I></B> that are waiting for events will be changed from the <EM>waiting</EM> state to the <EM>runnable</EM> state by <CODE><A href="../thread/OS_WakeupThread.html">OS_WakeupThread()</A></CODE>. If the individual threads meet the completion conditions, they will enter the <EM>runnable</EM> state right away, but if they don't meet the completion conditions, they'll reenter the <EM>waiting</EM> state using <A href="../thread/OS_SleepThread.html">OS_SleepThread()</A></CODE>.</P>
40<H2>See Also</H2>
41<P><CODE><A href="OS_InitEvent.html">OS_InitEvent</A>, <A href="OS_WaitEvent.html">OS_WaitEvent*</A>, <A href="OS_ClearEvent.html">OS_Clear*Event</A>, <A href="OS_PollEvent.html">OS_PollEvent*</A>, <A href="about_Event.html">OS Overview (Events)</A><BR></CODE></P>
42<H2>Revision History</H2>
43<P>2007/12/04 Initial version.</P>
44<hr><p>CONFIDENTIAL</p></body>
45</HTML>