PS2SDK
PS2 Homebrew Libraries
rpc_server.c File Reference
#include <stdio.h>
#include <thbase.h>
#include <thsemap.h>
#include <loadcore.h>
#include <sysmem.h>
#include <intrman.h>
#include <sifcmd.h>
#include <audsrv.h>
#include "audsrv_internal.h"
#include "common.h"
#include "rpc_client.h"
#include "debug_printf.h"
+ Include dependency graph for rpc_server.c:

Go to the source code of this file.

Functions

static int rpc_buffer[18000/4] __attribute__ ((__aligned__(4)))
 
static void * rpc_command (int func, unsigned *data, int size)
 
static void rpc_server_thread (void *arg)
 
int initialize_rpc_thread ()
 

Variables

static SifRpcDataQueue_t qd
 
static SifRpcServerData_t sd0
 

Detailed Description

audsrv iop rpc server.

Definition in file rpc_server.c.

Function Documentation

◆ __attribute__()

static int rpc_buffer [18000/4] __attribute__ ( (__aligned__(4))  )
static

buffer for RPC DMA

◆ rpc_command()

static void* rpc_command ( int  func,
unsigned *  data,
int  size 
)
static

RPC command handler.

Parameters
funccommand (one of AUDSRV_x)
datapointer to data array
sizesize of data array (in bytes)
Returns
value depends on function invoked

This is a single rpc handler, it unpacks the data array and calls local functions.

Definition at line 47 of file rpc_server.c.

◆ rpc_server_thread()

static void rpc_server_thread ( void *  arg)
static

RPC listener thread

Parameters
argnot used

This is the main RPC thread. Nothing fancy here.

Definition at line 182 of file rpc_server.c.

Variable Documentation

◆ qd

SifRpcDataQueue_t qd
static

RPC thread variables

Definition at line 33 of file rpc_server.c.

◆ sd0

SifRpcServerData_t sd0
static

RPC thread variables

Definition at line 35 of file rpc_server.c.