History log of /haiku-fatelf/src/kits/support/Referenceable.cpp
Revision Date Author Comments
# a34020ba 06-Dec-2012 Rene Gollent <anevilyak@gmail.com>

A bit more fine-tuning to BReferenceable debugging.

- Rework quick stack range check as suggested by Ingo.
- If the ref count is > 1 we invoke the debugger unconditionally.
- If equal to 1, we first perform a quick heuristic check to see if the
var might be on the stack. If we can't conclusively determine that is,
we make certain by comparing to the thread's actual stack range.


# 4a5bcf0f 05-Dec-2012 Rene Gollent <anevilyak@gmail.com>

Rework debugging check in BReferenceable.

- If a BReferenceable object is deleted with a non-zero reference count,
we now test to see if the object was allocated on the stack. If so,
we don't flag a warning if the reference count is currently 1.


# 860c710c 04-Dec-2012 Rene Gollent <anevilyak@gmail.com>

Add some additional BReferenceable debugging.

- When libbe is built in debug mode, BReferenceable now issues a
debugger call if it's destroyed without all references having been
released.


# 8c3c1172 10-Jun-2011 Rene Gollent <anevilyak@gmail.com>

Adjust ReleaseReference() to also return the previous ref count as
AcquireReference() now does, and adjust all callers that relied on the previous
return type.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42091 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a99d0dd7 09-Jun-2011 Rene Gollent <anevilyak@gmail.com>

AcquireReference() now returns the previous ref count.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42079 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 756b64fd 16-Dec-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Removed the obsolescent [B]Reference[able] API and replaced the remaining
uses. Fixes the gcc 2 acpi build.
* Renamed WeakReferenceable::{Add,Remove}Reference() to
{Acquire,Release}Reference() for consistency.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39871 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d32f94f4 01-Oct-2010 Axel Dörfler <axeld@pinc-software.de>

* Added optional tracing support which can be very useful when debugging
reference count problems.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38866 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4736b6b9 04-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Made BReferenceable the class implementation and BPrivate::Referenceable the
typedef, so it's clearer which one is the preferred one.
* Added BReference, a clone of BPrivate::Reference.

BPrivate::{Referenceable,Reference} are being phased out. Only the B* versions
should be used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33879 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7aa7cb4b 01-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Renamed {Add,Remove}Reference() to {Acquire,Release}Reference(). Methods with
the old names still exist as deprecated aliases for the time being.
* Introduced hooks FirstReferenceAcquired() and LastReferenceReleased(). Besides
added flexibility this also makes the deleteWhenUnreferenced constructor
parameter and the fDeleteWhenUnreferenced attribute superfluous, since the
"don't delete" behavior can be obtained by overriding LastReferenceReleased().
Parameter and attribute will be removed eventually.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31367 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2851dbad 31-Jul-2007 Axel Dörfler <axeld@pinc-software.de>

* Moved Referenceable.cpp to src/kits/support (private libbe API), and its header to
private/shared.
* Made AddReference() and CountReferences() inlines.
* The registrar is now using the private Referenceable version in libbe.so.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21767 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8c3c1172011e71f591060f73e460f45a717a4e31 10-Jun-2011 Rene Gollent <anevilyak@gmail.com>

Adjust ReleaseReference() to also return the previous ref count as
AcquireReference() now does, and adjust all callers that relied on the previous
return type.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42091 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a99d0dd7b7a920540401d591a54a5776afb5ec48 09-Jun-2011 Rene Gollent <anevilyak@gmail.com>

AcquireReference() now returns the previous ref count.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42079 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 756b64fd836dad5b63f41f0b01f8cedfec795f9d 16-Dec-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Removed the obsolescent [B]Reference[able] API and replaced the remaining
uses. Fixes the gcc 2 acpi build.
* Renamed WeakReferenceable::{Add,Remove}Reference() to
{Acquire,Release}Reference() for consistency.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39871 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d32f94f43c296e2346c045bef770b8926794c2e8 01-Oct-2010 Axel Dörfler <axeld@pinc-software.de>

* Added optional tracing support which can be very useful when debugging
reference count problems.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38866 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4736b6b9e5ea079bfb704c0b3be6525c02c9a83a 04-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Made BReferenceable the class implementation and BPrivate::Referenceable the
typedef, so it's clearer which one is the preferred one.
* Added BReference, a clone of BPrivate::Reference.

BPrivate::{Referenceable,Reference} are being phased out. Only the B* versions
should be used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33879 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7aa7cb4b54735360df17571f51e3631418617833 01-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Renamed {Add,Remove}Reference() to {Acquire,Release}Reference(). Methods with
the old names still exist as deprecated aliases for the time being.
* Introduced hooks FirstReferenceAcquired() and LastReferenceReleased(). Besides
added flexibility this also makes the deleteWhenUnreferenced constructor
parameter and the fDeleteWhenUnreferenced attribute superfluous, since the
"don't delete" behavior can be obtained by overriding LastReferenceReleased().
Parameter and attribute will be removed eventually.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31367 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2851dbad53bd9d11b64ba4267c96f637d133f81c 31-Jul-2007 Axel Dörfler <axeld@pinc-software.de>

* Moved Referenceable.cpp to src/kits/support (private libbe API), and its header to
private/shared.
* Made AddReference() and CountReferences() inlines.
* The registrar is now using the private Referenceable version in libbe.so.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21767 a95241bf-73f2-0310-859d-f6bbb57e9c96