Commit 6c511999 authored by Adam Simpkins's avatar Adam Simpkins Committed by Facebook Github Bot

fix a multiline comment warning

Summary:
DeterministicScheduleTest.cpp contained several single-line C++ comments that
ended in a trailing backslash.  This makes the preprocessor treat the following
line as a comment as well, even if it does not start with `//`.  Newer versions
of gcc emit warnings about this.

This changes the comment in DeterministicScheduleTest.cpp to use `/* */` to
avoid this issue.

Reviewed By: siyengar

Differential Revision: D6735672

fbshipit-source-id: 162c735507a643ce0dbee58f1f054865237e1eba
parent bdd9360c
...@@ -106,60 +106,62 @@ TEST(DeterministicSchedule, buggyAdd) { ...@@ -106,60 +106,62 @@ TEST(DeterministicSchedule, buggyAdd) {
} // for bug } // for bug
} }
/// Test DSched support for auxiliary data and global invariants /*
/// * Test DSched support for auxiliary data and global invariants
/// How to use DSched support for auxiliary data and global invariants *
/// (Let Foo<T, Atom> be the template to be tested): * How to use DSched support for auxiliary data and global invariants
/// 1. Add friend AnnotatedFoo<T> to Foo<T,Atom> (Typically, in Foo.h). * (Let Foo<T, Atom> be the template to be tested):
/// 2. Define a class AuxData for whatever auxiliary data is needed * 1. Add friend AnnotatedFoo<T> to Foo<T,Atom> (Typically, in Foo.h).
/// to maintain global knowledge of shared and private state. * 2. Define a class AuxData for whatever auxiliary data is needed
/// 3. Define: * to maintain global knowledge of shared and private state.
/// static AuxData* aux_; * 3. Define:
/// static FOLLY_TLS uint32_t tid_; * static AuxData* aux_;
/// 4. (Optional) Define gflags for command line options. E.g.: * static FOLLY_TLS uint32_t tid_;
/// DEFINE_int64(seed, 0, "Seed for random number generators"); * 4. (Optional) Define gflags for command line options. E.g.:
/// 5. (Optionl) Define macros for mangement of auxiliary data. E.g., * DEFINE_int64(seed, 0, "Seed for random number generators");
/// #define AUX_THR(x) (aux_->t_[tid_]->x) * 5. (Optionl) Define macros for mangement of auxiliary data. E.g.,
/// 6. (Optional) Define macro for creating auxiliary actions. E.g., * #define AUX_THR(x) (aux_->t_[tid_]->x)
/// #define AUX_ACT(act) \ * 6. (Optional) Define macro for creating auxiliary actions. E.g.,
/// { \ * #define AUX_ACT(act) \
/// AUX_THR(func_) = __func__; \ * { \
/// AUX_THR(line_) = __LINE__; \ * AUX_THR(func_) = __func__; \
/// AuxAct auxact([&](bool success) { if (success); act}); \ * AUX_THR(line_) = __LINE__; \
/// DeterministicSchedule::setAuxAct(auxact); \ * AuxAct auxact([&](bool success) { if (success); act}); \
/// } * DeterministicSchedule::setAuxAct(auxact); \
/// [Note: Auxiliary actions must not contain any standard shared * }
/// accesses, or else deadlock will occur. Use the load_direct() * [Note: Auxiliary actions must not contain any standard shared
/// member function of DeterministicAtomic instead.] * accesses, or else deadlock will occur. Use the load_direct()
/// 7. Define AnnotatedFoo<T> derived from Foo<T,DeterministicAtomic>. * member function of DeterministicAtomic instead.]
/// 8. Define member functions in AnnotatedFoo to manage DSched::auxChk. * 7. Define AnnotatedFoo<T> derived from Foo<T,DeterministicAtomic>.
/// 9. Define member functions for logging and checkig global invariants. * 8. Define member functions in AnnotatedFoo to manage DSched::auxChk.
/// 10. Define member functions for direct access to data members of Foo. * 9. Define member functions for logging and checkig global invariants.
/// 11. (Optional) Add a member function dummyStep() to update * 10. Define member functions for direct access to data members of Foo.
/// auxiliary data race-free when the next step is unknoown or * 11. (Optional) Add a member function dummyStep() to update
/// not conveniently accessible (e.g., in a different * auxiliary data race-free when the next step is unknoown or
/// library). The functions adds a dummy shared step to force * not conveniently accessible (e.g., in a different
/// DSched to invoke the auxiliary action at a known point.This * library). The functions adds a dummy shared step to force
/// is needed for now because DSched allows threads to run in * DSched to invoke the auxiliary action at a known point.This
/// parallel between shared accesses. Hence, concurrent updates * is needed for now because DSched allows threads to run in
/// of shared auxiliary data can be racy if executed outside * parallel between shared accesses. Hence, concurrent updates
/// auxiliary actions. This may be obviated in the future if * of shared auxiliary data can be racy if executed outside
/// DSched supports fully seriallized execution. * auxiliary actions. This may be obviated in the future if
/// void dummyStep() { * DSched supports fully seriallized execution.
/// DeterministicSchedule::beforeSharedAccess(); * void dummyStep() {
/// DeterministicSchedule::afterSharedAccess(true); * DeterministicSchedule::beforeSharedAccess();
/// } * DeterministicSchedule::afterSharedAccess(true);
/// 12. Override member functions of Foo as needed in order to * }
/// annotate the code with auxiliary actions. [Note: There may be * 12. Override member functions of Foo as needed in order to
/// a lot of duplication of Foo's code. Alternatively, Foo can be * annotate the code with auxiliary actions. [Note: There may be
/// annotated directly.] * a lot of duplication of Foo's code. Alternatively, Foo can be
/// 13. Define TEST using instances of AuxData and AnnotatedFoo. * annotated directly.]
/// 14. For debugging, iteratively add (as needed) auxiliary data, * 13. Define TEST using instances of AuxData and AnnotatedFoo.
/// global invariants, logging details, command line flags as * 14. For debugging, iteratively add (as needed) auxiliary data,
/// needed and selectively generate relevant logs to detect the * global invariants, logging details, command line flags as
/// race condition shortly after it occurs. * needed and selectively generate relevant logs to detect the
/// * race condition shortly after it occurs.
/// In the following example Foo = AtomicCounter *
* In the following example Foo = AtomicCounter
*/
using DSched = DeterministicSchedule; using DSched = DeterministicSchedule;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment