Changeset 2ed94a9 for libcfa/src/concurrency
- Timestamp:
- Feb 8, 2023, 2:27:55 PM (3 years ago)
- Branches:
- ADT, master, stuck-waitfor-destruct
- Children:
- b110bcc
- Parents:
- 997185e (diff), ccb29b4 (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. - Location:
- libcfa/src/concurrency
- Files:
-
- 1 added
- 5 edited
-
actor.hfa (added)
-
coroutine.hfa (modified) (2 diffs)
-
locks.hfa (modified) (3 diffs)
-
monitor.hfa (modified) (2 diffs)
-
mutex.hfa (modified) (2 diffs)
-
thread.hfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/coroutine.hfa
r997185e r2ed94a9 10 10 // Created On : Mon Nov 28 12:27:26 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jan 6 16:33:16 202213 // Update Count : 1 212 // Last Modified On : Thu Feb 2 11:31:42 2023 13 // Update Count : 13 14 14 // 15 15 … … 38 38 // Anything that implements this trait can be resumed. 39 39 // Anything that is resumed is a coroutine. 40 trait is_coroutine(T & | IS_RESUMPTION_EXCEPTION(CoroutineCancelled(T))) { 40 forall( T & | IS_RESUMPTION_EXCEPTION(CoroutineCancelled(T)) ) 41 trait is_coroutine { 41 42 void main(T & this); 42 43 coroutine$ * get_coroutine(T & this); -
libcfa/src/concurrency/locks.hfa
r997185e r2ed94a9 511 511 // flag showing if lock is held 512 512 volatile bool held; 513 514 #ifdef __CFA_DEBUG__515 // for deadlock detection516 struct thread$ * owner;517 #endif518 513 }; 519 514 … … 526 521 static inline void ?=?( spin_queue_lock & this, spin_queue_lock this2 ) = void; 527 522 528 // if this is called recursively IT WILL DEADLOCK! !!!!523 // if this is called recursively IT WILL DEADLOCK! 529 524 static inline void lock(spin_queue_lock & this) with(this) { 530 525 mcs_spin_node node; … … 645 640 //----------------------------------------------------------------------------- 646 641 // is_blocking_lock 647 trait is_blocking_lock(L & | sized(L)) { 642 forall( L & | sized(L) ) 643 trait is_blocking_lock { 648 644 // For synchronization locks to use when acquiring 649 645 void on_notify( L &, struct thread$ * ); -
libcfa/src/concurrency/monitor.hfa
r997185e r2ed94a9 10 10 // Created On : Thd Feb 23 12:27:26 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Dec 4 07:55:32 201913 // Update Count : 1 112 // Last Modified On : Thu Feb 2 11:29:21 2023 13 // Update Count : 12 14 14 // 15 15 … … 22 22 #include "stdlib.hfa" 23 23 24 trait is_monitor(T &) { 24 forall( T & ) 25 trait is_monitor { 25 26 monitor$ * get_monitor( T & ); 26 27 void ^?{}( T & mutex ); -
libcfa/src/concurrency/mutex.hfa
r997185e r2ed94a9 12 12 // Created On : Fri May 25 01:24:09 2018 13 13 // Last Modified By : Peter A. Buhr 14 // Last Modified On : Wed Dec 4 09:16:53 201915 // Update Count : 114 // Last Modified On : Thu Feb 2 11:46:08 2023 15 // Update Count : 2 16 16 // 17 17 … … 70 70 void unlock(recursive_mutex_lock & this) __attribute__((deprecated("use concurrency/locks.hfa instead"))); 71 71 72 trait is_lock(L & | sized(L)) { 72 forall( L & | sized(L) ) 73 trait is_lock { 73 74 void lock (L &); 74 75 void unlock(L &); -
libcfa/src/concurrency/thread.hfa
r997185e r2ed94a9 10 10 // Created On : Tue Jan 17 12:27:26 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Nov 22 22:18:34 202213 // Update Count : 3 512 // Last Modified On : Thu Feb 2 11:27:59 2023 13 // Update Count : 37 14 14 // 15 15 … … 27 27 //----------------------------------------------------------------------------- 28 28 // thread trait 29 trait is_thread(T &) { 29 forall( T & ) 30 trait is_thread { 30 31 void ^?{}(T& mutex this); 31 32 void main(T& this);
Note:
See TracChangeset
for help on using the changeset viewer.