Merge lp://staging/~gpr/linuxdcpp/sync into lp://staging/linuxdcpp

Proposed by Gennady Proskurin
Status: Needs review
Proposed branch: lp://staging/~gpr/linuxdcpp/sync
Merge into: lp://staging/linuxdcpp
Diff against target: 489 lines (+171/-91)
12 files modified
dcpp/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)
To merge this branch: bzr merge lp://staging/~gpr/linuxdcpp/sync
Reviewer Review Type Date Requested Status
LinuxDC++ Team Pending
Review via email: mp+32714@code.staging.launchpad.net

Description of the change

+ includes all patches submitted in corresponding bug reports
+ Thread::safeDec/Inc/Exchange functions are replaced by more fine-grained/lightweight/portable implementations
+ Thread::safeDec/Inc/Exchange functions removed (as unused)

Bug #617021: Semaphore potentially may underflow and become negative
Bug #617591: Pointer.h/intrusive_ptr_base class is too heavy-weight
Bug #617757: portable FastCriticalSection implementation
Bug #617988: atomic counters implemented

To post a comment you must log in.

Unmerged revisions

391. By Gennady Proskurin

Remove unused include <sched.h>, which was used for sched_yield() earlier.

390. By Gennady Proskurin

Remove unused Thread::safeExchange function and associated mutex.

389. By Gennady Proskurin

Use Atomic<bool> for "refreshing" variable.

388. By Gennady Proskurin

Implement exchange() function for Atomic template (only for memory_ordering_strong for now).
It assigns new value to atomic, returns old value.

387. By Gennady Proskurin

Remove Thread::safeInc/safeDec functions. They are unused now.

386. By Gennady Proskurin

Change BufferedSocket::sockets to Atomic (strong variant).

385. By Gennady Proskurin

Implement "strong memory ordering" variant of Atomic template.
For counters in "struct Counts" "weak" variant is sufficient.

384. By Gennady Proskurin

Remove unused Thread::yield functions.

383. By Gennady Proskurin

include <boost/detail/atomic_count.hpp> -> <boost/smart_ptr/detail/atomic_count.hpp>
The later header is garanteed to have necessary memory barrier for refcounting.
For now, it is no-op (it is the same header).

382. By Gennady Proskurin

Recheck predicate after wakeup of cond_wait/cond_timedwait

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: