소스 검색

[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 9 년 전
부모
커밋
67879f66eb
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2
    0
      src/include/assert.h

+ 2
- 0
src/include/assert.h 파일 보기

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

Loading…
취소
저장