Changeset 22f7769 in mainline for arch/ia32/include/asm.h
- Timestamp:
- 2005-10-17T23:31:41Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4b2c872d
- Parents:
- 75eacab
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/include/asm.h
r75eacab r22f7769 132 132 static inline __u32 inl(__u16 port) { __u32 val; __asm__ volatile ("inl %w1, %l0 \n" : "=a" (val) : "d" (port) ); return val; } 133 133 134 /** Set priority level low134 /** Enable interrupts. 135 135 * 136 136 * Enable interrupts and return previous 137 137 * value of EFLAGS. 138 */ 139 static inline pri_t cpu_priority_low(void) { 140 pri_t v; 138 * 139 * @return Old interrupt priority level. 140 */ 141 static inline ipl_t interrupts_enable(void) { 142 ipl_t v; 141 143 __asm__ volatile ( 142 144 "pushf\n\t" … … 148 150 } 149 151 150 /** Set priority level high152 /** Disable interrupts. 151 153 * 152 154 * Disable interrupts and return previous 153 155 * value of EFLAGS. 154 */ 155 static inline pri_t cpu_priority_high(void) { 156 pri_t v; 156 * 157 * @return Old interrupt priority level. 158 */ 159 static inline ipl_t interrupts_disable(void) { 160 ipl_t v; 157 161 __asm__ volatile ( 158 162 "pushf\n\t" … … 164 168 } 165 169 166 /** Restore priority level170 /** Restore interrupt priority level. 167 171 * 168 172 * Restore EFLAGS. 169 */ 170 static inline void cpu_priority_restore(pri_t pri) { 173 * 174 * @param ipl Saved interrupt priority level. 175 */ 176 static inline void interrupts_restore(ipl_t ipl) { 171 177 __asm__ volatile ( 172 178 "pushl %0\n\t" 173 179 "popf\n" 174 : : "r" ( pri)175 ); 176 } 177 178 /** Return raw priority level179 * 180 * Return EFLAFS.181 */ 182 static inline pri_t cpu_priority_read(void) {183 pri_t v;180 : : "r" (ipl) 181 ); 182 } 183 184 /** Return interrupt priority level. 185 * 186 * @return EFLAFS. 187 */ 188 static inline ipl_t interrupts_read(void) { 189 ipl_t v; 184 190 __asm__ volatile ( 185 191 "pushf\n\t"
Note:
See TracChangeset
for help on using the changeset viewer.