Skip to content

Commit cd66532

Browse files
committed
Adds vfs_busy and vfs_unbusy
1 parent b9ed877 commit cd66532

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

kernel-1100/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ impl okf::Kernel for Kernel {
3636
const ACCEPT_MTX: StaticMut<Self::Mtx>;
3737
#[offset(0x15415B0)]
3838
const M_TEMP: StaticMut<Self::Malloc>;
39+
const MBF_MNTLSTLOCK: c_int = 2;
40+
const MBF_NOWAIT: c_int = 1;
3941
#[offset(0x1A6AD60)]
4042
const MOUNTLIST: StaticMut<TailQueue<Self::Mount>>;
4143
#[offset(0x22D0F10)]
@@ -157,6 +159,12 @@ impl okf::Kernel for Kernel {
157159
#[offset(0x264620)]
158160
unsafe fn solisten(self, so: *mut Self::Socket, backlog: c_int, td: *mut Self::Thread)
159161
-> c_int;
162+
163+
#[offset(0x37BAF0)]
164+
unsafe fn vfs_busy(self, mp: *mut Self::Mount, flags: c_int) -> c_int;
165+
166+
#[offset(0x37BC60)]
167+
unsafe fn vfs_unbusy(self, mp: *mut Self::Mount);
160168
}
161169

162170
unsafe impl Send for Kernel {}

src/lib.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ macro_rules! kernel {
4646
pub trait Kernel: MappedKernel {
4747
const ACCEPT_MTX: StaticMut<Self::Mtx>;
4848
const M_TEMP: StaticMut<Self::Malloc>;
49+
const MBF_MNTLSTLOCK: c_int;
50+
const MBF_NOWAIT: c_int;
4951
const MOUNTLIST: StaticMut<TailQueue<Self::Mount>>;
5052
const MOUNTLIST_MTX: StaticMut<Self::Mtx>;
5153
const NOCPU: u32;
@@ -210,6 +212,14 @@ pub trait Kernel: MappedKernel {
210212
/// - `td` cannot be null.
211213
unsafe fn solisten(self, so: *mut Self::Socket, backlog: c_int, td: *mut Self::Thread)
212214
-> c_int;
215+
216+
/// # Safety
217+
/// `mp` cannot be null.
218+
unsafe fn vfs_busy(self, mp: *mut Self::Mount, flags: c_int) -> c_int;
219+
220+
/// # Safety
221+
/// `mp` cannot be null.
222+
unsafe fn vfs_unbusy(self, mp: *mut Self::Mount);
213223
}
214224

215225
/// Mapped PS4 kernel in the memory.

0 commit comments

Comments
 (0)