- Timestamp:
- Jun 20, 2023, 2:20:56 PM (2 years ago)
- Branches:
- master
- Children:
- 48ec19a
- Parents:
- b7b3e41 (diff), d10e391 (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:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/actor.hfa
rb7b3e41 radc73a5 46 46 enum allocation { Nodelete, Delete, Destroy, Finished }; // allocation status 47 47 48 typedef allocation (*__receive_fn)(actor &, message & );48 typedef allocation (*__receive_fn)(actor &, message &, actor **, message **); 49 49 struct request { 50 actor * base_receiver;51 50 actor * receiver; 52 message * base_msg;53 51 message * msg; 54 52 __receive_fn fn; … … 59 57 }; 60 58 static inline void ?{}( request & this ) {} 61 static inline void ?{}( request & this, actor * base_receiver, actor * receiver, message * base_msg, message * msg, __receive_fn fn ) { 62 this.base_receiver = base_receiver; 59 static inline void ?{}( request & this, actor * receiver, message * msg, __receive_fn fn ) { 63 60 this.receiver = receiver; 64 this.base_msg = base_msg;65 61 this.msg = msg; 66 62 this.fn = fn; … … 460 456 static inline void deliver_request( request & this ) { 461 457 DEBUG_ABORT( this.receiver->ticket == (unsigned long int)MAX, "Attempted to send message to deleted/dead actor\n" ); 462 this.base_receiver->allocation_ = this.fn( *this.receiver, *this.msg ); 463 check_message( *this.base_msg ); 464 check_actor( *this.base_receiver ); 458 actor * base_actor; 459 message * base_msg; 460 allocation temp = this.fn( *this.receiver, *this.msg, &base_actor, &base_msg ); 461 base_actor->allocation_ = temp; 462 check_message( *base_msg ); 463 check_actor( *base_actor ); 465 464 } 466 465 -
libcfa/src/concurrency/locks.hfa
rb7b3e41 radc73a5 35 35 #include <linux/futex.h> /* Definition of FUTEX_* constants */ 36 36 #include <sys/syscall.h> /* Definition of SYS_* constants */ 37 #include <unistd.h> 37 #include <unistd.h> /* Definition of syscall routine */ 38 38 39 39 typedef void (*__cfa_pre_park)( void * );
Note:
See TracChangeset
for help on using the changeset viewer.