busy-wait before process_run()
allows glue drivers to force system to wait
This commit is contained in:
parent
41578b35c4
commit
68d26d4628
|
@ -26,7 +26,7 @@
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: code_main_template,v 1.4 2006/09/29 14:32:15 fros4943 Exp $
|
* $Id: code_main_template,v 1.5 2006/10/02 15:07:33 fros4943 Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -115,6 +115,13 @@ start_process_run_loop(void *data)
|
||||||
{
|
{
|
||||||
/* Always pretend we have processes left while inside process_run() */
|
/* Always pretend we have processes left while inside process_run() */
|
||||||
simProcessRunValue = 1;
|
simProcessRunValue = 1;
|
||||||
|
|
||||||
|
// Busy-wait while receiving
|
||||||
|
while (busyWaitNext) {
|
||||||
|
busyWaitNext--;
|
||||||
|
cooja_mt_yield();
|
||||||
|
}
|
||||||
|
|
||||||
simProcessRunValue = process_run();
|
simProcessRunValue = process_run();
|
||||||
|
|
||||||
/* Yield thread when one process_run has completed */
|
/* Yield thread when one process_run has completed */
|
||||||
|
|
Loading…
Reference in a new issue