Skip to content

Commit

Permalink
Fix cpu corelock
Browse files Browse the repository at this point in the history
  • Loading branch information
Princess-of-Sleeping authored and d3m3vilurr committed Jan 12, 2022
1 parent 15b7281 commit 1d68ddb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion db/360/SceSysmem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ modules:
kernel: true
nid: 0x54BF2BAB
functions:
ksceKernelCorelockContextInitialize: 0x4CD4D921
ksceKernelCorelockInitialize: 0x4CD4D921
ksceKernelCorelockLock: 0x9D72DD1B
ksceKernelCorelockUnlock: 0xA5C9DBBA
ksceKernelCpuBranchPredictorInvalidateAll: 0x4C4C7D6B
Expand Down
11 changes: 2 additions & 9 deletions include/psp2kern/kernel/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,22 +254,15 @@ int ksceKernelCpuSpinLockIrqSave(int *addr);
*/
int ksceKernelCpuSpinLockIrqRestore(int *addr, int flags);

typedef enum SceCorelockCore {
SCE_CORELOCK_CORE0 = 0,
SCE_CORELOCK_CORE1 = 1,
SCE_CORELOCK_CORE2 = 2,
SCE_CORELOCK_CORE3 = 3
} SceCorelockCore;

typedef struct SceCorelockContext {
int lock;
int16_t core_count;
int16_t last_wait_core;
} SceCorelockContext;

void ksceKernelCorelockContextInitialize(SceCorelockContext *ctx);
void ksceKernelCorelockInitialize(SceCorelockContext *ctx);

void ksceKernelCorelockLock(SceCorelockContext *ctx, int core);
void ksceKernelCorelockLock(SceCorelockContext *ctx, SceUInt32 core);
void ksceKernelCorelockUnlock(SceCorelockContext *ctx);

#ifdef __cplusplus
Expand Down

0 comments on commit 1d68ddb

Please sign in to comment.