Ignore:
Timestamp:
Dec 10, 2019, 4:24:49 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
2a3d446
Parents:
b798713 (diff), e307e12 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into relaxed_ready

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/monitor.cfa

    rb798713 rf80f840  
    1010// Created On       : Thd Feb 23 12:27:26 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Mar 30 14:30:26 2018
    13 // Update Count     : 9
     12// Last Modified On : Wed Dec  4 07:55:14 2019
     13// Update Count     : 10
    1414//
    1515
     
    363363        this.waiting_thread = waiting_thread;
    364364        this.count = count;
    365         this.next = NULL;
     365        this.next = 0p;
    366366        this.user_info = user_info;
    367367}
     
    369369void ?{}(__condition_criterion_t & this ) with( this ) {
    370370        ready  = false;
    371         target = NULL;
    372         owner  = NULL;
    373         next   = NULL;
     371        target = 0p;
     372        owner  = 0p;
     373        next   = 0p;
    374374}
    375375
     
    378378        this.target = target;
    379379        this.owner  = &owner;
    380         this.next   = NULL;
     380        this.next   = 0p;
    381381}
    382382
     
    387387
    388388        // Check that everything is as expected
    389         assertf( this.monitors != NULL, "Waiting with no monitors (%p)", this.monitors );
     389        assertf( this.monitors != 0p, "Waiting with no monitors (%p)", this.monitors );
    390390        verifyf( this.monitor_count != 0, "Waiting with 0 monitors (%"PRIiFAST16")", this.monitor_count );
    391391        verifyf( this.monitor_count < 32u, "Excessive monitor count (%"PRIiFAST16")", this.monitor_count );
     
    449449
    450450        // Lock all monitors
    451         lock_all( this.monitors, NULL, count );
     451        lock_all( this.monitors, 0p, count );
    452452
    453453        //Pop the head of the waiting queue
     
    471471
    472472        //Check that everything is as expected
    473         verifyf( this.monitors != NULL, "Waiting with no monitors (%p)", this.monitors );
     473        verifyf( this.monitors != 0p, "Waiting with no monitors (%p)", this.monitors );
    474474        verifyf( this.monitor_count != 0, "Waiting with 0 monitors (%"PRIiFAST16")", this.monitor_count );
    475475
     
    674674
    675675static inline void reset_mask( monitor_desc * this ) {
    676         this->mask.accepted = NULL;
    677         this->mask.data = NULL;
     676        this->mask.accepted = 0p;
     677        this->mask.data = 0p;
    678678        this->mask.size = 0;
    679679}
     
    816816        }
    817817
    818         __cfaabi_dbg_print_safe( "Kernel :  Runing %i (%p)\n", ready2run, ready2run ? node->waiting_thread : NULL );
    819         return ready2run ? node->waiting_thread : NULL;
     818        __cfaabi_dbg_print_safe( "Kernel :  Runing %i (%p)\n", ready2run, ready2run ? node->waiting_thread : 0p );
     819        return ready2run ? node->waiting_thread : 0p;
    820820}
    821821
     
    824824        if( !this.monitors ) {
    825825                // __cfaabi_dbg_print_safe( "Branding\n" );
    826                 assertf( thrd->monitors.data != NULL, "No current monitor to brand condition %p", thrd->monitors.data );
     826                assertf( thrd->monitors.data != 0p, "No current monitor to brand condition %p", thrd->monitors.data );
    827827                this.monitor_count = thrd->monitors.size;
    828828
Note: See TracChangeset for help on using the changeset viewer.