vitasdk
Documentation of the vitasdk

Exports for Kernel. More...

Typedefs

typedef void(* SceSysclibPrntCallback) (void *argp, int ch)
 

Enumerations

enum  SceCTypeFlag {
  SCE_CTYPE_NONE = 0 , SCE_CTYPE_UPPERCASE = 1 , SCE_CTYPE_LOWERCASE = 2 , SCE_CTYPE_NUMBER = 4 ,
  SCE_CTYPE_CONTROL = 8 , SCE_CTYPE_SYMBOL = 0x10 , SCE_CTYPE_INVISIBLE = 0x20 , SCE_CTYPE_HEX_CASE = 0x40
}
 

Functions

void * memset (void *dst, int ch, unsigned int len)
 Set character to memory.
 
void * memcpy (void *dst, const void *src, unsigned int len)
 Copy memory1 to memory2.
 
void * memmove (void *dst, const void *src, unsigned int len)
 Move memory to memory.
 
int memcmp (const void *s1, const void *s2, unsigned int len)
 Memory comparison.
 
void * memchr (const void *src, int ch, unsigned int n)
 Search character from memory.
 
int strcmp (const char *s1, const char *s2)
 Strings comparison.
 
int strncmp (const char *s1, const char *s2, unsigned int n)
 Strings comparison with length limit.
 
char * strchr (const char *src, int ch)
 Search character from string.
 
char * strstr (const char *s1, const char *s2)
 Search string from string.
 
unsigned int strlen (const char *s)
 Get string length.
 
unsigned int strnlen (const char *s, unsigned int n)
 Get string length with length limit.
 
char * strncpy (char *dst, const char *src, unsigned int n)
 Copy string with length limit.
 
int snprintf (char *dst, unsigned int max, const char *fmt,...)
 
int vsnprintf (char *dst, unsigned int max, const char *fmt, va_list arg)
 
char look_ctype_table (char ch)
 
int tolower (int ch)
 
int toupper (int ch)
 
int timingsafe_memcmp (const void *s1, const void *s2, size_t n)
 
long strtol (const char *str, char **endptr, int base)
 
long long strtoll (const char *str, char **endptr, int base)
 
unsigned long strtoul (const char *str, char **endptr, int base)
 
void * __memcpy_chk (void *dst, const void *src, unsigned int len, unsigned int dst_len)
 
void * __memset_chk (void *dst, int ch, unsigned int len, unsigned int dst_len)
 
void * __memmove_chk (void *dst, const void *src, unsigned int len, unsigned int dst_len)
 
char * __strncpy_chk (char *dst, const char *src, unsigned int n, unsigned int dst_len)
 
void __prnt (SceSysclibPrntCallback callback, void *argp, const char *fmt, va_list list)
 Internal functions used for snprintf, vsnprintf, kscDebugPrintf.
 
 __attribute__ ((__noreturn__)) void __stack_chk_fail(void)
 
SceUInt64 __aeabi_uldivmod (SceUInt64 dividend, SceUInt64 divisor)
 ARM EABI unsigned 64-bit division helper.
 
char * __strncat_chk2 (char *dest, const char *src, SceSize dest_size)
 Append a bounded string and trap if the destination would overflow.
 
char * __strncpy_chk2 (char *dest, const char *src, SceSize dest_size)
 Copy a string after checking its bounded length.
 
char * strncat (char *dest, const char *src, SceSize count)
 Append at most count bytes from src to dest and return dest.
 
char * strncpy_s (char *dest, const char *src, SceSize dest_size)
 Copy at most dest_size bytes from a string.
 

Detailed Description

Exports for Kernel.


Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceSysclibForDriver_stub



Typedef Documentation

◆ SceSysclibPrntCallback

typedef void(* SceSysclibPrntCallback) (void *argp, int ch)

Enumeration Type Documentation

◆ SceCTypeFlag

Enumerator
SCE_CTYPE_NONE 
SCE_CTYPE_UPPERCASE 
SCE_CTYPE_LOWERCASE 
SCE_CTYPE_NUMBER 
SCE_CTYPE_CONTROL 
SCE_CTYPE_SYMBOL 
SCE_CTYPE_INVISIBLE 
SCE_CTYPE_HEX_CASE 

Function Documentation

◆ memset()

void * memset ( void *  dst,
int  ch,
unsigned int  len 
)

Set character to memory.

Parameters
[in]dst- The output buffer pointer
[in]ch- The character
[in]len- The character set length
Returns
dst.

◆ memcpy()

void * memcpy ( void *  dst,
const void *  src,
unsigned int  len 
)

Copy memory1 to memory2.

Parameters
[in]dst- The output buffer pointer
[in]src- The input buffer pointer
[in]len- The copy length
Returns
dst.

◆ memmove()

void * memmove ( void *  dst,
const void *  src,
unsigned int  len 
)

Move memory to memory.

Parameters
[in]dst- The buffer pointer
[in]src- The buffer pointer
[in]len- The move length
Returns
dst.

◆ memcmp()

int memcmp ( const void *  s1,
const void *  s2,
unsigned int  len 
)

Memory comparison.

Parameters
[in]s1- The memory source1
[in]s2- The memory source2
[in]len- The cmp length
Returns
If same memory contents, zero. else not zero.

◆ memchr()

void * memchr ( const void *  src,
int  ch,
unsigned int  n 
)

Search character from memory.

Parameters
[in]src- The memory source
[in]ch- The character
[in]len- The search length
Returns
If found character, return it position. else NULL.

◆ strcmp()

int strcmp ( const char *  s1,
const char *  s2 
)

Strings comparison.

Parameters
[in]s1- The string source1
[in]s2- The string source2
Returns
If same string contents, zero. else not zero.

◆ strncmp()

int strncmp ( const char *  s1,
const char *  s2,
unsigned int  n 
)

Strings comparison with length limit.

Parameters
[in]s1- The string source1
[in]s2- The string source2
[in]n- The max length
Returns
If same string contents, zero. else not zero.

◆ strchr()

char * strchr ( const char *  src,
int  ch 
)

Search character from string.

Parameters
[in]src- The string source
[in]ch- The character
Returns
If found character, return it position. else NULL.

◆ strstr()

char * strstr ( const char *  s1,
const char *  s2 
)

Search string from string.

Parameters
[in]s1- The string source1
[in]s2- The string source2
Returns
If found string, return it position. else NULL.

◆ strlen()

unsigned int strlen ( const char *  s)

Get string length.

Parameters
[in]s- The string pointer
Returns
String length.

◆ strnlen()

unsigned int strnlen ( const char *  s,
unsigned int  n 
)

Get string length with length limit.

Parameters
[in]s- The string pointer
[in]n- The max length
Returns
String length.

◆ strncpy()

char * strncpy ( char *  dst,
const char *  src,
unsigned int  n 
)

Copy string with length limit.

Parameters
[in]dst- The output buffer pointer
[in]src- The input buffer pointer
[in]n- The max copy length
Returns
If same string contents, zero. else not zero.

◆ snprintf()

int snprintf ( char *  dst,
unsigned int  max,
const char *  fmt,
  ... 
)

◆ vsnprintf()

int vsnprintf ( char *  dst,
unsigned int  max,
const char *  fmt,
va_list  arg 
)

◆ look_ctype_table()

char look_ctype_table ( char  ch)

◆ tolower()

int tolower ( int  ch)

◆ toupper()

int toupper ( int  ch)

◆ timingsafe_memcmp()

int timingsafe_memcmp ( const void *  s1,
const void *  s2,
size_t  n 
)

◆ strtol()

long strtol ( const char *  str,
char **  endptr,
int  base 
)

◆ strtoll()

long long strtoll ( const char *  str,
char **  endptr,
int  base 
)

◆ strtoul()

unsigned long strtoul ( const char *  str,
char **  endptr,
int  base 
)

◆ __memcpy_chk()

void * __memcpy_chk ( void *  dst,
const void *  src,
unsigned int  len,
unsigned int  dst_len 
)

◆ __memset_chk()

void * __memset_chk ( void *  dst,
int  ch,
unsigned int  len,
unsigned int  dst_len 
)

◆ __memmove_chk()

void * __memmove_chk ( void *  dst,
const void *  src,
unsigned int  len,
unsigned int  dst_len 
)

◆ __strncpy_chk()

char * __strncpy_chk ( char *  dst,
const char *  src,
unsigned int  n,
unsigned int  dst_len 
)

◆ __prnt()

void __prnt ( SceSysclibPrntCallback  callback,
void *  argp,
const char *  fmt,
va_list  list 
)

Internal functions used for snprintf, vsnprintf, kscDebugPrintf.

Parameters
[in]callback- The callback to receive ch output by this function
[in]argp- The passed to callback
[in]fmt- The base format. example: "%-18s"
[in]list- The variable argument list
Returns
none

◆ __attribute__()

__attribute__ ( (__noreturn__)  )

◆ __aeabi_uldivmod()

SceUInt64 __aeabi_uldivmod ( SceUInt64  dividend,
SceUInt64  divisor 
)

ARM EABI unsigned 64-bit division helper.

Parameters
[in]dividend- Dividend.
[in]divisor- Divisor.

On FW 3.60, a zero divisor produces a zero remainder. In that case, the quotient is zero when the dividend is zero, or UINT64_MAX otherwise.

Returns
The quotient. The helper also returns the remainder in R2:R3 as required by the ARM EABI.

◆ __strncat_chk2()

char * __strncat_chk2 ( char *  dest,
const char *  src,
SceSize  dest_size 
)

Append a bounded string and trap if the destination would overflow.

Parameters
[in,out]dest- NUL-terminated destination buffer.
[in]src- Source string.
[in]dest_size- Total destination capacity.
Returns
dest.

◆ __strncpy_chk2()

char * __strncpy_chk2 ( char *  dest,
const char *  src,
SceSize  dest_size 
)

Copy a string after checking its bounded length.

On FW 3.60, this function executes breakpoint 0x81 only if strnlen(src, dest_size) is greater than dest_size. The FW 3.60 strnlen cannot normally produce such a result.

Parameters
[out]dest- Destination buffer.
[in]src- Source string.
[in]dest_size- Number of bytes to copy, padding with NUL bytes when the source is shorter.
Returns
dest.

◆ strncat()

char * strncat ( char *  dest,
const char *  src,
SceSize  count 
)

Append at most count bytes from src to dest and return dest.

When at least one byte is appended, FW 3.60 writes the trailing NUL before copying the source bytes into place.

◆ strncpy_s()

char * strncpy_s ( char *  dest,
const char *  src,
SceSize  dest_size 
)

Copy at most dest_size bytes from a string.

A terminating NUL is written only when the source is shorter than dest_size; unlike the C11 Annex K function with the same name, this FW 3.60 function takes three arguments and returns dest.

Returns
dest.