Changeset c3d0182a


Ignore:
Timestamp:
Jan 27, 2025, 9:23:35 PM (42 hours ago)
Author:
kyoung <lseo@…>
Branches:
master
Children:
2e0bb92, 71ca5b9
Parents:
11f92fac
git-author:
kyoung <lseo@…> (01/27/25 14:34:28)
git-committer:
kyoung <lseo@…> (01/27/25 21:23:35)
Message:

plan9 inline ordering for concurrency keywords.

Files:
3 edited

Legend:

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

    r11f92fac rc3d0182a  
    99// Author           : Thierry Delisle & Peiran Hong & Colby Parsons
    1010// Created On       : Wed Jan 06 17:33:18 2021
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Nov 29 16:07:34 2024
    13 // Update Count     : 30
     11// Last Modified By : Kyoung Seo
     12// Last Modified On : Mon Jan 27 20:35:00 2025
     13// Update Count     : 3
    1414//
    1515
     
    260260                        if( this.has_first != false) abort("Attempting to reset a multi_future with at least one blocked threads");
    261261                        if( !is_empty(this.blocked) ) abort("Attempting to reset a multi_future with multiple blocked threads");
    262                         reset( (future_t&)this );
     262                        reset( (future_t&)*(&this+sizeof(monitor$)) );
    263263                }
    264264
     
    266266                bool fulfil( multi_future(T) & this, T result ) {
    267267                        this.result = result;
    268                         return fulfil( (future_t&)this ) != 0p;
     268                        return fulfil( (future_t&)*(&this+sizeof(monitor$)) ) != 0p;
    269269                }
    270270
     
    275275                        bool w = !sw;
    276276                        if ( sw ) {
    277                                 w = wait( (future_t&)this );
     277                                w = wait( (future_t&)*(&this+sizeof(monitor$)) );
    278278                                $first_done( this );
    279279                        }
  • libcfa/src/concurrency/pthread.cfa

    r11f92fac rc3d0182a  
    99// Author           : Zhenyan Zhu
    1010// Created On       : Sat Aug 6 16:29:18 2022
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Sep  4 15:37:51 2023
     11// Last Modified By : Kyoung Seo
     12// Last Modified On : Mon Jan 27 20:35:00 2025
    1313// Update Count     : 1
    1414//
     
    392392
    393393        pthread_t pthread_self(void) libcfa_public __THROW {
    394                 return (pthread_t)((uintptr_t)active_thread() - (sizeof(cfaPthread) - sizeof(thread$)));
     394                return (pthread_t)((uintptr_t)active_thread());
    395395        }
    396396
  • src/Concurrency/Keywords.cpp

    r11f92fac rc3d0182a  
    1010// Created On       : Tue Nov 16  9:53:00 2021
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Jan 26 15:16:16 2025
    13 // Update Count     : 15
     12// Last Modified On : Fri Jan 24 18:33:02 2025
     13// Update Count     : 14
    1414//
    1515
     
    534534        auto mutDecl = ast::mutate( decl );
    535535        // Insert at start of special aggregate structures => front of vector
    536         //mutDecl->members.insert( mutDecl->members.begin(), field );
    537         mutDecl->members.push_back( field );
     536        mutDecl->members.insert( mutDecl->members.begin(), field );
    538537
    539538        return {mutDecl, field};
Note: See TracChangeset for help on using the changeset viewer.