mirror of
https://github.com/rcore-os/rCore.git
synced 2024-11-22 08:06:17 +04:00
Merge branch 'master' into EatenBagpipe-master
This commit is contained in:
commit
1176446f83
@ -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 += \
|
||||
|
@ -190,6 +190,7 @@ impl Context {
|
||||
Load sp, 0(a1)
|
||||
Load s11, 1*XLENB(sp)
|
||||
csrw satp, s11
|
||||
sfence.vma
|
||||
Load ra, 0*XLENB(sp)
|
||||
Load s0, 2*XLENB(sp)
|
||||
Load s1, 3*XLENB(sp)
|
||||
|
@ -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::*;
|
||||
|
@ -158,14 +158,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