System.h 724 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Copyright (C) 2009-2020, Panagiotis Christopoulos Charitos and contributors.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #pragma once
  6. #include <anki/util/StdTypes.h>
  7. namespace anki
  8. {
  9. /// @addtogroup util_system
  10. /// @{
  11. /// Get the number of CPU cores
  12. U32 getCpuCoresCount();
  13. /// Visit the program stack.
  14. class BackTraceWalker
  15. {
  16. public:
  17. BackTraceWalker(U stackSize = 50)
  18. : m_stackSize(stackSize)
  19. {
  20. }
  21. virtual ~BackTraceWalker()
  22. {
  23. }
  24. virtual void operator()(const char* symbol) = 0;
  25. void exec();
  26. private:
  27. U m_stackSize;
  28. };
  29. /// Return true if the engine is running from a terminal emulator.
  30. Bool runningFromATerminal();
  31. /// @}
  32. } // end namespace anki