Changeset 95707a3


Ignore:
Timestamp:
Nov 16, 2024, 6:33:41 PM (5 weeks ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
dd54139
Parents:
e255902b
Message:

updates to barrier.hfa

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/barrier.hfa

    re255902b r95707a3  
    1111// Created On       : Sun Nov 10 08:07:35 2024
    1212// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Sun Nov 10 08:11:55 2024
    14 // Update Count     : 3
     13// Last Modified On : Wed Nov 13 12:37:04 2024
     14// Update Count     : 9
    1515//
    1616
     
    2626};
    2727
    28 // Constructor
    29 void ?{}( barrier & b, unsigned group ) {
    30         b.group = b.arrivals = group;                                           // count backwards
     28static inline void ?{}( barrier & b, unsigned int group ) {
     29        b.group = b.arrivals = group;                                           // arrivals count backward
    3130}
    3231
    33 // Returns a value indicating the reverse order the threads arrived i.e. last thread returns 0 (and does not block)
    34 // last is an optional hook that is called by the last thread before unblocking the others.
    35 static inline unsigned block( barrier & mutex b, fptr_t last = (fptr_t)0 ) with( b ) {
     32// Returns a value indicating the reverse order the threads arrived, i.e. last thread returns 0 (and does not block)
     33// last is an optional hook that is called by the Gth thread before unblocking the other threads.
     34static inline unsigned int block( barrier & mutex b, fptr_t last = (fptr_t)0 ) with( b ) {
    3635        arrivals -= 1;                                                                          // prefix decrement so last is 0 not 1
    3736        unsigned arrived = b.arrivals;                                          // note arrival order
Note: See TracChangeset for help on using the changeset viewer.