wut  v1.7.0
Wii U Toolchain
Data Structures | Macros | Typedefs | Functions
ipcbufpool.h File Reference
#include <wut.h>
#include "mutex.h"
#include "ios.h"
Include dependency graph for ipcbufpool.h:

Go to the source code of this file.

Data Structures

struct  IPCBufPoolFIFO
 FIFO queue for IPCBufPool. More...
 
struct  IPCBufPoolAttributes
 Attributes returned by IPCBufPoolGetAttributes. More...
 
struct  IPCBufPool
 A simple message buffer pool used for IPC communication. More...
 

Macros

#define IPC_BUF_POOL_MAGIC   0x0BADF00Du
 

Typedefs

typedef struct IPCBufPoolAttributes IPCBufPoolAttributes
 
typedef struct IPCBufPoolFIFO IPCBufPoolFIFO
 
typedef struct IPCBufPool IPCBufPool
 

Functions

IPCBufPoolIPCBufPoolCreate (void *buffer, uint32_t size, uint32_t messageSize, uint32_t *outNumMessages, uint32_t unk0x0c)
 
void * IPCBufPoolAllocate (IPCBufPool *pool, uint32_t size)
 
IOSError IPCBufPoolFree (IPCBufPool *pool, void *message)
 
IOSError IPCBufPoolGetAttributes (IPCBufPool *pool, IPCBufPoolAttributes *attribs)
 

Data Structure Documentation

◆ IPCBufPoolFIFO

struct IPCBufPoolFIFO

FIFO queue for IPCBufPool.

Functions similar to a ring buffer.

Definition at line 20 of file ipcbufpool.h.

Data Fields
int32_t pushIndex The current message index to push to.
int32_t popIndex The current message index to pop from.
int32_t count The number of messages in the queue.
int32_t maxCount Tracks the total number of messages in the count.
void ** messages Messages in the queue.

◆ IPCBufPoolAttributes

struct IPCBufPoolAttributes

Attributes returned by IPCBufPoolGetAttributes.

Definition at line 46 of file ipcbufpool.h.

Data Fields
uint32_t messageSize Size of a message in the buffer pool.
uint32_t poolSize Size of the buffer pool.
uint32_t numMessages Number of pending messages in the pool fifo.

◆ IPCBufPool

struct IPCBufPool

A simple message buffer pool used for IPC communication.

Definition at line 66 of file ipcbufpool.h.

Data Fields
uint32_t magic Magic header always set to IPCBufPool::MagicHeader.
void * buffer Pointer to buffer used for this IPCBufPool.
uint32_t size Size of buffer.
uint32_t unk0x0C
uint32_t unk0x10
uint32_t messageSize0x14 Message size from IPCBufPoolCreate.
uint32_t messageSize0x18 Message size from IPCBufPoolCreate.
uint32_t messageCount Number of messages in the IPCBufPoolFIFO.
void * messages Pointer to start of messages.
uint32_t * messageIndexSize Number of bytes used for the message pointers in IPCBufPoolFIFO.
IPCBufPoolFIFO fifo FIFO queue of messages.
OSMutex mutex Mutex used to secure access to fifo.

Macro Definition Documentation

◆ IPC_BUF_POOL_MAGIC

#define IPC_BUF_POOL_MAGIC   0x0BADF00Du

Definition at line 61 of file ipcbufpool.h.

Typedef Documentation

◆ IPCBufPoolAttributes

Definition at line 1 of file ipcbufpool.h.

◆ IPCBufPoolFIFO

Definition at line 1 of file ipcbufpool.h.

◆ IPCBufPool

typedef struct IPCBufPool IPCBufPool

Definition at line 1 of file ipcbufpool.h.

Function Documentation

◆ IPCBufPoolCreate()

IPCBufPool* IPCBufPoolCreate ( void *  buffer,
uint32_t  size,
uint32_t  messageSize,
uint32_t *  outNumMessages,
uint32_t  unk0x0c 
)

◆ IPCBufPoolAllocate()

void* IPCBufPoolAllocate ( IPCBufPool pool,
uint32_t  size 
)

◆ IPCBufPoolFree()

IOSError IPCBufPoolFree ( IPCBufPool pool,
void *  message 
)

◆ IPCBufPoolGetAttributes()

IOSError IPCBufPoolGetAttributes ( IPCBufPool pool,
IPCBufPoolAttributes attribs 
)