1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta http-equiv="Content-Style-Type" content="text/css" /> 6 <link rel="stylesheet" href="../../../css/manpage.css" type="text/css" /> 7 <style type="text/css"><!-- 8 span.static_style 9 { 10 font-size : 8pt; 11 color : white; 12 font-weight : bold; 13 background : #44f; 14 border-left : solid 1px #aaf; 15 border-top : solid 1px #aaf; 16 border-right : solid 1px #00c; 17 border-bottom : solid 1px #00c; 18 padding-left : 2px; 19 padding-right : 2px; 20 } 21 22 span.virtual_style 23 { 24 font-size : 8pt; 25 color : white; 26 font-weight : bold; 27 background : #0a0; 28 border-left : solid 1px #0f0; 29 border-top : solid 1px #0f0; 30 border-right : solid 1px #060; 31 border-bottom : solid 1px #060; 32 padding-left : 2px; 33 padding-right : 2px; 34 } 35 36 span.protected_style 37 { 38 font-size : 8pt; 39 color : white; 40 font-weight : bold; 41 background : #444; 42 border-left : solid 1px #ccc; 43 border-top : solid 1px #ccc; 44 border-right : solid 1px #222; 45 border-bottom : solid 1px #222; 46 padding-left : 2px; 47 padding-right : 2px; 48 } 49 --></style> 50<title>nn::os::LightEvent</title> 51 </head> 52 <body> 53<h1><CODE>nn::os::LightEvent</CODE> Class</h1> 54 <div class="section"> 55<b>Header file: </b>nn/os.h</div> 56<h2>Syntax</h2> 57 <div class="section"> 58 <pre class="definition">class LightEvent</pre> 59 </div> 60<h2>Description</h2> 61 <div class="section"> 62<p>Synchronization mechanism for communicating flags between threads.</p><p>The class has an internal flag that multiple threads can control in a safe manner. It can also be used to wait for the flag to be set.</p><p>The <a href="../../../nn/os/LightSemaphore/Overview.html"><CODE>nn::os::LightEvent</CODE></a> class is superior to the <a href="../../../nn/os/Event/Overview.html"><CODE>nn::os::Event</CODE></a> class and should therefore be used in normal cases. Its only disadvantage is the fact that it is unable to wait for multiple synchronization objects simultaneously.</p><p>All member functions of this class are thread-safe except for the <CODE>Initialize</CODE> and <CODE>Finalize</CODE> functions.</p><!-- write here --></div> 63 <a name="function" id="function"> 64<h2>Member Functions</h2> 65 <div class="section"> 66 <table class="members"> 67 <tr> 68<th class="category" colspan="3">Initialization/Finalization</th> 69 </tr> 70 <tr> 71 <td width="100"> </td> 72 <th> 73<a href="../../../nn/os/LightEvent/LightEvent.html"><CODE>LightEvent</CODE></a> 74 </th> 75<td>Constructor.</td> 76 </tr> 77 <tr> 78 <td width="100"> </td> 79 <th> 80<a href="../../../nn/os/LightEvent/Initialize.html"><CODE>Initialize</CODE></a> 81 </th> 82<td>Performs initialization.</td> 83 </tr> 84 <tr> 85 <td width="100"> </td> 86 <th> 87<a href="../../../nn/os/LightEvent/Finalize.html"><CODE>Finalize</CODE></a> 88 </th> 89<td>Performs finalization.</td> 90 </tr> 91 <tr> 92<th class="category" colspan="3">Obtaining Debug Info</th> 93 </tr> 94 <tr> 95 <td width="100"> </td> 96 <th> 97<a href="../../../nn/os/LightEvent/IsSignaled.html"><CODE>IsSignaled</CODE></a> 98 </th> 99<td>Obtains whether the flag is set.</td> 100 </tr> 101 <tr> 102 <td width="100"> </td> 103 <th> 104<a href="../../../nn/os/LightEvent/IsManualReset.html"><CODE>IsManualReset</CODE></a> 105 </th> 106<td>Determines whether an event is a manually resetting event.</td> 107 </tr> 108 <tr> 109<th class="category" colspan="3">Flag Operations and Blocking</th> 110 </tr> 111 <tr> 112 <td width="100"> </td> 113 <th> 114<a href="../../../nn/os/LightEvent/TryWait.html"><CODE>TryWait</CODE></a> 115 </th> 116<td>Gets whether the flag is set.</td> 117 </tr> 118 <tr> 119 <td width="100"> </td> 120 <th> 121<a href="../../../nn/os/LightEvent/Wait.html"><CODE>Wait</CODE></a> 122 </th> 123<td>Waits until the flag is set.</td> 124 </tr> 125 <tr> 126 <td width="100"> </td> 127 <th> 128<a href="../../../nn/os/LightEvent/Signal.html"><CODE>Signal</CODE></a> 129 </th> 130<td>Sets the flag.</td> 131 </tr> 132 <tr> 133 <td width="100"> </td> 134 <th> 135<a href="../../../nn/os/LightEvent/Pulse.html"><CODE>Pulse</CODE></a> 136 </th> 137<td>Deallocates threads that are waiting for the flag to be set.</td> 138 </tr> 139 <tr> 140 <td width="100"> </td> 141 <th> 142<a href="../../../nn/os/LightEvent/ClearSignal.html"><CODE>ClearSignal</CODE></a> 143 </th> 144<td>Clears the flag.</td> 145 </tr> </table> 146 </div> 147 </a> 148<h2>Revision History</h2> 149 <div class="section"> 150 <dl class="history"> 151 <dt>2010/06/14</dt> 152<dd>Initial version.<br /> 153 </dd> 154 </dl> 155 </div> 156 <hr><p>CONFIDENTIAL</p></body> 157</html>