6 int (*scePthreadCreate
)(ScePthread
*thread
, const ScePthreadAttr
*attr
, void *(*entry
) (void *), void *arg
, const char *name
);
7 void (*scePthreadExit
)(void *value
);
8 int (*scePthreadDetach
)(ScePthread thread
);
9 int (*scePthreadJoin
)(ScePthread thread
, void **value_ptr
);
10 void (*scePthreadYield
)(void);
11 ScePthread (*scePthreadSelf
)(void);
12 int (*scePthreadCancel
)(ScePthread thread
);
14 int (*scePthreadMutexInit
)(ScePthreadMutex
*mutex
, const ScePthreadMutexattr
*attr
, const char *name
);
15 int (*scePthreadMutexDestroy
)(ScePthreadMutex
*mutex
);
16 int (*scePthreadMutexLock
)(ScePthreadMutex
*mutex
);
17 int (*scePthreadMutexTrylock
)(ScePthreadMutex
*mutex
);
18 int (*scePthreadMutexTimedlock
)(ScePthreadMutex
*mutex
, SceKernelUseconds usec
);
19 int (*scePthreadMutexUnlock
)(ScePthreadMutex
*mutex
);
21 void initPthread(void) {
23 loadModule("libkernel.sprx", &libkernel
);
25 RESOLVE(libkernel
, scePthreadCreate
);
26 RESOLVE(libkernel
, scePthreadExit
);
27 RESOLVE(libkernel
, scePthreadDetach
);
28 RESOLVE(libkernel
, scePthreadJoin
);
29 RESOLVE(libkernel
, scePthreadYield
);
30 RESOLVE(libkernel
, scePthreadSelf
);
31 RESOLVE(libkernel
, scePthreadCancel
);
33 RESOLVE(libkernel
, scePthreadMutexInit
);
34 RESOLVE(libkernel
, scePthreadMutexDestroy
);
35 RESOLVE(libkernel
, scePthreadMutexLock
);
36 RESOLVE(libkernel
, scePthreadMutexTrylock
);
37 RESOLVE(libkernel
, scePthreadMutexTimedlock
);
38 RESOLVE(libkernel
, scePthreadMutexUnlock
);