/*---------------------------------------------------------------------------* Project: Horizon File: osl_Mbuf.h Copyright (C)2009 Nintendo Co., Ltd. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. $Rev: 12449 $ *---------------------------------------------------------------------------*/ #ifndef NN_NET_OSL_OSL_MBUFINDEXED_H_ #define NN_NET_OSL_OSL_MBUFINDEXED_H_ typedef u32 nnnetOslMbufIndex; /* mbuf for inter-process */ typedef struct nnnetOslMbufIndexed { nnnetOslMbufIndex m_nextIndex; /**< Next cluster index */ nnnetOslMbufIndex m_prevIndex; /**< Previous cluster index */ void* m_reserved; u32 m_pad; } nnnetOslMbufIndexedHead; #ifdef __cplusplus namespace nn { namespace net { namespace osl { class Mbuf; class MbufIndexed : public nnnetOslMbufIndexed { public: friend class MbufPool; typedef nnnetOslMbufIndex Index; static const u32 INVALID_INDEX = 0xffffffff; static MbufIndexed* ConvertToIndexed(Mbuf* pMbuf); static Mbuf* ConvertFromIndex(Index index); void SetNext(Index index) { m_nextIndex = index; } void SetPrevious(Index index) { m_prevIndex = index; } Index GetIndex(void) const; void Dump(void) const; }; } } } // namespace nn::net::osl #endif // __cplusplus #endif // NN_NET_OSL_OSL_MBUFINDEXED_H_