File tree 3 files changed +5
-3
lines changed
3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ impl PortReadWrite for u32 {
63
63
}
64
64
65
65
/// An I/O port.
66
- #[ derive( Debug ) ]
66
+ #[ derive( Debug , Clone , PartialEq , Eq ) ]
67
67
pub struct Port < T : PortReadWrite > {
68
68
port : u16 ,
69
69
phantom : PhantomData < T > ,
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ impl fmt::Debug for SegmentSelector {
50
50
/// switching between user and kernel mode or for loading a TSS.
51
51
///
52
52
/// The GDT has a fixed size of 8 entries, trying to add more entries will panic.
53
- #[ derive( Debug ) ]
53
+ #[ derive( Debug , Clone ) ]
54
54
pub struct GlobalDescriptorTable {
55
55
table : [ u64 ; 8 ] ,
56
56
next_free : usize ,
@@ -109,7 +109,7 @@ impl GlobalDescriptorTable {
109
109
///
110
110
/// Segmentation is no longer supported in 64-bit mode, so most of the descriptor
111
111
/// contents are ignored.
112
- #[ derive( Debug ) ]
112
+ #[ derive( Debug , Clone ) ]
113
113
pub enum Descriptor {
114
114
/// Descriptor for a code or data segment.
115
115
///
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ use {PrivilegeLevel, VirtAddr};
31
31
/// [AMD64 manual volume 2](https://support.amd.com/TechDocs/24593.pdf)
32
32
/// (with slight modifications).
33
33
#[ allow( missing_debug_implementations) ]
34
+ #[ derive( Clone ) ]
34
35
#[ repr( C ) ]
35
36
pub struct InterruptDescriptorTable {
36
37
/// A divide by zero exception (`#DE`) occurs when the denominator of a DIV instruction or
@@ -637,6 +638,7 @@ impl EntryOptions {
637
638
}
638
639
639
640
/// Represents the exception stack frame pushed by the CPU on exception entry.
641
+ #[ derive( Clone ) ]
640
642
#[ repr( C ) ]
641
643
pub struct ExceptionStackFrame {
642
644
/// This value points to the instruction that should be executed when the interrupt
You can’t perform that action at this time.
0 commit comments