OLD | NEW |
1 /* Copyright (c) 2011, Google Inc. | 1 /* Copyright (c) 2011, Google Inc. |
2 * All rights reserved. | 2 * All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 RUNNING_ON_VALGRIND and other valgrind "client requests". | 541 RUNNING_ON_VALGRIND and other valgrind "client requests". |
542 The file "valgrind.h" may be obtained by doing | 542 The file "valgrind.h" may be obtained by doing |
543 svn co svn://svn.valgrind.org/valgrind/trunk/include | 543 svn co svn://svn.valgrind.org/valgrind/trunk/include |
544 | 544 |
545 If for some reason you can't use "valgrind.h" or want to fake valgrind, | 545 If for some reason you can't use "valgrind.h" or want to fake valgrind, |
546 there are two ways to make this function return non-zero: | 546 there are two ways to make this function return non-zero: |
547 - Use environment variable: export RUNNING_ON_VALGRIND=1 | 547 - Use environment variable: export RUNNING_ON_VALGRIND=1 |
548 - Make your tool intercept the function RunningOnValgrind() and | 548 - Make your tool intercept the function RunningOnValgrind() and |
549 change its return value. | 549 change its return value. |
550 */ | 550 */ |
551 int RunningOnValgrind(void); | 551 int RunningOnValgrind(void) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; |
552 #endif /* DYNAMIC_ANNOTATIONS_PROVIDE_RUNNING_ON_VALGRIND == 1 */ | 552 #endif /* DYNAMIC_ANNOTATIONS_PROVIDE_RUNNING_ON_VALGRIND == 1 */ |
553 | 553 |
554 #ifdef __cplusplus | 554 #ifdef __cplusplus |
555 } | 555 } |
556 #endif | 556 #endif |
557 | 557 |
558 #if DYNAMIC_ANNOTATIONS_ENABLED != 0 && defined(__cplusplus) | 558 #if DYNAMIC_ANNOTATIONS_ENABLED != 0 && defined(__cplusplus) |
559 | 559 |
560 /* ANNOTATE_UNPROTECTED_READ is the preferred way to annotate racey reads. | 560 /* ANNOTATE_UNPROTECTED_READ is the preferred way to annotate racey reads. |
561 | 561 |
(...skipping 24 matching lines...) Expand all Loading... |
586 static static_var ## _annotator the ## static_var ## _annotator;\ | 586 static static_var ## _annotator the ## static_var ## _annotator;\ |
587 } | 587 } |
588 #else /* DYNAMIC_ANNOTATIONS_ENABLED == 0 */ | 588 #else /* DYNAMIC_ANNOTATIONS_ENABLED == 0 */ |
589 | 589 |
590 #define ANNOTATE_UNPROTECTED_READ(x) (x) | 590 #define ANNOTATE_UNPROTECTED_READ(x) (x) |
591 #define ANNOTATE_BENIGN_RACE_STATIC(static_var, description) /* empty */ | 591 #define ANNOTATE_BENIGN_RACE_STATIC(static_var, description) /* empty */ |
592 | 592 |
593 #endif /* DYNAMIC_ANNOTATIONS_ENABLED */ | 593 #endif /* DYNAMIC_ANNOTATIONS_ENABLED */ |
594 | 594 |
595 #endif /* __DYNAMIC_ANNOTATIONS_H__ */ | 595 #endif /* __DYNAMIC_ANNOTATIONS_H__ */ |
OLD | NEW |