wut  v1.7.0
Wii U Toolchain
Typedefs | Enumerations | Enumerator | Functions
Nn_nets2_somemopt

User provided socket memory options. More...

Collaboration diagram for Nn_nets2_somemopt:

Typedefs

typedef enum SOMemOptRequest SOMemOptRequest
 
typedef enum SOMemOptFlags SOMemOptFlags
 

Enumerations

enum  SOMemOptRequest {
  SOMEMOPT_REQUEST_INIT = 1 ,
  SOMEMOPT_REQUEST_GET_BYTES_USED = 2 ,
  SOMEMOPT_REQUEST_WAIT_FOR_INIT = 3 ,
  SOMEMOPT_REQUEST_CANCEL_WAIT = 4
}
 
enum  SOMemOptFlags {
  SOMEMOPT_FLAGS_NONE = 0 ,
  SOMEMOPT_FLAGS_BIG_BUFFERS = 1 << 0
}
 

Functions

int somemopt (SOMemOptRequest request, void *buffer, uint32_t size, SOMemOptFlags flags)
 Perform a somemopt request. More...
 

Detailed Description

User provided socket memory options.

Typedef Documentation

◆ SOMemOptRequest

◆ SOMemOptFlags

Enumeration Type Documentation

◆ SOMemOptRequest

Enumerator
SOMEMOPT_REQUEST_INIT 

Initialize buffer managment from user-provided buffer.

This is a blocking request, which only returns once nsysnet is shut down/the application quits.

SOMEMOPT_REQUEST_GET_BYTES_USED 

Return the amount of bytes used for buffer management.

SOMEMOPT_REQUEST_WAIT_FOR_INIT 

Wait for buffer management initialization to be done.

SOMEMOPT_REQUEST_CANCEL_WAIT 

Cancel pending wait for init.

Definition at line 15 of file somemopt.h.

◆ SOMemOptFlags

Enumerator
SOMEMOPT_FLAGS_NONE 
SOMEMOPT_FLAGS_BIG_BUFFERS 

Changes the distribution between small and big buffers to 50-50 instead of 80-20.

Definition at line 28 of file somemopt.h.

Function Documentation

◆ somemopt()

int somemopt ( SOMemOptRequest  request,
void *  buffer,
uint32_t  size,
SOMemOptFlags  flags 
)

Perform a somemopt request.

Parameters
requestThe request to perform.
bufferA 0x40 aligned buffer for SOMEMOPT_REQUEST_INIT.
sizeThe size of the buffer for SOMEMOPT_REQUEST_INIT. Minimum size is 0x20000 bytes, maximum size is 0x300000.
flagsA combination of flags.
Returns
-1 on error.