1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-22 08:06:17 +04:00

fix some compile warnings, and fix deprecated qemu option

This commit is contained in:
prettykernel 2020-05-31 16:06:38 +08:00
parent 425daba70e
commit 2dfca0c445
3 changed files with 4 additions and 5 deletions

View File

@ -91,7 +91,7 @@ ifeq ($(BOARD), qemu)
qemu_opts += \
-drive format=qcow2,file=$(USER_QCOW2),media=disk,cache=writeback,id=sfsimg,if=none \
-device ahci,id=ahci0 \
-device ide-drive,drive=sfsimg,bus=ahci0.0
-device ide-hd,drive=sfsimg,bus=ahci0.0
endif
ifeq ($(PCI_PASSTHRU), )
qemu_net_opts += \

View File

@ -21,7 +21,6 @@ use bitmap_allocator::BitAlloc;
use buddy_system_allocator::Heap;
use core::mem;
use core::mem::size_of;
use lazy_static::*;
use log::*;
pub use rcore_memory::memory_set::{handler::*, MemoryArea, MemoryAttr};
use rcore_memory::*;

View File

@ -147,14 +147,14 @@ impl<T: ?Sized, S: MutexSupport> Mutex<T, S> {
pub fn ensure_support(&self) {
let initialization = self.support_initialization.load(Ordering::Relaxed);
if (initialization == 2) {
if initialization == 2 {
return;
};
if (initialization == 1
if initialization == 1
|| self
.support_initialization
.compare_and_swap(0, 1, Ordering::Acquire)
!= 0)
!= 0
{
// Wait for another thread to initialize
while self.support_initialization.load(Ordering::Acquire) == 1 {