@@ -29,6 +29,7 @@ pub mod malloc;
29
29
pub mod mount;
30
30
pub mod namei;
31
31
pub mod notification;
32
+ pub mod panic;
32
33
pub mod pcpu;
33
34
pub mod queue;
34
35
pub mod socket;
@@ -37,14 +38,6 @@ pub mod ucred;
37
38
pub mod uio;
38
39
pub mod vnode;
39
40
40
- #[ cfg( fw = "1100" ) ]
41
- #[ macro_export]
42
- macro_rules! kernel {
43
- ( ) => {
44
- okf_1100:: Kernel
45
- } ;
46
- }
47
-
48
41
/// Provides methods to access the PS4 kernel for a specific version.
49
42
///
50
43
/// All methods here are a direct call to the kernel so most of them are unsafe and hard to use.
@@ -63,7 +56,7 @@ pub trait Kernel: MappedKernel {
63
56
const MOUNTLIST : StaticMut < TailQueue < Self :: Mount > > ;
64
57
const MOUNTLIST_MTX : StaticMut < Self :: Mtx > ;
65
58
const NOCPU : u32 ;
66
- const PANIC : Function < extern "C" fn ( * const c_char , ...) -> !> ;
59
+ const PANIC : Function < unsafe extern "C" fn ( * const c_char , ...) -> !> ;
67
60
const VDIR : c_int ;
68
61
const VOP_LOOKUP : StaticMut < Self :: VnodeOp > ;
69
62
const VOP_READ : StaticMut < Self :: VnodeOp > ;
@@ -397,7 +390,9 @@ impl<T> Offset for StaticMut<T> {
397
390
}
398
391
}
399
392
400
- /// Implementation of [`StaticOps`] for [`StaticMut`].
393
+ /// Implementation of [`OffsetOps`] for [`StaticMut`].
394
+ ///
395
+ /// This type does not implement [DerefMut](core::ops::DerefMut) by design.
401
396
pub struct MutableOps < T > ( * mut T ) ;
402
397
403
398
impl < T > MutableOps < T > {
@@ -462,7 +457,7 @@ impl<T: KernelFn> Clone for Function<T> {
462
457
impl < T : KernelFn > Copy for Function < T > { }
463
458
464
459
impl < T : KernelFn > Offset for Function < T > {
465
- type Ops = ImmutableOps < T > ;
460
+ type Ops = FunctionOps < T > ;
466
461
467
462
fn get ( self ) -> usize {
468
463
self . off
@@ -506,7 +501,7 @@ pub trait KernelFn: Copy {
506
501
unsafe fn from_addr ( addr : * const u8 ) -> Self ;
507
502
}
508
503
509
- impl < R , A1 > KernelFn for extern "C" fn ( A1 , ...) -> R {
504
+ impl < R , A1 > KernelFn for unsafe extern "C" fn ( A1 , ...) -> R {
510
505
unsafe fn from_addr ( addr : * const u8 ) -> Self {
511
506
unsafe { transmute ( addr) }
512
507
}
0 commit comments