mirror of
https://github.com/sgmarz/osblog.git
synced 2024-11-24 02:16:19 +04:00
Remove reference when using ref
This commit is contained in:
parent
67f30af9a9
commit
8f55a9a6ec
@ -354,7 +354,7 @@ pub fn pending(bd: &mut BlockDevice) {
|
||||
// Here we need to check the used ring and then free the resources
|
||||
// given by the descriptor id.
|
||||
unsafe {
|
||||
let ref queue = &*bd.queue;
|
||||
let ref queue = *bd.queue;
|
||||
while bd.ack_used_idx != queue.used.idx {
|
||||
let ref elem = queue.used.ring[bd.ack_used_idx as usize];
|
||||
bd.ack_used_idx = (bd.ack_used_idx + 1) % VIRTIO_RING_SIZE as u16;
|
||||
|
@ -186,15 +186,9 @@ extern "C" fn kinit_hart(hartid: usize) {
|
||||
// We have to store the kernel's table. The tables will be moved
|
||||
// back and forth between the kernel's table and user
|
||||
// applicatons' tables.
|
||||
cpu::mscratch_write(
|
||||
(&mut cpu::KERNEL_TRAP_FRAME[hartid]
|
||||
as *mut cpu::TrapFrame)
|
||||
as usize,
|
||||
);
|
||||
// Copy the same mscratch over to the supervisor version of the
|
||||
// same register.
|
||||
cpu::sscratch_write(cpu::mscratch_read());
|
||||
cpu::KERNEL_TRAP_FRAME[hartid].hartid = hartid;
|
||||
// cpu::KERNEL_TRAP_FRAME[hartid].hartid = hartid;
|
||||
// We can't do the following until zalloc() is locked, but we
|
||||
// don't have locks, yet :( cpu::KERNEL_TRAP_FRAME[hartid].satp
|
||||
// = cpu::KERNEL_TRAP_FRAME[0].satp;
|
||||
|
Loading…
Reference in New Issue
Block a user