add register fd and fix bug in mutex
continuous-integration/drone/push Build is passing

Signed-off-by: Julien CLEMENT <julien.clement@epita.fr>
This commit is contained in:
juju committed 2022-12-23 01:08:00 +01:00
1 parent d66fb31c9a
commit e5eb05eb3d
7 files changed
+23 -6

No files matched your search

+5 -1
View File
@@ -211,7 +211,8 @@ impl ATABus {
}
}
pub fn sync_read_block(&mut self, lba: u32) {
#[allow(dead_code)]
pub fn sync_read_block(&mut self, lba: u32) -> [u8; CD_SECTOR_SIZE] {
let mut packet = SCSIPacket::new();
packet.op_code = SCSI_READ_12;
@@ -246,6 +247,8 @@ impl ATABus {
}
}
self.wait_command_end();
self.block
}
pub async fn read_block(&mut self, lba: u32) -> [u8; CD_SECTOR_SIZE] {
@@ -321,6 +324,7 @@ impl ATABus {
}
#[allow(dead_code)]
pub async fn print_block(lba: u32) {
let block = DRIVE.lock().await.as_mut().unwrap().read_block(lba).await;
serial_println!("{:x?}", block);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.