aboutsummaryrefslogtreecommitdiff
path: root/src/ioctl.rs
diff options
context:
space:
mode:
authorkbleeke <[email protected]>2023-03-02 19:02:32 +0100
committerkbleeke <[email protected]>2023-03-27 13:18:59 +0200
commitb58cc2aa239e4adba2c32462cc89133bb7d9f698 (patch)
tree236352d7335f0f81cea03a6e9c4646d643acceae /src/ioctl.rs
parenta2272dda08a2d1625eef0b79fcd80afc8a1e174a (diff)
use irqs to wait for events
Diffstat (limited to 'src/ioctl.rs')
-rw-r--r--src/ioctl.rs3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/ioctl.rs b/src/ioctl.rs
index 6a7465593..4a2eb252f 100644
--- a/src/ioctl.rs
+++ b/src/ioctl.rs
@@ -75,7 +75,6 @@ impl IoctlState {
75 pub async fn wait_pending(&self) -> PendingIoctl { 75 pub async fn wait_pending(&self) -> PendingIoctl {
76 let pending = poll_fn(|cx| { 76 let pending = poll_fn(|cx| {
77 if let IoctlStateInner::Pending(pending) = self.state.get() { 77 if let IoctlStateInner::Pending(pending) = self.state.get() {
78 warn!("found pending ioctl");
79 Poll::Ready(pending) 78 Poll::Ready(pending)
80 } else { 79 } else {
81 self.register_runner(cx.waker()); 80 self.register_runner(cx.waker());
@@ -89,7 +88,6 @@ impl IoctlState {
89 } 88 }
90 89
91 pub async fn do_ioctl(&self, kind: IoctlType, cmd: u32, iface: u32, buf: &mut [u8]) -> usize { 90 pub async fn do_ioctl(&self, kind: IoctlType, cmd: u32, iface: u32, buf: &mut [u8]) -> usize {
92 warn!("doing ioctl");
93 self.state 91 self.state
94 .set(IoctlStateInner::Pending(PendingIoctl { buf, kind, cmd, iface })); 92 .set(IoctlStateInner::Pending(PendingIoctl { buf, kind, cmd, iface }));
95 self.wake_runner(); 93 self.wake_runner();
@@ -98,7 +96,6 @@ impl IoctlState {
98 96
99 pub fn ioctl_done(&self, response: &[u8]) { 97 pub fn ioctl_done(&self, response: &[u8]) {
100 if let IoctlStateInner::Sent { buf } = self.state.get() { 98 if let IoctlStateInner::Sent { buf } = self.state.get() {
101 warn!("ioctl complete");
102 // TODO fix this 99 // TODO fix this
103 (unsafe { &mut *buf }[..response.len()]).copy_from_slice(response); 100 (unsafe { &mut *buf }[..response.len()]).copy_from_slice(response);
104 101