Skip to content

Commit cda99bf

Browse files
committed
Adds VOP_UNLOCK
1 parent 35d3055 commit cda99bf

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

kernel-1100/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@ impl okf::Kernel for Kernel {
180180

181181
#[offset(0x37BC60)]
182182
unsafe fn vfs_unbusy(self, mp: *mut Self::Mount);
183+
184+
#[offset(0x1300A0)]
185+
unsafe fn vop_unlock(self, vec: *mut Self::VopVector, args: *mut Self::VopUnlock) -> c_int;
183186
}
184187

185188
unsafe impl Send for Kernel {}

kernel-1100/src/vnode.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ pub struct Vnode {
99
}
1010

1111
impl okf::vnode::Vnode<Kernel> for Vnode {
12-
fn ops(&self) -> &'static VopVector {
13-
unsafe { &*self.ops }
12+
fn ops(&self) -> *mut VopVector {
13+
self.ops
1414
}
1515
}
1616

src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,11 @@ pub trait Kernel: MappedKernel {
234234
/// # Safety
235235
/// `mp` cannot be null.
236236
unsafe fn vfs_unbusy(self, mp: *mut Self::Mount);
237+
238+
/// # Safety
239+
/// - `vec` cannot be null.
240+
/// - `args` cannot be null.
241+
unsafe fn vop_unlock(self, vec: *mut Self::VopVector, args: *mut Self::VopUnlock) -> c_int;
237242
}
238243

239244
/// Mapped PS4 kernel in the memory.

src/vnode/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ mod op;
66
/// Represents `vnode` structure.
77
pub trait Vnode<K: Kernel>: Sized {
88
/// Returns `v_op`.
9-
fn ops(&self) -> &'static K::VopVector;
9+
fn ops(&self) -> *mut K::VopVector;
1010
}
1111

1212
/// Represents `vop_vector` structure.

0 commit comments

Comments
 (0)