[ https://issues.apache.org/jira/browse/TS-2254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13793370#comment-13793370 ]
ASF subversion and git services commented on TS-2254: ----------------------------------------------------- Commit a3d98482c1ad8b81494efae5222dd2fff4504a3c in branch refs/heads/master from [~happy_fish100] [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=a3d9848 ] TS-2254 On ARM arch, ink_atomic_increment returns wrong value It should return the old value, before the increment. This is consistent with how the other ink_atomic_increment implementation works. Review: leif > ink_atomic_increment should return the old value > ------------------------------------------------ > > Key: TS-2254 > URL: https://issues.apache.org/jira/browse/TS-2254 > Project: Traffic Server > Issue Type: Bug > Components: Core > Reporter: Yu Qing > Assignee: Yu Qing > Fix For: 4.1.0 > > Attachments: > 0001-TS-2254-ink_atomic_increment-should-return-the-old-v.patch > > > lib/ts/ink_atomic.h > 197 template<> > 198 inline int64_t > 199 ink_atomic_increment<int64_t>(pvint64 mem, int64_t value) { > 200 int64_t curr; > 201 ink_mutex_acquire(&__global_death); > 202 curr = *mem; > 203 *mem = curr + value; > 204 ink_mutex_release(&__global_death); > 205 return curr + value; //SHOULD return curr! > 206 } > this function should return the old value (curr, NOT curr + value). it should > return same value as gcc inline function __sync_fetch_and_add. -- This message was sent by Atlassian JIRA (v6.1#6144)