- File:
-
- 1 edited
-
libcfa/src/concurrency/actor.hfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/actor.hfa
re23169b rd40555e 442 442 443 443 static inline void check_message( message & this ) { 444 CFA_DEBUG( this.allocation_ = Finished; ) 445 switch ( this.allocation_ ) { // analyze message status 444 #ifdef __CFA_DEBUG__ 445 Allocation temp = this.allocation_; 446 this.allocation_ = Finished; 447 switch ( temp ) 448 #else 449 switch ( this.allocation_ ) 450 #endif 451 { // analyze message status 446 452 case Nodelete: break; 447 453 case Delete: delete( &this ); break; … … 675 681 // assigned at creation to __base_msg_finished to avoid unused message warning 676 682 message __base_msg_finished @= { .allocation_ : Finished }; 677 struct __DeleteMsg { inline message; } DeleteMsg = __base_msg_finished; 678 struct __DestroyMsg { inline message; } DestroyMsg = __base_msg_finished; 679 struct __FinishedMsg { inline message; } FinishedMsg = __base_msg_finished; 680 void ?{}( __DeleteMsg & this, Allocation status ) { ((message &) this){ status }; } 681 void ?{}( __DestroyMsg & this, Allocation status ) { ((message &) this){ status }; } 682 void ?{}( __FinishedMsg & this, Allocation status ) { ((message &) this){ status }; } 683 struct __DeleteMsg { inline message; }; 684 struct __DestroyMsg { inline message; }; 685 struct __FinishedMsg { inline message; }; 686 687 // These are needed so that the compiler doesn't make a temporary when initializing below 688 static inline void ?{}( __DeleteMsg & this, message & other ) { this.allocation_ = other.allocation_; } 689 static inline void ?{}( __DestroyMsg & this, message & other ) { this.allocation_ = other.allocation_; } 690 static inline void ?{}( __FinishedMsg & this, message & other ) { this.allocation_ = other.allocation_; } 691 692 __DeleteMsg DeleteMsg = __base_msg_finished; 693 __DestroyMsg DestroyMsg = __base_msg_finished; 694 __FinishedMsg FinishedMsg = __base_msg_finished; 683 695 684 696 Allocation receive( actor & this, __DeleteMsg & msg ) { return Delete; }
Note:
See TracChangeset
for help on using the changeset viewer.