Skip to content

Commit

Permalink
Add thread affinity funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
isage committed Apr 17, 2022
1 parent ec18280 commit fd84c21
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions include/psp2/kernel/threadmgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,25 @@ int sceKernelGetThreadInfo(SceUID thid, SceKernelThreadInfo *info);
*/
int sceKernelGetThreadRunStatus(SceUID thid, SceKernelThreadRunStatus *status);

/**
* Retrive the cpu affinity mask of a thread.
*
* @param thid - UID of the thread to retrieve affinity mask for.
*
* @return current affinity mask if >= 0, otherwise the error code.
*/
int sceKernelGetThreadCpuAffinityMask(SceUID thid);

/**
* Set the cpu affinity mask of a thread.
*
* @param thid - UID of the thread to retrieve affinity mask for.
* @param mask - New cpu affinity mask.
*
* @return 0 if successful, otherwise the error code.
*/
int sceKernelChangeThreadCpuAffinityMask(SceUID thid, int mask);


/* Semaphores. */

Expand Down

0 comments on commit fd84c21

Please sign in to comment.