Ignore:
Timestamp:
Mar 22, 2021, 4:07:21 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:
304de00
Parents:
d971c8d
Message:
  • Fixed TryLock? in blocking_lock implementation that did not return whether or not try_lock succeeded.
  • Fix cfathread try_lock interface.
File:
1 edited

Legend:

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

    rd971c8d rd27b6be  
    3232static inline void ^?{}( single_acquisition_lock & this ) {}
    3333static inline void   lock      ( single_acquisition_lock & this ) { lock    ( (blocking_lock &)this ); }
    34 static inline void   try_lock  ( single_acquisition_lock & this ) { try_lock( (blocking_lock &)this ); }
     34static inline bool   try_lock  ( single_acquisition_lock & this ) { return try_lock( (blocking_lock &)this ); }
    3535static inline void   unlock    ( single_acquisition_lock & this ) { unlock  ( (blocking_lock &)this ); }
    3636static inline void   on_wait   ( single_acquisition_lock & this ) { on_wait ( (blocking_lock &)this ); }
     
    4747static inline void ^?{}( owner_lock & this ) {}
    4848static inline void   lock     ( owner_lock & this ) { lock    ( (blocking_lock &)this ); }
    49 static inline void   try_lock ( owner_lock & this ) { try_lock( (blocking_lock &)this ); }
     49static inline bool   try_lock ( owner_lock & this ) { return try_lock( (blocking_lock &)this ); }
    5050static inline void   unlock   ( owner_lock & this ) { unlock  ( (blocking_lock &)this ); }
    5151static inline void   on_wait  ( owner_lock & this ) { on_wait ( (blocking_lock &)this ); }
Note: See TracChangeset for help on using the changeset viewer.