Ignore:
Timestamp:
Jun 2, 2022, 3:11:21 PM (23 months ago)
Author:
caparsons <caparson@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
ced5e2a
Parents:
015925a (diff), fc134a48 (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' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

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

    r015925a re5d9274  
    2424#include <stdlib.hfa>
    2525
     26#pragma GCC visibility push(default)
     27
    2628//-----------------------------------------------------------------------------
    2729// info_thread
     
    116118}
    117119
    118 void pop_and_set_new_owner( blocking_lock & this ) with( this ) {
     120static void pop_and_set_new_owner( blocking_lock & this ) with( this ) {
    119121        thread$ * t = &try_pop_front( blocked_threads );
    120122        owner = t;
     
    264266        void ^?{}( alarm_node_wrap(L) & this ) { }
    265267
    266         void timeout_handler ( alarm_node_wrap(L) & this ) with( this ) {
     268        static void timeout_handler ( alarm_node_wrap(L) & this ) with( this ) {
    267269                // This condition_variable member is called from the kernel, and therefore, cannot block, but it can spin.
    268270                lock( cond->lock __cfaabi_dbg_ctx2 );
     
    288290
    289291        // this casts the alarm node to our wrapped type since we used type erasure
    290         void alarm_node_wrap_cast( alarm_node_t & a ) { timeout_handler( (alarm_node_wrap(L) &)a ); }
     292        static void alarm_node_wrap_cast( alarm_node_t & a ) { timeout_handler( (alarm_node_wrap(L) &)a ); }
    291293}
    292294
     
    305307        void ^?{}( condition_variable(L) & this ){ }
    306308
    307         void process_popped( condition_variable(L) & this, info_thread(L) & popped ) with( this ) {
     309        static void process_popped( condition_variable(L) & this, info_thread(L) & popped ) with( this ) {
    308310                if(&popped != 0p) {
    309311                        popped.signalled = true;
     
    350352        int counter( condition_variable(L) & this ) with(this) { return count; }
    351353
    352         size_t queue_and_get_recursion( condition_variable(L) & this, info_thread(L) * i ) with(this) {
     354        static size_t queue_and_get_recursion( condition_variable(L) & this, info_thread(L) * i ) with(this) {
    353355                // add info_thread to waiting queue
    354356                insert_last( blocked_threads, *i );
     
    363365
    364366        // helper for wait()'s' with no timeout
    365         void queue_info_thread( condition_variable(L) & this, info_thread(L) & i ) with(this) {
     367        static void queue_info_thread( condition_variable(L) & this, info_thread(L) & i ) with(this) {
    366368                lock( lock __cfaabi_dbg_ctx2 );
    367369                size_t recursion_count = queue_and_get_recursion(this, &i);
     
    380382
    381383        // helper for wait()'s' with a timeout
    382         void queue_info_thread_timeout( condition_variable(L) & this, info_thread(L) & info, Duration t, Alarm_Callback callback ) with(this) {
     384        static void queue_info_thread_timeout( condition_variable(L) & this, info_thread(L) & info, Duration t, Alarm_Callback callback ) with(this) {
    383385                lock( lock __cfaabi_dbg_ctx2 );
    384386                size_t recursion_count = queue_and_get_recursion(this, &info);
     
    415417        // fast_cond_var
    416418        void  ?{}( fast_cond_var(L) & this ){
    417                 this.blocked_threads{}; 
     419                this.blocked_threads{};
    418420                #ifdef __CFA_DEBUG__
    419421                this.lock_used = 0p;
Note: See TracChangeset for help on using the changeset viewer.