[NFC][tsan] Add include guards

This commit is contained in:
Vitaly Buka 2023-03-20 15:48:55 -07:00
parent ee232506b8
commit 33789125ca
3 changed files with 15 additions and 0 deletions

View File

@ -1,6 +1,9 @@
#include <stdio.h>
#include <stdarg.h>
#ifndef __SANITIZER_COMMON_PRINT_ADDRESS_H__
# define __SANITIZER_COMMON_PRINT_ADDRESS_H__
void print_address(const char *str, int n, ...) {
fprintf(stderr, "%s", str);
va_list ap;
@ -21,3 +24,5 @@ void print_address(const char *str, int n, ...) {
}
fprintf(stderr, "\n");
}
#endif // __SANITIZER_COMMON_PRINT_ADDRESS_H__

View File

@ -1,3 +1,6 @@
#ifndef __TSAN_JAVA_H__
#define __TSAN_JAVA_H__
#include "test.h"
extern "C" {
@ -27,3 +30,5 @@ void __tsan_func_exit();
}
const jptr kExternalPCBit = 1ULL << 60;
#endif // __TSAN_JAVA_H__

View File

@ -1,3 +1,6 @@
#ifndef __TSAN_TEST_H__
#define __TSAN_TEST_H__
#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>
@ -133,3 +136,5 @@ void WTFAnnotateBenignRaceSized(const char *f, int l, const volatile void *mem,
#else
#define ASM_SYMBOL(symbol) #symbol
#endif
#endif // __TSAN_TEST_H__