chiark / gitweb /
use barriers rather than recreating threads
[moebius2.git] / parallel.h
index 19616e43f64b9aeba95b4dc21e973ec571eab7a9..a8a748fdce036e0ac5ce5cb3bdbe315512e75357 100644 (file)
@@ -29,7 +29,7 @@
  *   - function must not modify anything other than
  *      its return value (for cost computation functions, COST()) or
  *      its designated output (for precomputation functions, PRECOMP())
- *        (which latter it may not read)
+ *       and in the latter case it may not read other parts of its output
  *   - function must of course be reentrant
  */
 
@@ -49,6 +49,9 @@ void inparallel(const struct Vertices *vertices,
    * secdatasz, passed as secdata, uninitialised on entry.
    * After all the copies have finished, `combine' is invoked
    * nsections times sequentially, with the same sets of arguments.
+   * inparallel is NOT itself reentrant.
    */
 
+void inparallel_barrier(void);
+
 #endif /*PARALLEL_H*/