aboutsummaryrefslogtreecommitdiff
path: root/embassy-executor/src/raw
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-executor/src/raw')
-rw-r--r--embassy-executor/src/raw/mod.rs19
1 files changed, 0 insertions, 19 deletions
diff --git a/embassy-executor/src/raw/mod.rs b/embassy-executor/src/raw/mod.rs
index 7795f1e4a..81ad1e53d 100644
--- a/embassy-executor/src/raw/mod.rs
+++ b/embassy-executor/src/raw/mod.rs
@@ -317,29 +317,12 @@ pub enum Pender {
317 /// Pender for an interrupt-mode executor. 317 /// Pender for an interrupt-mode executor.
318 #[cfg(feature = "executor-interrupt")] 318 #[cfg(feature = "executor-interrupt")]
319 Interrupt(OpaqueInterruptContext), 319 Interrupt(OpaqueInterruptContext),
320
321 /// Arbitrary, dynamically dispatched pender.
322 #[cfg(feature = "pender-callback")]
323 Callback { func: fn(*mut ()), context: *mut () },
324} 320}
325 321
326unsafe impl Send for Pender {} 322unsafe impl Send for Pender {}
327unsafe impl Sync for Pender {} 323unsafe impl Sync for Pender {}
328 324
329impl Pender { 325impl Pender {
330 /// Create a `Pender` that will call an arbitrary function pointer.
331 ///
332 /// # Arguments
333 ///
334 /// - `func`: The function pointer to call.
335 /// - `context`: Opaque context pointer, that will be passed to the function pointer.
336 #[cfg(feature = "pender-callback")]
337 pub fn new_from_callback(func: fn(*mut ()), context: *mut ()) -> Self {
338 Self::Callback { func, context }
339 }
340}
341
342impl Pender {
343 pub(crate) fn pend(self) { 326 pub(crate) fn pend(self) {
344 match self { 327 match self {
345 #[cfg(feature = "executor-thread")] 328 #[cfg(feature = "executor-thread")]
@@ -356,8 +339,6 @@ impl Pender {
356 } 339 }
357 unsafe { __interrupt_mode_pender(interrupt) }; 340 unsafe { __interrupt_mode_pender(interrupt) };
358 } 341 }
359 #[cfg(feature = "pender-callback")]
360 Pender::Callback { func, context } => func(context),
361 } 342 }
362 } 343 }
363} 344}