Register denali on yellowstone, handle read requests.
This commit is contained in:
parent
a5cdd23f0b
commit
6f0dfa8719
6 changed files with 56 additions and 22 deletions
|
|
@ -197,7 +197,6 @@ pub fn spawn_irq_thread(controller: Arc<AhciController>) -> thread::JoinHandle {
|
|||
});
|
||||
loop {
|
||||
irq_port.recv_null().unwrap();
|
||||
mammoth::debug!("Interrupt!");
|
||||
controller.handle_irq();
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -11,8 +11,10 @@ use mammoth::{
|
|||
zion::z_err_t,
|
||||
};
|
||||
|
||||
use denali::ahci::{self, identify_ports, spawn_irq_thread, AhciController};
|
||||
use denali::ahci::{identify_ports, spawn_irq_thread, AhciController};
|
||||
use denali::{denali_server::DenaliServerImpl, AsyncDenaliServer};
|
||||
use yellowstone_yunq::RegisterEndpointRequest;
|
||||
use yunq::server::AsyncYunqServer;
|
||||
|
||||
define_entry!();
|
||||
|
||||
|
|
@ -42,7 +44,18 @@ extern "C" fn main() -> z_err_t {
|
|||
let denali_server =
|
||||
Arc::new(AsyncDenaliServer::new(DenaliServerImpl::new(ahci_controller.clone())).unwrap());
|
||||
|
||||
let server_thread = yunq::server::spawn_async_server_thread(denali_server, executor.clone());
|
||||
let server_thread = yunq::server::spawn_async_server_thread(
|
||||
denali_server.clone(),
|
||||
executor.lock().new_spawner(),
|
||||
);
|
||||
|
||||
let yellowstone = yellowstone_yunq::from_init_endpoint();
|
||||
yellowstone
|
||||
.register_endpoint(&RegisterEndpointRequest {
|
||||
endpoint_name: "denali".into(),
|
||||
endpoint_capability: denali_server.create_client_cap().unwrap().release(),
|
||||
})
|
||||
.unwrap();
|
||||
|
||||
executor.clone().lock().run();
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ impl AsyncDenaliServerHandler for DenaliServerImpl {
|
|||
})
|
||||
}
|
||||
|
||||
async fn read_many(&self, req: ReadManyRequest) -> Result<ReadResponse, ZError> {
|
||||
async fn read_many(&self, _req: ReadManyRequest) -> Result<ReadResponse, ZError> {
|
||||
Err(ZError::UNIMPLEMENTED)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue