Subversion Repositories Kolibri OS

Rev

Rev 859 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
854 serge 1
 
2
3
 
4
 
5
6
 
7
8
 
9
10
 
11
12
 
13
		panic_printf("Kernel panic in %s() at %s:%u: " format, __func__, \
14
		__FILE__, __LINE__, ##__VA_ARGS__);
15
16
 
17
		if (!(expr)) { \
18
			panic("assertion failed (%s), caller=%p\n", #expr, CALLER); \
19
		}
20
#else
21
#	define panic(format, ...) \
22
		panic_printf("Kernel panic: " format, ##__VA_ARGS__);
23
24
 
25
#endif
26
27
 
28
 
29
{
30
  eflags_t tmp;
31
	asm volatile (
32
    "pushf\n\t"
33
    "pop %0\n\t"
34
		"cli\n"
35
    : "=r" (tmp)
36
	);
37
  return tmp;
38
}
39
40
 
41
{
42
	asm volatile (
43
    "push %0\n\t"
44
		"popf\n"
45
    : : "r" (efl)
46
	);
47
}
48