1 /*---------------------------------------------------------------------------* 2 Project: NintendoWare 3 File: snd_ThreadStack.h 4 5 Copyright (C)2009-2010 Nintendo Co., Ltd./HAL Laboratory, Inc. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Revision: $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NW_SND_THREAD_STACK_H_ 17 #define NW_SND_THREAD_STACK_H_ 18 19 namespace nw { 20 namespace snd { 21 namespace internal { 22 23 class ThreadStack 24 { 25 public: ThreadStack()26 ThreadStack() : m_Addr( NULL ), m_Size( 0 ) {} ~ThreadStack()27 ~ThreadStack() { Finalize(); } 28 29 void Initialize( uptr ptr, size_t size ); 30 void Finalize(); 31 GetStackBottom()32 uptr GetStackBottom() const { return m_Addr + m_Size; } GetBaseAddress()33 uptr GetBaseAddress() const { return m_Addr; } 34 35 private: 36 uptr m_Addr; 37 size_t m_Size; 38 }; 39 40 } // namespace nw::snd::internal 41 } // namespace nw::snd 42 } // namespace nw 43 44 45 #endif /* NW_SND_THREAD_STACK_H_ */ 46 47