vitasdk
Documentation of the vitasdk
clib.h
Go to the documentation of this file.
1
7#ifndef _PSP2_KERNEL_CLIB_H_
8#define _PSP2_KERNEL_CLIB_H_
9
10#include <vitasdk/build_utils.h>
11#include <psp2/types.h>
12#include <stdarg.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
21typedef void* SceClibMspace;
23
34
40void sceClibAbort(void);
41
43
44int sceClibTolower(char ch);
45int sceClibToupper(char ch);
46
47int sceClibPrintf(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
48int sceClibDprintf(SceUID fd, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
49
50int sceClibSnprintf(char *dst, SceSize dst_max_size, const char *fmt, ...) __attribute__ ((format (printf, 3, 4)));
51int sceClibVsnprintf(char *dst, SceSize dst_max_size, const char *fmt, va_list args) __attribute__ ((format (printf, 3, 0)));
52
53char *sceClibStrncpy(char *dst, const char *src, SceSize len);
54char *sceClibStrncat(char *dst, const char *src, SceSize len);
55
56char *sceClibStrchr(const char *s, int ch);
57char *sceClibStrrchr(const char *src, int ch);
58char *sceClibStrstr(const char *s1, const char *s2);
59
60int sceClibStrcmp(const char *s1, const char *s2);
61int sceClibStrncmp(const char *s1, const char *s2, SceSize len);
62int sceClibStrncasecmp(const char *s1, const char *s2, SceSize len);
63
64SceSize sceClibStrnlen(const char *s1, SceSize max_len);
65
66void *sceClibMemset(void *dst, int ch, SceSize len);
67void *sceClibMemcpy(void *dst, const void *src, SceSize len);
68void *sceClibMemcpy_safe(void *dst, const void *src, SceSize len);
69void *sceClibMemmove(void *dst, const void *src, SceSize len);
70
71int sceClibMemcmp(const void *s1, const void *s2, SceSize len);
72
73void *sceClibMemchr(const void *src, int ch, SceSize len);
74
77
80
83
87void *sceClibMspaceReallocalign(SceClibMspace mspace, void *ptr, SceSize size, SceSize alignment);
89void sceClibMspaceFree(SceClibMspace mspace, void *ptr);
90
91#ifdef __cplusplus
92}
93#endif
94
95#endif /* _PSP2_KERNEL_CLIB_H_ */
96
#define VITASDK_BUILD_ASSERT_EQ(__size__, __name__)
Definition build_utils.h:13
void * sceClibMemcpy_safe(void *dst, const void *src, SceSize len)
void * sceClibMspaceMemalign(SceClibMspace mspace, SceSize alignment, SceSize size)
void * sceClibMspaceReallocalign(SceClibMspace mspace, void *ptr, SceSize size, SceSize alignment)
char * sceClibStrncat(char *dst, const char *src, SceSize len)
int int int sceClibSnprintf(char *dst, SceSize dst_max_size, const char *fmt,...) __attribute__((format(printf
void sceClibMspaceFree(SceClibMspace mspace, void *ptr)
void * sceClibMemset(void *dst, int ch, SceSize len)
void * sceClibMemcpy(void *dst, const void *src, SceSize len)
SceBool sceClibMspaceIsHeapEmpty(SceClibMspace mspace)
int int int int sceClibVsnprintf(char *dst, SceSize dst_max_size, const char *fmt, va_list args) __attribute__((format(printf
char sceClibLookCtypeTable(char ch)
void * sceClibMspaceRealloc(SceClibMspace mspace, void *ptr, SceSize size)
int sceClibPrintf(const char *fmt,...) __attribute__((format(printf
SceSize sceClibStrnlen(const char *s1, SceSize max_len)
int sceClibMemcmp(const void *s1, const void *s2, SceSize len)
int int int int char * sceClibStrncpy(char *dst, const char *src, SceSize len)
void * sceClibMemchr(const void *src, int ch, SceSize len)
char * sceClibStrstr(const char *s1, const char *s2)
int sceClibTolower(char ch)
SceSize current_in_use
Current memory allocated.
Definition clib.h:31
void * sceClibMspaceMalloc(SceClibMspace mspace, SceSize size)
SceSize unk
Unknown, value is equal to capacity.
Definition clib.h:29
SceClibMspace sceClibMspaceCreate(void *memblock, SceSize size)
int int sceClibDprintf(SceUID fd, const char *fmt,...) __attribute__((format(printf
void * sceClibMemmove(void *dst, const void *src, SceSize len)
int sceClibStrncmp(const char *s1, const char *s2, SceSize len)
char * sceClibStrrchr(const char *src, int ch)
int sceClibStrncasecmp(const char *s1, const char *s2, SceSize len)
SceSize capacity
Capacity of the Mspace.
Definition clib.h:28
void sceClibAbort(void)
Run bkpt #0x88 and end the process in state -1.
void * SceClibMspace
A handle for a managed memory space.
Definition clib.h:21
void sceClibMspaceMallocStats(SceClibMspace mspace, SceClibMspaceStats *stats)
SceSize sceClibMspaceMallocUsableSize(void *ptr)
void sceClibMspaceMallocStatsFast(SceClibMspace mspace, SceClibMspaceStats *stats)
void * sceClibMspaceCalloc(SceClibMspace mspace, SceSize num, SceSize size)
SceSize peak_in_use
Peak memory allocated.
Definition clib.h:30
int sceClibToupper(char ch)
void sceClibMspaceDestroy(SceClibMspace mspace)
int sceClibStrcmp(const char *s1, const char *s2)
char * sceClibStrchr(const char *s, int ch)
Structure for stats of SceClibMspace.
Definition clib.h:27
SceSize size
struct size(variable size)
Definition debug.h:0
const void const char * fmt
Definition debug.h:139
int SceBool
Definition types.h:59
unsigned int SceSize
Definition types.h:56
int SceUID
UIDs are used to describe many different kernel objects.
Definition types.h:90
struct SceUsbdDeviceAddress __attribute__((packed)) SceUsbdDeviceAddress