mirror of
https://github.com/SysRay/psOff_public.git
synced 2024-11-23 06:19:41 +00:00
libScePosix| + sem_count
This commit is contained in:
parent
f2ab0a150d
commit
4e0e3280d9
@ -1,7 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.24)
|
||||
include(ExternalProject)
|
||||
|
||||
set(PSOFF_LIB_VERSION v.0.2)
|
||||
set(PSOFF_LIB_VERSION v.0.3)
|
||||
set(PSOFF_RENDER_VERSION v.0.5-nightly_04.05.24)
|
||||
|
||||
set(ProjectName psOff_${CMAKE_BUILD_TYPE})
|
||||
|
@ -40,6 +40,14 @@ EXPORT SYSV_ABI int __NID(sem_post)(boost::interprocess::interprocess_semaphore*
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int __NID(sem_getvalue)(boost::interprocess::interprocess_semaphore** sem) {
|
||||
if (sem == nullptr || *sem == nullptr) {
|
||||
return POSIX_SET(ErrCode::_ESRCH);
|
||||
}
|
||||
return (*sem)->get_count();
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int __NID(sem_reltimedwait_np)(boost::interprocess::interprocess_semaphore** sem, SceKernelTimespec* reltime) {
|
||||
auto now = boost::posix_time::microsec_clock::universal_time();
|
||||
auto timeout = boost::posix_time::seconds(reltime->tv_sec) + boost::posix_time::microsec(reltime->tv_nsec / 1000);
|
||||
|
Loading…
Reference in New Issue
Block a user