Changes in kernel/arch/ia32/include/asm.h [d99c1d2:3d6beaa] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/include/asm.h
rd99c1d2 r3d6beaa 38 38 39 39 #include <arch/pm.h> 40 #include <arch/cpu.h> 40 41 #include <typedefs.h> 41 42 #include <config.h> … … 299 300 } 300 301 302 /** Check interrupts state. 303 * 304 * @return True if interrupts are disabled. 305 * 306 */ 307 static inline bool interrupts_disabled(void) 308 { 309 ipl_t v; 310 311 asm volatile ( 312 "pushf\n" 313 "popl %[v]\n" 314 : [v] "=r" (v) 315 ); 316 317 return ((v & EFLAGS_IF) == 0); 318 } 319 301 320 /** Write to MSR */ 302 321 static inline void write_msr(uint32_t msr, uint64_t value) … … 343 362 } 344 363 345 /** Return current IP address */346 static inline uintptr_t * get_ip()347 {348 uintptr_t *ip;349 350 asm volatile (351 "mov %%eip, %[ip]"352 : [ip] "=r" (ip)353 );354 355 return ip;356 }357 358 364 /** Invalidate TLB Entry. 359 365 *
Note:
See TracChangeset
for help on using the changeset viewer.