mirror of
https://github.com/rcore-os/rCore.git
synced 2024-11-22 08:06:17 +04:00
Merge pull request #56 from prettykernel/master
fix some compile warnings, and fix deprecated qemu option
This commit is contained in:
commit
2a7d48b528
@ -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 += \
|
||||
|
@ -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::*;
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user