/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2009.
     ssss    gggg x   x         Steven Goodwin. All Rights Reserved.
    
This version has been released under the GNU Public License v2.0.

Please see the license files for details.

File: sgx/src/sgx/core/helpers/halt.cpp

*/

#include "sgx/core/types/types.hpp"
#include "sgx/core/helpers/trace.hpp"

/**
This method stops the current thread from continuing. There is no way out of
this, except to manually change the program counter, or variable, in a debugger.

We used a function because when you break the code
you can see it's an explicit sgxHaltprocessor() call and not an artbirary
loop spinning.
*/
void sgxHaltprocessor()
{
	sgxOutputTraceMessage("-----------------------------------");
	sgxOutputTraceMessage("-  The processor has been halted  -");
	sgxOutputTraceMessage("-----------------------------------");

	tBOOL halt = TRUE;
    while (halt){
		// You can change this variable in the debugger to 'FALSE' to force the
		// machine to continue.
		halt = TRUE;	
	} 
}
