Просмотр исходного кода

[libc] Add ASSERTED macro to test if any assertion has triggered

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 11 лет назад
Родитель
Сommit
67879f66eb
1 измененных файлов: 2 добавлений и 0 удалений
  1. 2
    0
      src/include/assert.h

+ 2
- 0
src/include/assert.h Просмотреть файл

20
 
20
 
21
 extern unsigned int assertion_failures;
21
 extern unsigned int assertion_failures;
22
 
22
 
23
+#define ASSERTED ( ASSERTING && ( assertion_failures != 0 ) )
24
+
23
 /** printf() for assertions
25
 /** printf() for assertions
24
  *
26
  *
25
  * This function exists so that the assert() macro can expand to
27
  * This function exists so that the assert() macro can expand to

Загрузка…
Отмена
Сохранить