| 101 | } |
| 102 | |
| 103 | void |
| 104 | DCPS_IR_Participant::changeOwner(long sender, long owner) |
| 105 | { |
| 106 | { |
| 107 | ACE_GUARD(ACE_SYNCH_MUTEX, guard, this->ownerLock_); |
| 108 | |
| 109 | if ((owner == OWNER_NONE) |
| 110 | && (this->isOwner() || (this->owner_ != sender))) { |
| 111 | // Do not eliminate ownership if we are the owner or if the update |
| 112 | // does not come from the current owner. |
| 113 | return; |
| 114 | } |
| 115 | |
| 116 | // Finally. Change the value. |
| 117 | this->owner_ = owner; |
| 118 | |
| 119 | } // End of lock scope. |
| 120 | |
| 121 | if (this->isOwner()) { |
| 122 | /// @TODO: Ensure that any stalled callbacks are made. |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | long |
| 127 | DCPS_IR_Participant::owner() const |
no test coverage detected