/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2008.
     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: 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 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()
{
    // Use {} instead of ; to avoid warnings
	sgxOutputTraceMessage("-----------------------------------");
	sgxOutputTraceMessage("-  The processor has been halted  -");
	sgxOutputTraceMessage("-----------------------------------");
    while (1){} 
}
