atomic counters implemented
Bug #617988 reported by
Gennady Proskurin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DC++ |
Fix Released
|
Low
|
Unassigned | ||
LinuxDC++ |
Confirmed
|
Low
|
Unassigned |
Bug Description
Implemented atomic class template, which includes int32_t and uint32_t portable atomic counters from boost.
Using this class in "struct Counts" instead of heavy-weight safeInc/safeDec functions.
Also "operator!=" is removed from struct Counts (it is unused, and it is not safe in multithread)
Related branches
lp://qastaging/~gpr/linuxdcpp/sync
Ready for review
for merging
into
lp://qastaging/linuxdcpp
- LinuxDC++ Team: Pending requested
-
Diff: 489 lines (+171/-91)12 files modifieddcpp/Atomic.h (+122/-0)
dcpp/BufferedSocket.cpp (+3/-3)
dcpp/BufferedSocket.h (+5/-1)
dcpp/Client.cpp (+6/-6)
dcpp/Client.h (+14/-6)
dcpp/CriticalSection.h (+7/-27)
dcpp/Pointer.h (+4/-4)
dcpp/Semaphore.h (+5/-2)
dcpp/ShareManager.cpp (+3/-3)
dcpp/ShareManager.h (+2/-1)
dcpp/Thread.cpp (+0/-4)
dcpp/Thread.h (+0/-34)
lp://qastaging/~gpr/dcplusplus/sync
Ready for review
for merging
into
lp://qastaging/dcplusplus
- Jacek Sieka: Needs Information
-
Diff: 408 lines (+171/-53)10 files modifieddcpp/Atomic.h (+122/-0)
dcpp/BufferedSocket.cpp (+3/-3)
dcpp/BufferedSocket.h (+5/-1)
dcpp/Client.cpp (+6/-6)
dcpp/Client.h (+14/-6)
dcpp/CriticalSection.h (+7/-27)
dcpp/Pointer.h (+4/-4)
dcpp/Semaphore.h (+5/-2)
dcpp/ShareManager.cpp (+3/-3)
dcpp/ShareManager.h (+2/-1)
To post a comment you must log in.
Marking as fixed in dc++. Let us know if you disagree with the approach taken since it differs from your patch.
Will be included in linuxdcpp once we upgrade the core.