summaryrefslogtreecommitdiff
path: root/include/nw4r/snd/snd_TaskThread.h
blob: 7a9a5a0a6a1f8ed95143a86dfebdd31bf6144e85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef NW4R_SND_TASK_THREAD_H
#define NW4R_SND_TASK_THREAD_H

/*******************************************************************************
 * headers
 */

#include "common.h"

#include <rvl/OS/OSThread.h>

/*******************************************************************************
 * classes and functions
 */

namespace nw4r { namespace snd { namespace detail
{
	// [R89JEL]:/bin/RVL/Debug/mainD.elf:.debug::0x4b348
	class TaskThread
	{
	// methods
	public:
		// cdtors
		TaskThread();
		~TaskThread();

		// methods
		bool Create(s32 priority, void *stack, u32 stackSize);
		void Destroy();

	private:
		// fibers, callbacks, and procedures
		static void *ThreadFunc(void *arg);
		void ThreadProc();

	// members
	private:
		OSThread	mThread;		// size 0x318, offset 0x000
		u32		*mStackEnd;		// size 0x004, offset 0x318
		bool		mFinishFlag;	// size 0x001, offset 0x31c // TODO: volatile? (see ThreadProc)
		bool		mCreateFlag;	// size 0x001, offset 0x31d
		/* 2 bytes padding */
	}; // size 0x320
}}} // namespace nw4r::snd::detail

#endif // NW4R_SND_TASK_THREAD_H