|
20 | 20 | ::alloc::vec::Vec,
|
21 | 21 | };
|
22 | 22 |
|
| 23 | +pub use uefi_raw::table::boot::Tpl; |
| 24 | + |
23 | 25 | // TODO: this similar to `SyncUnsafeCell`. Once that is stabilized we
|
24 | 26 | // can use it instead.
|
25 | 27 | struct GlobalImageHandle {
|
@@ -1673,31 +1675,6 @@ pub enum LoadImageSource<'a> {
|
1673 | 1675 | },
|
1674 | 1676 | }
|
1675 | 1677 |
|
1676 | | -newtype_enum! { |
1677 | | -/// Task priority level. |
1678 | | -/// |
1679 | | -/// Although the UEFI specification repeatedly states that only the variants |
1680 | | -/// specified below should be used in application-provided input, as the other |
1681 | | -/// are reserved for internal firmware use, it might still happen that the |
1682 | | -/// firmware accidentally discloses one of these internal TPLs to us. |
1683 | | -/// |
1684 | | -/// Since feeding an unexpected variant to a Rust enum is UB, this means that |
1685 | | -/// this C enum must be interfaced via the newtype pattern. |
1686 | | -pub enum Tpl: usize => { |
1687 | | - /// Normal task execution level. |
1688 | | - APPLICATION = 4, |
1689 | | - /// Async interrupt-style callbacks run at this TPL. |
1690 | | - CALLBACK = 8, |
1691 | | - /// Notifications are masked at this level. |
1692 | | - /// |
1693 | | - /// This is used in critical sections of code. |
1694 | | - NOTIFY = 16, |
1695 | | - /// Highest priority level. |
1696 | | - /// |
1697 | | - /// Even processor interrupts are disable at this level. |
1698 | | - HIGH_LEVEL = 31, |
1699 | | -}} |
1700 | | - |
1701 | 1678 | /// RAII guard for task priority level changes
|
1702 | 1679 | ///
|
1703 | 1680 | /// Will automatically restore the former task priority level when dropped.
|
|
0 commit comments