Changeset 242 for trunk/hal/x86_64/core/x86_printf.c
- Timestamp:
- Jul 20, 2017, 10:29:05 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/core/x86_printf.c
r234 r242 42 42 size_t cons_ptr __in_kdata = 0; 43 43 44 /* -------------------------------------------------------------------------- */ 45 46 static uint32_t x86_lock_val __in_kdata = 0; 47 48 void x86_lock() 49 { 50 while (!hal_atomic_cas(&x86_lock_val, 0, 1)) { 51 /* wait */ 52 } 53 } 54 55 void x86_unlock() 56 { 57 while (!hal_atomic_cas(&x86_lock_val, 1, 0)) { 58 /* wait */ 59 } 60 } 61 62 /* -------------------------------------------------------------------------- */ 63 44 64 void x86_panic(char *msg) 45 65 { 66 x86_lock(); 46 67 x86_printf("!!!!! PANIC !!!!!\n"); 47 68 x86_printf("-> %s\n", msg); 48 69 x86_printf("!!!!!!!!!!!!!!!!!\n"); 70 x86_unlock(); 49 71 while (1); 50 72 }
Note: See TracChangeset
for help on using the changeset viewer.