mirror of
https://github.com/RPCSX/rpcsx.git
synced 2025-12-06 07:12:14 +01:00
ipmi: fixed respond sync, get message, try get message, try send message event: detach event emitter from file signals: basic implementation linker: fixed zero symbol relocation, fixed exec relocation shared_cv/mutex: implement eintr response support shared_cv: fixed possible loop instead of wait ipmi: implement invoke async, respond async, get result, get client app id, client get name rpcsx-os: add safemode flag
24 lines
513 B
C++
24 lines
513 B
C++
#include "sys/sysproto.hpp"
|
|
#include "thread/Thread.hpp"
|
|
#include "thread/Process.hpp"
|
|
#include <mutex>
|
|
#include <string>
|
|
|
|
orbis::SysResult orbis::sys___getcwd(Thread *thread, ptr<char> buf,
|
|
uint buflen) {
|
|
|
|
std::string cwd;
|
|
|
|
{
|
|
std::lock_guard lock(thread->tproc->mtx);
|
|
cwd = std::string(thread->tproc->cwd);
|
|
}
|
|
|
|
if (buflen < cwd.size() + 1) {
|
|
return ErrorCode::NOMEM;
|
|
}
|
|
|
|
ORBIS_RET_ON_ERROR(uwriteRaw(buf, cwd.data(), cwd.size() + 1));
|
|
return{};
|
|
}
|