ps2sdk  1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
sys_arch.h File Reference
#include <kernel.h>
#include <malloc.h>
+ Include dependency graph for sys_arch.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  arch_message
 
struct  sys_mbox_t
 

Macros

#define SYS_MBOX_NULL   NULL
 
#define SYS_SEM_NULL   -1
 
#define SYS_MAX_MESSAGES   (MEMP_NUM_TCPIP_MSG_API+MEMP_NUM_TCPIP_MSG_INPKT)
 
#define mem_clib_malloc(size)   memalign(64,size)
 
#define mem_clib_calloc(count, size)   ps2ip_calloc64(count,size)
 

Typedefs

typedef int sys_prot_t
 
typedef int sys_sem_t
 
typedef int sys_thread_t
 

Functions

void * ps2ip_calloc64 (size_t n, size_t size)
 

Macro Definition Documentation

◆ mem_clib_calloc

#define mem_clib_calloc (   count,
  size 
)    ps2ip_calloc64(count,size)

Definition at line 30 of file sys_arch.h.

◆ mem_clib_malloc

#define mem_clib_malloc (   size)    memalign(64,size)

Definition at line 29 of file sys_arch.h.

◆ SYS_MAX_MESSAGES

#define SYS_MAX_MESSAGES   (MEMP_NUM_TCPIP_MSG_API+MEMP_NUM_TCPIP_MSG_INPKT)

Definition at line 10 of file sys_arch.h.

◆ SYS_MBOX_NULL

#define SYS_MBOX_NULL   NULL

Definition at line 7 of file sys_arch.h.

◆ SYS_SEM_NULL

#define SYS_SEM_NULL   -1

Definition at line 8 of file sys_arch.h.

Typedef Documentation

◆ sys_prot_t

typedef int sys_prot_t

Definition at line 24 of file sys_arch.h.

◆ sys_sem_t

typedef int sys_sem_t

Definition at line 25 of file sys_arch.h.

◆ sys_thread_t

typedef int sys_thread_t

Definition at line 27 of file sys_arch.h.

Function Documentation

◆ ps2ip_calloc64()

void* ps2ip_calloc64 ( size_t  n,
size_t  size 
)

Definition at line 466 of file sys_arch.c.

467 {
468  void *ptr = NULL;
469  size_t sz = n * size;
470 
471  if ((ptr = memalign(64, sz)) == NULL)
472  return ptr;
473 
474  memset(ptr, 0, sz);
475  return ptr;
476 }
#define NULL
Definition: tamtypes.h:91

References NULL.