From: Bart Van Assche Date: Wed, 1 Jul 2009 18:45:45 +0000 (+0000) Subject: Added four more ANNOTATE_*() macro's / removed the API-warning. X-Git-Tag: svn/VALGRIND_3_5_0~449 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=132ad898769ebcb1a8e4800f87f88cd5b0712cd7;p=thirdparty%2Fvalgrind.git Added four more ANNOTATE_*() macro's / removed the API-warning. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10397 --- diff --git a/drd/drd.h b/drd/drd.h index 499d246a25..9669f0978c 100644 --- a/drd/drd.h +++ b/drd/drd.h @@ -84,10 +84,13 @@ */ #define DRD_TRACE_VAR(x) DRDCL_(trace_range)(&(x), sizeof(x)) -/* !! APIWARNING !! APIWARNING !! APIWARNING !! APIWARNING !! - The semantics and the names of the macro's defined below are still - under discussion and subject to change without notice. -*/ +/** + * @defgroup RaceDetectionAnnotations Data race detection annotations. + * + * @see See also the source file dynamic_annotations.h + * in the ThreadSanitizer project. + */ +/*@{*/ /** * Tell DRD to insert a mark. addr is the address of an object that is not a @@ -166,6 +169,18 @@ #define ANNOTATE_RWLOCK_ACQUIRED(rwlock, is_w) \ DRDCL_(annotate_rwlock)(rwlock, 2, is_w) +/** + * Tell DRD that a reader lock has been acquired on a reader-writer + * synchronization object. + */ +#define ANNOTATE_READERLOCK_ACQUIRED(rwlock) ANNOTATE_RWLOCK_ACQUIRED(rwlock, 0) + +/** + * Tell DRD that a writer lock has been acquired on a reader-writer + * synchronization object. + */ +#define ANNOTATE_WRITERLOCK_ACQUIRED(rwlock) ANNOTATE_RWLOCK_ACQUIRED(rwlock, 1) + /** * Tell DRD that a reader-writer lock is about to be released. is_w == 1 means * that a write lock is about to be released, is_w == 0 means that a read lock @@ -174,6 +189,16 @@ #define ANNOTATE_RWLOCK_RELEASED(rwlock, is_w) \ DRDCL_(annotate_rwlock)(rwlock, 3, is_w) +/** + * Tell DRD that a reader lock is about to be released. + */ +#define ANNOTATE_READERLOCK_RELEASED(rwlock) ANNOTATE_RWLOCK_RELEASED(rwlock, 0) + +/** + * Tell DRD that a writer lock is about to be released. + */ +#define ANNOTATE_WRITERLOCK_RELEASED(rwlock) ANNOTATE_RWLOCK_RELEASED(rwlock, 1) + /** * Tell DRD that a FIFO queue has been created. The abbreviation PCQ stands for * producer-consumer. @@ -243,10 +268,7 @@ */ #define ANNOTATE_THREAD_NAME(name) DRDCL_(set_thread_name)(name) -/* !! APIWARNING !! APIWARNING !! APIWARNING !! APIWARNING !! - The semantics and the names of the macro's defined above are still - under discussion and subject to change without notice. -*/ +/*@}*/ /* !! ABIWARNING !! ABIWARNING !! ABIWARNING !! ABIWARNING !!