summaryrefslogtreecommitdiff
path: root/include/kernel/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'include/kernel/kernel')
-rw-r--r--include/kernel/kernel/cpu.h6
-rw-r--r--include/kernel/kernel/modulemgr.h20
-rw-r--r--include/kernel/kernel/processmgr.h8
-rw-r--r--include/kernel/kernel/sysmem.h34
-rw-r--r--include/kernel/kernel/threadmgr.h39
5 files changed, 52 insertions, 55 deletions
diff --git a/include/kernel/kernel/cpu.h b/include/kernel/kernel/cpu.h
index f7c4c52..cdc075f 100644
--- a/include/kernel/kernel/cpu.h
+++ b/include/kernel/kernel/cpu.h
@@ -40,7 +40,7 @@ static inline void sceKernelCpuSaveContext(int context[3]) {
/**
* @brief Restore process context
*
- * @param context The context, can be from `sceKernelGetPidContext`
+ * @param context The context, can be from ::sceKernelGetPidContext
*/
static inline void sceKernelCpuRestoreContext(int context[3]) {
int cpsr;
@@ -205,7 +205,7 @@ int sceKernelCpuUnrestrictedMemcpy(void *dst, const void *src, size_t len);
*
* @param[in] addr Mutex associated to the suspend-resume pair
*
- * @return The current state of the interrupt controller, to be used with sceKernelCpuResumeIntr.
+ * @return The current state of the interrupt controller, to be used with ::sceKernelCpuResumeIntr.
*/
int sceKernelCpuSuspendIntr(int *addr);
@@ -213,7 +213,7 @@ int sceKernelCpuSuspendIntr(int *addr);
* @brief Resume all interrupts (enables IRQs)
*
* @param[in] addr Mutex associated to the suspend-resume pair
- * @param[in] prev_state State obtained from sceKernelCpuSuspendIntr
+ * @param[in] prev_state State obtained from ::sceKernelCpuSuspendIntr.
*
* @return The previous state of the interrupt controller.
*/
diff --git a/include/kernel/kernel/modulemgr.h b/include/kernel/kernel/modulemgr.h
index 77257bd..89d29d6 100644
--- a/include/kernel/kernel/modulemgr.h
+++ b/include/kernel/kernel/modulemgr.h
@@ -23,19 +23,19 @@ extern "C" {
typedef struct
{
- SceUInt size; //< this structure size (0x18)
- SceUInt perms; //< probably rwx in low bits
- void *vaddr; //< address in memory
- SceUInt memsz; //< size in memory
- SceUInt flags; //< meaning unknown
- SceUInt res; //< unused?
+ SceUInt size; //!< this structure size (0x18)
+ SceUInt perms; //!< probably rwx in low bits
+ void *vaddr; //!< address in memory
+ SceUInt memsz; //!< size in memory
+ SceUInt flags; //!< meaning unknown
+ SceUInt res; //!< unused?
} SceKernelSegmentInfo;
typedef struct
{
- SceUInt size; //< 0x1B8 for Vita 1.x
- SceUInt handle; //< kernel module handle?
- SceUInt flags; //< some bits. could be priority or whatnot
+ SceUInt size; //!< 0x1B8 for Vita 1.x
+ SceUInt handle; //!< kernel module handle?
+ SceUInt flags; //!< some bits. could be priority or whatnot
char module_name[28];
SceUInt unk28;
void *module_start;
@@ -50,7 +50,7 @@ typedef struct
SceSize tlsAreaSize;
char path[256];
SceKernelSegmentInfo segments[4];
- SceUInt type; //< 6 = user-mode PRX?
+ SceUInt type; //!< 6 = user-mode PRX?
} SceKernelModuleInfo;
typedef struct {
diff --git a/include/kernel/kernel/processmgr.h b/include/kernel/kernel/processmgr.h
index fcf4ea4..58f1eee 100644
--- a/include/kernel/kernel/processmgr.h
+++ b/include/kernel/kernel/processmgr.h
@@ -8,13 +8,13 @@ extern "C" {
#endif
typedef struct SceKernelProcessInfo {
- SceSize size; // size of this struct, make sure it's 0xE8
- SceUID pid; // our process ID
+ SceSize size; //!< size of this struct, make sure it's 0xE8
+ SceUID pid; //!< our process ID
int unk1;
int unk2;
int unk3;
- SceUID ppid; // parent process ID
- int unk[0xE8 / 4 - 6]; // the rest is unknown
+ SceUID ppid; //!< parent process ID
+ int unk[0xE8 / 4 - 6]; //!< the rest is unknown
} SceKernelProcessInfo;
void *sceKernelGetProcessKernelBuf(SceUID pid);
diff --git a/include/kernel/kernel/sysmem.h b/include/kernel/kernel/sysmem.h
index b32742a..6373324 100644
--- a/include/kernel/kernel/sysmem.h
+++ b/include/kernel/kernel/sysmem.h
@@ -7,20 +7,18 @@
extern "C" {
#endif
-typedef int SceKernelMemBlockType;
-
-enum {
- SCE_KERNEL_MEMBLOCK_TYPE_USER_RW = 0x0c20d060,
- SCE_KERNEL_MEMBLOCK_TYPE_USER_RW_UNCACHE = 0x0c208060,
- SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_RW = 0x0c80d060,
- SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_NC_RW = 0x0d808060,
- SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW = 0x09408060,
- SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_RX = 0x1020D005,
- SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_RW = 0x1020D006,
- SCE_KERNEL_MEMBLOCK_TYPE_SHARED_RX = 0x390D050,
- SCE_KERNEL_MEMBLOCK_TYPE_USER_RX = 0xC20D050,
- SCE_KERNEL_MEMBLOCK_TYPE_RW_UNK0 = 0x6020D006
-};
+typedef enum SceKernelMemBlockType {
+ SCE_KERNEL_MEMBLOCK_TYPE_SHARED_RX = 0x0390D050,
+ SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW = 0x09408060,
+ SCE_KERNEL_MEMBLOCK_TYPE_USER_RW_UNCACHE = 0x0C208060,
+ SCE_KERNEL_MEMBLOCK_TYPE_USER_RX = 0x0C20D050,
+ SCE_KERNEL_MEMBLOCK_TYPE_USER_RW = 0x0C20D060,
+ SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_RW = 0x0C80D060,
+ SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_NC_RW = 0x0D808060,
+ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_RX = 0x1020D005,
+ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_RW = 0x1020D006,
+ SCE_KERNEL_MEMBLOCK_TYPE_RW_UNK0 = 0x6020D006
+} SceKernelMemBlockType;
// specific to 3.60
typedef struct SceKernelAllocMemBlockKernelOpt {
@@ -68,10 +66,10 @@ typedef struct SceCreateUidObjOpt {
SceUInt32 field_18;
} SceCreateUidObjOpt;
-enum {
- SCE_KERNEL_MODEL_VITA = 0x10000,
- SCE_KERNEL_MODEL_VITATV = 0x20000
-};
+typedef enum SceKernelModel {
+ SCE_KERNEL_MODEL_VITA = 0x10000,
+ SCE_KERNEL_MODEL_VITATV = 0x20000
+} SceKernelModel;
#define SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_HAS_ALIGNMENT 0x00000004U
diff --git a/include/kernel/kernel/threadmgr.h b/include/kernel/kernel/threadmgr.h
index 9ae804c..b4814e2 100644
--- a/include/kernel/kernel/threadmgr.h
+++ b/include/kernel/kernel/threadmgr.h
@@ -89,8 +89,7 @@ typedef struct SceKernelThreadRunStatus {
} SceKernelThreadRunStatus;
/* Sure there must be more than this, but haven't seen them */
-typedef enum SceThreadStatus
-{
+typedef enum SceThreadStatus {
SCE_THREAD_RUNNING = 1,
SCE_THREAD_READY = 2,
SCE_THREAD_WAITING = 4,
@@ -134,7 +133,7 @@ int sceKernelDeleteThread(SceUID thid);
/**
* Start a created thread
*
- * @param thid - Thread id from sceKernelCreateThread
+ * @param thid - Thread id from ::sceKernelCreateThread
* @param arglen - Length of the data pointed to by argp, in bytes
* @param argp - Pointer to the arguments.
*/
@@ -213,7 +212,7 @@ int sceKernelChangeCurrentThreadAttr(int unknown, SceUInt attr);
/**
* Change the threads current priority.
*
- * @param thid - The ID of the thread (from sceKernelCreateThread or sceKernelGetThreadId)
+ * @param thid - The ID of the thread (from ::sceKernelCreateThread or ::sceKernelGetThreadId)
* @param priority - The new priority (the lower the number the higher the priority)
*
* @par Example:
@@ -371,7 +370,7 @@ int sceKernelDeleteSema(SceUID semaid);
* sceKernelSignalSema(semaid, 1);
* @endcode
*
- * @param semaid - The sema id returned from sceKernelCreateSema
+ * @param semaid - The sema id returned from ::sceKernelCreateSema
* @param signal - The amount to signal the sema (i.e. if 2 then increment the sema by 2)
*
* @return < 0 On error.
@@ -386,7 +385,7 @@ int sceKernelSignalSema(SceUID semaid, int signal);
* sceKernelWaitSema(semaid, 1, 0);
* @endcode
*
- * @param semaid - The sema id returned from sceKernelCreateSema
+ * @param semaid - The sema id returned from ::sceKernelCreateSema
* @param signal - The value to wait for (i.e. if 1 then wait till reaches a signal state of 1)
* @param timeout - Timeout in microseconds (assumed).
*
@@ -402,7 +401,7 @@ int sceKernelWaitSema(SceUID semaid, int signal, SceUInt *timeout);
* sceKernelWaitSemaCB(semaid, 1, 0);
* @endcode
*
- * @param semaid - The sema id returned from sceKernelCreateSema
+ * @param semaid - The sema id returned from ::sceKernelCreateSema
* @param signal - The value to wait for (i.e. if 1 then wait till reaches a signal state of 1)
* @param timeout - Timeout in microseconds (assumed).
*
@@ -423,7 +422,7 @@ int sceKernelPollSema(SceUID semaid, int signal);
/**
* Cancels a semaphore
*
- * @param semaid - The sema id returned from sceKernelCreateSema
+ * @param semaid - The sema id returned from ::sceKernelCreateSema
* @param setCount - The new lock count of the semaphore
* @param numWaitThreads - Number of threads waiting for the semaphore
* @return < 0 On error.
@@ -492,7 +491,7 @@ SceUID sceKernelCreateMutex(const char *name, SceUInt attr, int initCount, SceKe
/**
* Destroy a mutex
*
- * @param mutexid - The mutex id returned from sceKernelCreateMutex
+ * @param mutexid - The mutex id returned from ::sceKernelCreateMutex
* @return Returns the value 0 if it's successful, otherwise -1
*/
int sceKernelDeleteMutex(SceUID mutexid);
@@ -508,7 +507,7 @@ int sceKernelOpenMutex(const char *name);
/**
* Close a mutex
*
- * @param mutexid - The mutex id returned from sceKernelCreateMutex
+ * @param mutexid - The mutex id returned from ::sceKernelCreateMutex
* @return Returns the value 0 if it's successful, otherwise -1
*/
int sceKernelCloseMutex(SceUID mutexid);
@@ -516,7 +515,7 @@ int sceKernelCloseMutex(SceUID mutexid);
/**
* Lock a mutex
*
- * @param mutexid - The mutex id returned from sceKernelCreateMutex
+ * @param mutexid - The mutex id returned from ::sceKernelCreateMutex
* @param lockCount - The value to increment to the lock count of the mutex
* @param timeout - Timeout in microseconds (assumed)
* @return < 0 On error.
@@ -526,7 +525,7 @@ int sceKernelLockMutex(SceUID mutexid, int lockCount, unsigned int *timeout);
/**
* Lock a mutex and handle callbacks if necessary.
*
- * @param mutexid - The mutex id returned from sceKernelCreateMutex
+ * @param mutexid - The mutex id returned from ::sceKernelCreateMutex
* @param lockCount - The value to increment to the lock count of the mutex
* @param timeout - Timeout in microseconds (assumed)
* @return < 0 On error.
@@ -536,7 +535,7 @@ int sceKernelLockMutexCB(SceUID mutexid, int lockCount, unsigned int *timeout);
/**
* Try to lock a mutex (non-blocking)
*
- * @param mutexid - The mutex id returned from sceKernelCreateMutex
+ * @param mutexid - The mutex id returned from ::sceKernelCreateMutex
* @param lockCount - The value to increment to the lock count of the mutex
* @return < 0 On error.
*/
@@ -545,7 +544,7 @@ int sceKernelTryLockMutex(SceUID mutexid, int lockCount);
/**
* Try to unlock a mutex (non-blocking)
*
- * @param mutexid - The mutex id returned from sceKernelCreateMutex
+ * @param mutexid - The mutex id returned from ::sceKernelCreateMutex
* @param unlockCount - The value to decrement to the lock count of the mutex
* @return < 0 On error.
*/
@@ -554,7 +553,7 @@ int sceKernelUnlockMutex(SceUID mutexid, int unlockCount);
/**
* Cancels a mutex
*
- * @param mutexid - The mutex id returned from sceKernelCreateMutex
+ * @param mutexid - The mutex id returned from ::sceKernelCreateMutex
* @param newCount - The new lock count of the mutex
* @param numWaitThreads - Number of threads waiting for the mutex
* @return < 0 On error.
@@ -629,7 +628,7 @@ SceUID sceKernelCreateEventFlag(const char *name, int attr, int bits, SceKernelE
/**
* Set an event flag bit pattern.
*
- * @param evid - The event id returned by sceKernelCreateEventFlag.
+ * @param evid - The event id returned by ::sceKernelCreateEventFlag.
* @param bits - The bit pattern to set.
*
* @return < 0 On error
@@ -649,7 +648,7 @@ int sceKernelClearEventFlag(SceUID evid, unsigned int bits);
/**
* Poll an event flag for a given bit pattern.
*
- * @param evid - The event id returned by sceKernelCreateEventFlag.
+ * @param evid - The event id returned by ::sceKernelCreateEventFlag.
* @param bits - The bit pattern to poll for.
* @param wait - Wait type, one or more of ::SceEventFlagWaitTypes or'ed together
* @param outBits - The bit pattern that was matched.
@@ -660,7 +659,7 @@ int sceKernelPollEventFlag(int evid, unsigned int bits, unsigned int wait, unsig
/**
* Wait for an event flag for a given bit pattern.
*
- * @param evid - The event id returned by sceKernelCreateEventFlag.
+ * @param evid - The event id returned by ::sceKernelCreateEventFlag.
* @param bits - The bit pattern to poll for.
* @param wait - Wait type, one or more of ::SceEventFlagWaitTypes or'ed together
* @param outBits - The bit pattern that was matched.
@@ -672,7 +671,7 @@ int sceKernelWaitEventFlag(int evid, unsigned int bits, unsigned int wait, unsig
/**
* Wait for an event flag for a given bit pattern with callback.
*
- * @param evid - The event id returned by sceKernelCreateEventFlag.
+ * @param evid - The event id returned by ::sceKernelCreateEventFlag.
* @param bits - The bit pattern to poll for.
* @param wait - Wait type, one or more of ::SceEventFlagWaitTypes or'ed together
* @param outBits - The bit pattern that was matched.
@@ -684,7 +683,7 @@ int sceKernelWaitEventFlagCB(int evid, unsigned int bits, unsigned int wait, uns
/**
* Delete an event flag
*
- * @param evid - The event id returned by sceKernelCreateEventFlag.
+ * @param evid - The event id returned by ::sceKernelCreateEventFlag.
*
* @return < 0 On error
*/