Ignore:
Timestamp:
Feb 18, 2025, 12:54:23 PM (6 weeks ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
8705a11
Parents:
3e5fea2
Message:

Clean-up the warnings of the concurrency tests. A lot of little test level fixes, the most interesting repeated one is some formally redundent fallthough statements. pthread_attr_test had to be rewritten because of library restrictions. Changed some types so they would always be pointer sized. There was a library change, there was a function that could not be implemented; I trust that it is included for a reason so I just put it in a comment. There is a change to the compiler, wait-until now uses goto. The labelled breaks were code generated as unlabelled breaks and although it worked out slipped through some checks. Finally, there is one warning that I cannot solve at this time so tests that produce it have been put in their own lax group.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified tests/concurrency/lockfree_stack.cfa

    r3e5fea2 rd923fca  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // lockfree_stack.cfa -- 
     7// lockfree_stack.cfa --
    88//
    99// Author           : Peter A. Buhr
     
    1212// Last Modified On : Fri Jun  9 14:01:07 2023
    1313// Update Count     : 68
    14 // 
     14//
    1515
    1616#include <thread.hfa>
     
    4242        n.next = stack;                                                                         // atomic assignment unnecessary
    4343        for () {                                                                                        // busy wait
    44                 Link temp{ &n, n.next.count + 1 };
     44                Link temp{ { &n, n.next.count + 1 } };
    4545                if ( CASV( s.stack.atom, n.next.atom, temp.atom ) ) break; // attempt to update top node
    4646        }
     
    5151        for () {                                                                                        // busy wait
    5252                if ( t.top == NULL ) return NULL;                               // empty stack ?
    53                 Link temp{ t.top->next.top, t.count };
     53                Link temp{ { t.top->next.top, t.count } };
    5454                if ( CASV( stack.atom, t.atom, temp.atom ) ) return t.top; // attempt to update top node
    5555        }
     
    6262
    6363thread Worker {};
    64 void main( Worker & w ) {
     64void main( Worker & ) {
    6565        for ( i; Times ) {
    6666                Node & n = *pop( stack );                                               // pop any node
Note: See TracChangeset for help on using the changeset viewer.