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