Changeset 84cd72d for tests/concurrent


Ignore:
Timestamp:
Apr 15, 2021, 2:59:11 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
e2cc3c7
Parents:
c0c0bd5
Message:

fixed warnings inside the spinaphore test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/concurrent/spinaphore.cfa

    rc0c0bd5 r84cd72d  
    4949void main(Unblocker & this) {
    5050        this.sum = 0;
    51         unsigned me = (unsigned)&this;
     51        unsigned me = (unsigned)(uintptr_t)&this;
    5252        for(num_unblocks) {
    5353                $thread * t = V(sem, false);
    5454                Blocker * b = from_thread(t);
    5555                b->sum += me;
    56                 this.sum += (unsigned)b;
     56                this.sum += (unsigned)(uintptr_t)b;
    5757                unpark(t);
    5858                yield(random(10));
     
    7373                for(i;num_blockers) {
    7474                        for(num_blocks)
    75                                 usum += (unsigned)&blockers[i];
     75                                usum += (unsigned)(uintptr_t)&blockers[i];
    7676                }
    7777
    7878                for(i;num_unblockers) {
    7979                        for(num_unblocks)
    80                                 bsum += (unsigned)&unblockers[i];
     80                                bsum += (unsigned)(uintptr_t)&unblockers[i];
    8181                }
    8282
Note: See TracChangeset for help on using the changeset viewer.