1 /*---------------------------------------------------------------------------*
2   Project:  THP demo
3   File:     THPRead.h
4 
5   Copyright (C)2002-2006 Nintendo  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   $Log: THPRead.h,v $
14   Revision 1.1  02/03/2006 10:00:34  aka
15   Imported from Dolphin tree.
16 
17 
18     2     02/05/14 9:24a Suzuki
19     Changed return value type and argument type of PopReadedBuffer(),
20      PushReadedBuffer(,), PopFreeReadBuffer(), PushFreeReadBuffer(),
21      PopReadedBuffer2(), PushReadedBuffer2().
22 
23     1     02/01/16 11:03a Akagi
24     Initial revision made by Suzuki-san (IRD).
25 
26   $NoKeywords: $
27 
28  *---------------------------------------------------------------------------*/
29 
30 #ifndef __THP_READ_H__
31 #define __THP_READ_H__
32 
33 #include <revolution.h>
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 #define NEXT_READ_SIZE(p)      *(s32 *)(p->ptr)
40 #define PREV_READ_SIZE(p)      *(s32 *)(p->ptr + 4)
41 
42 extern BOOL CreateReadThread(OSPriority priority);
43 extern void ReadThreadStart(void);
44 extern void ReadThreadCancel(void);
45 extern void *PopReadedBuffer();
46 extern void PushReadedBuffer(void *buffer);
47 extern void *PopFreeReadBuffer();
48 extern void PushFreeReadBuffer(void *buffer);
49 extern void *PopReadedBuffer2();
50 extern void PushReadedBuffer2(void *buffer);
51 
52 #ifdef __cplusplus
53 }
54 #endif
55 
56 #endif // __THP_READ_H__
57