Ignore:
Timestamp:
Feb 25, 2026, 12:56:30 AM (27 hours ago)
Author:
Matthew Au-Yeung <mw2auyeu@…>
Branches:
stuck-waitfor-destruct
Children:
88bb0b4
Parents:
a0548c2
Message:

Revert "Add a generated hash to fix stuck waitfor comparing static inline mutex destructors"

This reverts commit a30fceb1a73c4ef2bbee39a2b5406da881f51111.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/invoke.h

    ra0548c2 r44940ee  
    159159                // last function that acquired monitors
    160160                fptr_t func;
    161 
    162                 // hash-based function identity for cross-TU matching
    163                 func_id_t func_id;
    164161        };
    165162
     
    291288                        (this.size){0};
    292289                        (this.func){NULL};
    293                         (this.func_id){0};
    294                 }
    295 
    296                 static inline void ?{}(__monitor_group_t & this, struct monitor$ ** data, __lock_size_t size, fptr_t func, func_id_t func_id) {
     290                }
     291
     292                static inline void ?{}(__monitor_group_t & this, struct monitor$ ** data, __lock_size_t size, fptr_t func) {
    297293                        (this.data){data};
    298294                        (this.size){size};
    299295                        (this.func){func};
    300                         (this.func_id){func_id};
    301296                }
    302297
     
    304299                        if( (lhs.data != 0) != (rhs.data != 0) ) return false;
    305300                        if( lhs.size != rhs.size ) return false;
    306                         // Use hash-based comparison when both sides have a valid func_id,
    307                         // otherwise fall back to function pointer comparison (for library code
    308                         // like join() that cannot compute the hash at compile time).
    309                         if( lhs.func_id != 0 && rhs.func_id != 0 ) {
    310                                 if( lhs.func_id != rhs.func_id ) return false;
    311                         } else {
    312                                 if( lhs.func != rhs.func ) return false;
    313                         }
     301                        if( lhs.func != rhs.func ) return false;
    314302
    315303                        // Check that all the monitors match
     
    326314                        lhs.size = rhs.size;
    327315                        lhs.func = rhs.func;
    328                         lhs.func_id = rhs.func_id;
    329316                }
    330317        }
Note: See TracChangeset for help on using the changeset viewer.