mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-16 07:20:59 +00:00
Yield before flushing io buffers in fsync (sys_fs) (#5506)
This commit is contained in:
parent
4ea76def7c
commit
3c9f03968c
@ -206,18 +206,18 @@ error_code cellFsLseek(u32 fd, s64 offset, u32 whence, vm::ptr<u64> pos)
|
|||||||
return sys_fs_lseek(fd, offset, whence, pos);
|
return sys_fs_lseek(fd, offset, whence, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
error_code cellFsFdatasync(u32 fd)
|
error_code cellFsFdatasync(ppu_thread& ppu, u32 fd)
|
||||||
{
|
{
|
||||||
cellFs.trace("cellFsFdatasync(fd=%d)", fd);
|
cellFs.trace("cellFsFdatasync(fd=%d)", fd);
|
||||||
|
|
||||||
return sys_fs_fdatasync(fd);
|
return sys_fs_fdatasync(ppu, fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
error_code cellFsFsync(u32 fd)
|
error_code cellFsFsync(ppu_thread& ppu, u32 fd)
|
||||||
{
|
{
|
||||||
cellFs.trace("cellFsFsync(fd=%d)", fd);
|
cellFs.trace("cellFsFsync(fd=%d)", fd);
|
||||||
|
|
||||||
return sys_fs_fsync(fd);
|
return sys_fs_fsync(ppu, fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
error_code cellFsFGetBlockSize(u32 fd, vm::ptr<u64> sector_size, vm::ptr<u64> block_size)
|
error_code cellFsFGetBlockSize(u32 fd, vm::ptr<u64> sector_size, vm::ptr<u64> block_size)
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
|
#include "sys_sync.h"
|
||||||
#include "sys_fs.h"
|
#include "sys_fs.h"
|
||||||
|
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
@ -1287,7 +1288,7 @@ error_code sys_fs_lseek(u32 fd, s64 offset, s32 whence, vm::ptr<u64> pos)
|
|||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
error_code sys_fs_fdatasync(u32 fd)
|
error_code sys_fs_fdatasync(ppu_thread& ppu, u32 fd)
|
||||||
{
|
{
|
||||||
sys_fs.trace("sys_fs_fdadasync(fd=%d)", fd);
|
sys_fs.trace("sys_fs_fdadasync(fd=%d)", fd);
|
||||||
|
|
||||||
@ -1298,12 +1299,12 @@ error_code sys_fs_fdatasync(u32 fd)
|
|||||||
return CELL_EBADF;
|
return CELL_EBADF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lv2_obj::sleep(ppu);
|
||||||
file->file.sync();
|
file->file.sync();
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
error_code sys_fs_fsync(u32 fd)
|
error_code sys_fs_fsync(ppu_thread& ppu, u32 fd)
|
||||||
{
|
{
|
||||||
sys_fs.trace("sys_fs_fsync(fd=%d)", fd);
|
sys_fs.trace("sys_fs_fsync(fd=%d)", fd);
|
||||||
|
|
||||||
@ -1314,8 +1315,8 @@ error_code sys_fs_fsync(u32 fd)
|
|||||||
return CELL_EBADF;
|
return CELL_EBADF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lv2_obj::sleep(ppu);
|
||||||
file->file.sync();
|
file->file.sync();
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -374,8 +374,8 @@ error_code sys_fs_unlink(vm::cptr<char> path);
|
|||||||
error_code sys_fs_access(vm::cptr<char> path, s32 mode);
|
error_code sys_fs_access(vm::cptr<char> path, s32 mode);
|
||||||
error_code sys_fs_fcntl(u32 fd, u32 op, vm::ptr<void> arg, u32 size);
|
error_code sys_fs_fcntl(u32 fd, u32 op, vm::ptr<void> arg, u32 size);
|
||||||
error_code sys_fs_lseek(u32 fd, s64 offset, s32 whence, vm::ptr<u64> pos);
|
error_code sys_fs_lseek(u32 fd, s64 offset, s32 whence, vm::ptr<u64> pos);
|
||||||
error_code sys_fs_fdatasync(u32 fd);
|
error_code sys_fs_fdatasync(ppu_thread& ppu, u32 fd);
|
||||||
error_code sys_fs_fsync(u32 fd);
|
error_code sys_fs_fsync(ppu_thread& ppu, u32 fd);
|
||||||
error_code sys_fs_fget_block_size(u32 fd, vm::ptr<u64> sector_size, vm::ptr<u64> block_size, vm::ptr<u64> arg4, vm::ptr<s32> arg5);
|
error_code sys_fs_fget_block_size(u32 fd, vm::ptr<u64> sector_size, vm::ptr<u64> block_size, vm::ptr<u64> arg4, vm::ptr<s32> arg5);
|
||||||
error_code sys_fs_get_block_size(vm::cptr<char> path, vm::ptr<u64> sector_size, vm::ptr<u64> block_size, vm::ptr<u64> arg4);
|
error_code sys_fs_get_block_size(vm::cptr<char> path, vm::ptr<u64> sector_size, vm::ptr<u64> block_size, vm::ptr<u64> arg4);
|
||||||
error_code sys_fs_truncate(vm::cptr<char> path, u64 size);
|
error_code sys_fs_truncate(vm::cptr<char> path, u64 size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user