History log of /haiku/src/kits/media/DormantNodeManager.cpp
Revision Date Author Comments
# 6967695c 24-Jul-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

PVS V547: always false comparisons

Change-Id: I1c7790ff0aa537b974bdc0fd65d76f277ea5f8cf
Reviewed-on: https://review.haiku-os.org/c/1647
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# b84955d4 23-Oct-2018 Barrett17 <b.vitruvio@gmail.com>

media: Remove debug.h, finalize MediaDebug.h

* Funny rust from 0 AD.


# f73f5d4c 29-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Initial changes to remove /boot/common

* find_directory() and hard-coded paths use /boot/system instead of
/boot/common.
* The build system creates the writable directories in /boot/system
instead of /boot/common.
* The build system no longer installs any packages in /boot/common.


# 332cc6bc 30-Nov-2012 Axel Dörfler <axeld@pinc-software.de>

64 bit fixes for libmedia.so, ActivityMonitor, and Sudoku.

* Alex, I feel your pain :-)


# f0a1eb2d 05-Jan-2010 Axel Dörfler <axeld@pinc-software.de>

* The static object construction and destruction is no longer random, but takes
the internal dependencies into account. This should fix bugs #5166, #5120,
and #5150.
* Also, the time source object manager, as well as the dormant node manager
are now recreated on media roster restart (when the media server is
restarted).


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


# 6cafce94 09-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

* Moved the port pool into the new request_data.cpp file; it's no longer
accessible from the outside.
* Instead, request_data now retrieves/releases a reply port on its own.
* There were some more places that still used write_port()/read_port() instead
of QueryServer().


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


# 9c3b4706 09-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

* Cleaned up the node manager, got rid of its use of Map, and List.
* Fixed at least two reference counting problems, but nodes from killed teams
still remain alive (will look into this at a later point).
* GetLiveNodes() is now using transfer_area() as well.
* Made all sizes in the SendTo*() and Query*() functions size_t.
* Replaced reinterpret_casts with static_casts when casting void pointers.
* Ordered the request/reply structures by target.
* Tried to consolidate the use of add_on vs. addon.
* More cleanup.


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


# bd563c20 07-Dec-2009 Rene Gollent <anevilyak@gmail.com>

GCC4 build fixes.



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


# 9834d875 07-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

* Rewrote PortPool, and put it into the BPrivate namespace.
* Renamed global variable _PortPool to gPortPool.


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


# 29bb91d6 07-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

* Cleaned up DormantNodeManager.
* Renamed global variable _DormantNodeManager to gDormantNodeManager.


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


# 9dec2310 05-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

Sorry for this large commit in advance; it's not really possible to divide this
into smaller parts:

media_addon_server:
* Removed (broken) use of (broken and inefficient) home-brewn Map, and List
classes. This also fixes a crash on shutdown when used with the malloc_debug
implementation. It's using stl::vector, and stl::map now instead.

_shared_buffer_list:
* Renamed _shared_buffer_list to SharedBufferList, and put it into the BPrivate
namespace. Also, made a class out of it.
* Separated shared buffer list creation from cloning.
* Enlarged maximum number of buffers to something that is not that evil, but
actually uses the space it has (ie. is a useful multiple of
shared_buffer_info that fills a multiple of B_PAGE_SIZE as much as possible).
* No longer drops into the debugger if the
* The list that is currently used is very inefficient for the features it
provides though (no change there).

_buffer_id_cache:
* Renamed to BufferCache, and put it into the private namespace
* It now deletes its buffers on deletion; since the BBufferConsumer will be
gone, too, at this point, there is little chance that there are still buffers
in use.
* Also, it's now using std::map instead of the (see above) Map class.

BBuffer:
* Got rid of the fBufferID member.

Misc.:
* Got rid of the global "team" variable; the media kit is now using the
private app kit's current_team() now.
* Added a lot of missing error checks (mostly memory allocations).
* Renamed fields like "flavorid" to flavor_id, renamed "dfi_*" fields to
something more detailed.
* Moved ServerInterface.h from src/servers/media/ to headers/private/media.
* Notifications.h was not self contained.
* Added missing licenses.
* Lots of cleanups, and coding style fixes.

What this doesn't fix:
* Bug #4954 which started all this (this comes next, though)
* Deinitialization is broken, as the PortPool is uninitialized too early, and
still used afterwards.
* The strange add-on monitoring code in the media_addon_server


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


# d91580cd 30-Aug-2003 beveloper <beveloper@nowhere.fake>

removed/fixed warnings


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


# 5ac4fbd7 19-Jun-2003 beveloper <beveloper@nowhere.fake>

clean up of debugging functions
FATAL is now replaced by ERROR and active at DEBUG=1 or above
TRACE is active at 2 or above
PRINT(level, ...) can be used for DEBUG= level or abode
INFO is removed


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


# 4295907b 01-Jun-2003 beveloper <beveloper@nowhere.fake>

fixed (hopefully) all latency bugs
fixed BMediaRoster::MakeTimeSourceFor()


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


# 255a01c7 14-Apr-2003 beveloper <beveloper@nowhere.fake>

Added a new license to this file, as I'm the author.


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


# 54187cc6 15-Mar-2003 beveloper <beveloper@nowhere.fake>

Global nodes can mow be released by the teams which created them.


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


# d2ecd5a9 14-Mar-2003 beveloper <beveloper@nowhere.fake>

code style cleanup


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


# 618b1338 10-Dec-2002 beveloper <beveloper@nowhere.fake>

cleanup


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


# 76669a29 08-Dec-2002 beveloper <beveloper@nowhere.fake>

changed use of port communication, debugging functions, map, list and stack


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


# 353b9f6b 02-Dec-2002 beveloper <beveloper@nowhere.fake>

changed map and list templates to be more useable, however, they will
be rewritten soon. Changed debugging macros and use of them, too.
Also replaced the linked lists in the BufferManager (which were complicated,
but working ok) with template based ones.


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


# 41ba915d 23-Nov-2002 beveloper <beveloper@nowhere.fake>

various small changes


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


# dfb2ad61 03-Nov-2002 beveloper <beveloper@nowhere.fake>

code cleanup


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


# 5edd2016 02-Oct-2002 beveloper <beveloper@nowhere.fake>

removed some warnings


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


# 16b7eea4 13-Aug-2002 beveloper <beveloper@nowhere.fake>

Add some experimental media add-on instantiating support, more debugging and bugfixes


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


# d6b71edf 12-Aug-2002 beveloper <beveloper@nowhere.fake>

Updated to make media_addon_server work with the DormantNodeManager class


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


# 3ba329f7 12-Aug-2002 beveloper <beveloper@nowhere.fake>

Start using a class for management and (perhaps later) caching of dormant media nodes


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


# 24509b3b 10-Jul-2002 beveloper <beveloper@nowhere.fake>

Stop these files breaking the build, needs to be fixed later


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


# 52a38012 08-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

It is accomplished ...


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


# f73f5d4c42a01ece688cbb57b5d332cc0f68b2c6 29-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Initial changes to remove /boot/common

* find_directory() and hard-coded paths use /boot/system instead of
/boot/common.
* The build system creates the writable directories in /boot/system
instead of /boot/common.
* The build system no longer installs any packages in /boot/common.


# 332cc6bc3b696473169bb9e43340b69a0a3fc4f1 30-Nov-2012 Axel Dörfler <axeld@pinc-software.de>

64 bit fixes for libmedia.so, ActivityMonitor, and Sudoku.

* Alex, I feel your pain :-)


# f0a1eb2dba3c1a4703f1b9f43292f6383358caf0 05-Jan-2010 Axel Dörfler <axeld@pinc-software.de>

* The static object construction and destruction is no longer random, but takes
the internal dependencies into account. This should fix bugs #5166, #5120,
and #5150.
* Also, the time source object manager, as well as the dormant node manager
are now recreated on media roster restart (when the media server is
restarted).


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


# 6cafce94b533adc869d1958cdc4cb6db178f65c6 09-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

* Moved the port pool into the new request_data.cpp file; it's no longer
accessible from the outside.
* Instead, request_data now retrieves/releases a reply port on its own.
* There were some more places that still used write_port()/read_port() instead
of QueryServer().


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


# 9c3b4706dd3ed8f9896031973852735223be485c 09-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

* Cleaned up the node manager, got rid of its use of Map, and List.
* Fixed at least two reference counting problems, but nodes from killed teams
still remain alive (will look into this at a later point).
* GetLiveNodes() is now using transfer_area() as well.
* Made all sizes in the SendTo*() and Query*() functions size_t.
* Replaced reinterpret_casts with static_casts when casting void pointers.
* Ordered the request/reply structures by target.
* Tried to consolidate the use of add_on vs. addon.
* More cleanup.


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


# bd563c20aa10cea8f6fba9c1f7582893b9bd5438 07-Dec-2009 Rene Gollent <anevilyak@gmail.com>

GCC4 build fixes.



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


# 9834d875d0b708296a98ce776cca2b96a1717b2b 07-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

* Rewrote PortPool, and put it into the BPrivate namespace.
* Renamed global variable _PortPool to gPortPool.


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


# 29bb91d6e5a32fc04749f5f4ef868be0a7d750b7 07-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

* Cleaned up DormantNodeManager.
* Renamed global variable _DormantNodeManager to gDormantNodeManager.


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


# 9dec23104287e2fd592cc14148b43fb28a6e1d8e 05-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

Sorry for this large commit in advance; it's not really possible to divide this
into smaller parts:

media_addon_server:
* Removed (broken) use of (broken and inefficient) home-brewn Map, and List
classes. This also fixes a crash on shutdown when used with the malloc_debug
implementation. It's using stl::vector, and stl::map now instead.

_shared_buffer_list:
* Renamed _shared_buffer_list to SharedBufferList, and put it into the BPrivate
namespace. Also, made a class out of it.
* Separated shared buffer list creation from cloning.
* Enlarged maximum number of buffers to something that is not that evil, but
actually uses the space it has (ie. is a useful multiple of
shared_buffer_info that fills a multiple of B_PAGE_SIZE as much as possible).
* No longer drops into the debugger if the
* The list that is currently used is very inefficient for the features it
provides though (no change there).

_buffer_id_cache:
* Renamed to BufferCache, and put it into the private namespace
* It now deletes its buffers on deletion; since the BBufferConsumer will be
gone, too, at this point, there is little chance that there are still buffers
in use.
* Also, it's now using std::map instead of the (see above) Map class.

BBuffer:
* Got rid of the fBufferID member.

Misc.:
* Got rid of the global "team" variable; the media kit is now using the
private app kit's current_team() now.
* Added a lot of missing error checks (mostly memory allocations).
* Renamed fields like "flavorid" to flavor_id, renamed "dfi_*" fields to
something more detailed.
* Moved ServerInterface.h from src/servers/media/ to headers/private/media.
* Notifications.h was not self contained.
* Added missing licenses.
* Lots of cleanups, and coding style fixes.

What this doesn't fix:
* Bug #4954 which started all this (this comes next, though)
* Deinitialization is broken, as the PortPool is uninitialized too early, and
still used afterwards.
* The strange add-on monitoring code in the media_addon_server


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


# d91580cd9a9f39e74f086d5ca31d997a56c111a9 30-Aug-2003 beveloper <beveloper@nowhere.fake>

removed/fixed warnings


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


# 5ac4fbd70dc5b5387cc80965de796deb820d4f05 19-Jun-2003 beveloper <beveloper@nowhere.fake>

clean up of debugging functions
FATAL is now replaced by ERROR and active at DEBUG=1 or above
TRACE is active at 2 or above
PRINT(level, ...) can be used for DEBUG= level or abode
INFO is removed


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


# 4295907bd14047fb8c4156fe2cb0b9103c36bed6 01-Jun-2003 beveloper <beveloper@nowhere.fake>

fixed (hopefully) all latency bugs
fixed BMediaRoster::MakeTimeSourceFor()


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


# 255a01c76a3ddc38d2c6cae806c4148b9bf022d4 14-Apr-2003 beveloper <beveloper@nowhere.fake>

Added a new license to this file, as I'm the author.


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


# 54187cc6e8dab0f8502b3fed8621e13ce44a3cf8 15-Mar-2003 beveloper <beveloper@nowhere.fake>

Global nodes can mow be released by the teams which created them.


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


# d2ecd5a91c08b5d2ef2daab2a3ac8dba2e5abd9d 14-Mar-2003 beveloper <beveloper@nowhere.fake>

code style cleanup


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


# 618b1338cc4b9a927de4b6c68c2dd378fcb9679e 10-Dec-2002 beveloper <beveloper@nowhere.fake>

cleanup


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


# 76669a292a7a9cdf48535ff3fe91db5de31ed35e 08-Dec-2002 beveloper <beveloper@nowhere.fake>

changed use of port communication, debugging functions, map, list and stack


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


# 353b9f6bcedb3fa9950f3f65c960e1deb700f84a 02-Dec-2002 beveloper <beveloper@nowhere.fake>

changed map and list templates to be more useable, however, they will
be rewritten soon. Changed debugging macros and use of them, too.
Also replaced the linked lists in the BufferManager (which were complicated,
but working ok) with template based ones.


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


# 41ba915d4209230c44208bc7480ea76532b984c9 23-Nov-2002 beveloper <beveloper@nowhere.fake>

various small changes


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


# dfb2ad6148f303a0ee57faecc282953d11156067 03-Nov-2002 beveloper <beveloper@nowhere.fake>

code cleanup


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


# 5edd2016f885d0ff879a1224b48e9435d7ae376b 02-Oct-2002 beveloper <beveloper@nowhere.fake>

removed some warnings


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


# 16b7eea41a06da4167cfd3e28a18681ca29ff04f 13-Aug-2002 beveloper <beveloper@nowhere.fake>

Add some experimental media add-on instantiating support, more debugging and bugfixes


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


# d6b71edf064b0ebdf8067335c08f8c4519f8cabc 12-Aug-2002 beveloper <beveloper@nowhere.fake>

Updated to make media_addon_server work with the DormantNodeManager class


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


# 3ba329f7bfaa2c97cb49bb95c650240cd7f7cdca 12-Aug-2002 beveloper <beveloper@nowhere.fake>

Start using a class for management and (perhaps later) caching of dormant media nodes


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


# 24509b3b8e7ee7b2c66bfdb997f6a5295adf3ceb 10-Jul-2002 beveloper <beveloper@nowhere.fake>

Stop these files breaking the build, needs to be fixed later


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


# 52a380120846174213ccce9c4aab0dda17c72083 08-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

It is accomplished ...


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