Commit Graph

32824 Commits

Author SHA1 Message Date
Ingo Weinhold
db905187d5 Implemented a class uint128 with the basic arithmetic operations and
replaced the previous, somewhat complicated and inexact method of
computing the TSC conversion factor using it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34542 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-07 21:37:56 +00:00
Axel Dörfler
559a6a891c * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34541 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-07 21:32:59 +00:00
Axel Dörfler
9834d875d0 * 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
2009-12-07 21:28:08 +00:00
Axel Dörfler
92c66394a2 * Accidently put gDormantNodeManager into the public namespace.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34539 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-07 21:27:21 +00:00
Axel Dörfler
29bb91d6e5 * 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
2009-12-07 21:11:13 +00:00
Ingo Weinhold
522c2f19d4 * Added a simple mechanism to wait for events to VMCache. WaitForPageEvents()
waits for certain events on a given page, NotifyPageEvents() wakes up
  waiting threads respectively.
* Used the new feature instead of condition variables for waiting on busy
  pages. We save publishing and unpublishing of a condition variable whenever
  a page is marked busy. There's only something to do, if there's at least
  one thread waiting in the list of the respective cache. The general
  assumption is that this is only rarely the case and even if it happens,
  there should be only very few threads.
* Added an apparently missing notification in cache_io(). At least I didn't
  see the reason for it not being there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34537 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-07 15:42:08 +00:00
Ingo Weinhold
6440406a59 Style changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34536 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-07 14:28:56 +00:00
Ingo Weinhold
be7328a9f6 Moved VMCache related definitions to <vm/VMCache.h>.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34535 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-07 14:14:21 +00:00
Axel Dörfler
74e2b87511 * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34534 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-07 14:01:33 +00:00
Ingo Weinhold
bcfdfff497 Added 64 bit TODO. We'll probably have to change the interface (cookie type)
of get_next_area_info() and others.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34533 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-07 12:26:26 +00:00
Axel Dörfler
4e890d3456 * Added a WaitingObjects page to the debug analyzer; I don't consider it
finished yet (it's a simple list of all waiting object groups, but should be
  a tree), but it might already be helpful enough.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-07 11:46:01 +00:00
Ingo Weinhold
e55886c3a3 Make iteration safe. VMKernelAddressSpace::Next() doesn't like NULL pointers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34531 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-07 01:56:01 +00:00
Stefano Ceccherini
179ec686e4 TermView constructor throws an exception if initializing the object failed.
TermWindow catches the exception, and quits the application in that case.
Fixed weird wrapping of the text in the about window.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34530 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-06 23:17:31 +00:00
Colin Günther
2166eec15c * Removing some targets which where usefull when atheros driver was distributed
outside of Haiku's repository, only. 
* Also this fixes the build break that arose when the Haiku repo was checked
  out with something different than svn (git for example:), due to a hardcoded
  reference to the svn entries file.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34529 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-06 21:21:17 +00:00
Ingo Weinhold
40cd019ea0 * Renamed VMAddressSpace::ResizeArea{Head,Tail}() to ShrinkArea{Head,Tail}()
to clarify that they never enlarge the area.
* Reimplemented VMKernelAddressSpace. It is somewhat inspired by Bonwick's
  vmem resource allocator (though we have different requirements):
  - We consider the complete address space to be divided into contiguous
    ranges of type free, reserved, or area, each range being represented by
    a VMKernelAddressRange object.
  - The range objects are managed in an AVL tree and a doubly linked list
    (the latter only for faster iteration) sorted by address. This provides
    O(log(n)) lookup, insertion and removal.
  - For each power of two size we maintain a list of free ranges of at least
    that size. Thus for the most common case of B_ANY*_ADDRESS area
    allocation, we find a free range in constant time (the rest of the
    processing being O(log(n))) with a rather good fit. This should also
    help avoiding address space fragmentation.
  While the new implementation should be faster, particularly with an
  increasing number of areas, I couldn't measure any difference in the -j2
  haiku build. From a cursory test the -j8 build hasn't tangibly benefitted
  either.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34528 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-06 17:18:04 +00:00
Ingo Weinhold
fe30b74fde Fix for stack traces in the early boot process: The thread might not have
its stack top/bottom assigned yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34527 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-06 16:01:21 +00:00
Ingo Weinhold
a54549a8cd * AVLTree:
- Renamed to AVLTreeBase and moved it into its own header/source file.
  - Renamed FindClose() to FindClosest().
  - Added CheckTree() method for debugging purposes. It checks the validity
    of the tree.
* Added a templatized class AVLTree which doesn't offer a map-like interface
  like AVLTreeMap, but rather one similar to BOpenHashMap and SplayTree. It
  is more convenient to use, if one wants to store objects that already
  contain the key.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34526 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-06 15:59:37 +00:00
Ingo Weinhold
4fb60da357 Removed the DoublyLinkedListLink constructor and destructor. They are not
necessary and prevent the structures from being used in a union.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34525 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-06 15:47:34 +00:00
Ingo Weinhold
6490c5b621 Fixed __HAIKU_PRI_PREFIX_ADDR definition.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34524 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-06 15:46:03 +00:00
François Revol
fa66a805cc - check for projets on my OSX folder,
- fix listing projects when there are none yet, don't use ls|sed,
- don't use source as it's bash specific, and test if the .profile exists, avoids a warning when bootstrapping a project,
- add vim as a fallback $EDITOR.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34523 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-06 14:31:24 +00:00
François Revol
4dc69971bc Force 64bit for i686-apple-darwin10 (OSX), since it seems to fool everyone about it being still 32bit (well the kernel maybe but not the rest). This makes the build go further along on OSX 10.6.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34522 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-06 14:22:44 +00:00
Stephan Aßmus
b8ec67f491 * Simplified and optimized a lot the "ToString()" debugging facilities.
* *::Index() is now const, thanks to the BList improvements.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-06 13:14:45 +00:00
Stephan Aßmus
b0850e9ba1 * Code and header indentation cleanup
* Added operator== and !=
 * Added check for list != this in operator=
 * Added HasItem() and IndexOf() versions that take const void*, duplicating
   the code, since I didn't want to introduce another function call in these
   potentially time critical methods.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-06 12:44:38 +00:00
Colin Günther
bc69c291c2 Recopying ralinkwifi from vendor/freebsd/RELEASE_8_0_0 and made it compiling
well. This approach was taken to ensure that the version information propagates
correctly to the repository mirrors.
See comment from nielsx on this topic here: http://www.freelists.org/post/haiku-commits/r34507-in-haikutrunksrcaddonskerneldriversnetworkwlan-ralinkwifi-ralinkwifidev-ralinkwifidevral,3


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34519 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-06 11:48:33 +00:00
Colin Günther
05d66b370a Removing the ralinkwifi, for readding it with correct version information the
next time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34518 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-06 11:40:16 +00:00
Colin Günther
a3915b9de0 Copied marvell88w8335 driver from vender/freebsd/RELEASE_8_0_0 and made it
compiling fine. So linking still needs to be worked on.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34517 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-06 11:17:50 +00:00
Stefano Ceccherini
caadca9182 Also delete the BScrollBar we detach from the BScrollView.
Even if it was detached, it was still scrolling the view, causing bug
#5077. Moreover we were leaking it.
Also call TargetedByScrollBar on the "old" target with a NULL parameter,
and on the new target, with "this".



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34516 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-06 10:41:03 +00:00
Stefano Ceccherini
955e542ab4 gcc4 build fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34514 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 17:13:58 +00:00
Stefano Ceccherini
503954dcf9 gcc4 build fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34513 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 17:06:44 +00:00
Axel Dörfler
e9b349e887 * The media_addon_server is now using the more or less shared
AddOnMonitorHandler solution, instead of doing its own thing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34512 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 15:09:48 +00:00
Axel Dörfler
efb527ca96 * Removed BeOS drop-in support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34511 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 15:07:49 +00:00
Axel Dörfler
f0f0a2d136 * Removed unnecessary defines.
* Removed COMPILE_FOR_R5 support.
* No need for the distribution files any longer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34510 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 15:04:43 +00:00
Axel Dörfler
125a95f1ef * Reduced default stable time.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34509 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 15:03:33 +00:00
Axel Dörfler
dca6b4f951 * Renamed main.cpp to MediaAddonServer.cpp.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34508 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 14:28:19 +00:00
Colin Günther
7bb39c3df3 Adding ralinkwifi driver. This driver compiles, only, as there is a glue.c
is missing atm. If someone wanne add it go ahead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34507 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 14:24:30 +00:00
Colin Günther
afa6c0001b This driver needs a swi taskqueue
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34506 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 14:06:45 +00:00
Axel Dörfler
fcc7a1cb83 * Since the old R3 media API is not implemented anyway, I've now temporarily
removed it from the build.
* If you encounter any (useful) applications that need it, please file a bug
  report, otherwise those will be removed permanently.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34505 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 13:56:08 +00:00
Axel Dörfler
a1e0f39f45 * Build fix; the Jamfile changes caused those to be broken.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34504 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 13:34:39 +00:00
Colin Günther
21e74f0305 Whitespace cleanup. No functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34503 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 12:05:37 +00:00
Axel Dörfler
2f9ed888a2 * The SharedBufferList is now only cloned once in a team, no longer once for
each buffer, and once for each buffer group.
* Also, SharedBufferList::Get() now gets the area to clone from itself, if
  necessary, the caller no longer has to provide it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34502 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 11:52:01 +00:00
Colin Günther
69972fe0de Enabling usage of C++ structures in C only code for the wlan stack, too. This
fixes the problem where building wlan drivers failed, due to not yet assembled
kernel_c++_structs_sizes.h while only the wlan stack needed to be compiled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34501 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 11:16:02 +00:00
Axel Dörfler
9dec231042 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
2009-12-05 11:11:28 +00:00
Axel Dörfler
04c71a2f1d * Removed code duplication, SetBufferGroup() will now use AllocateBuffers()
instead of doing the same manually.
* AllocateBuffers() is now returning a status code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34499 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 10:46:49 +00:00
Stephan Aßmus
ca8b3261b1 According to the BeBook, BListView passes the flags unchanged to the BView
constructor. This means we have to provide B_FRAME_EVENTS ourselves, if we
want don't want to enforce this in the BListView code. This fixes ticket
#5081 (Attribute list view scrollbar not maintained when window size changes).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34498 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 09:43:32 +00:00
Rene Gollent
5b41cd61e6 Clear the navigation menu before populating it. Fixes ticket #5079.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34497 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 00:06:32 +00:00
Ingo Weinhold
08d9b6d462 Obvious copy and paste left-over. Totally missed it as I've been testing
the wrong image for quite a while. :-/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-04 21:32:00 +00:00
Ingo Weinhold
2c1886aeae * Added VMArea subclasses VM{Kernel,User}Area and moved the address space list
link to them.
* VM{Kernel,User}AddressSpace manage the respective VMArea subclass now, and
  VMAddressSpace has grown factory methods {Create,Delete}Area.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34493 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-04 17:07:16 +00:00
Ingo Weinhold
e2518ddbb1 Made VMAddressSpace an abstract base class and moved the area management into
new derived classes VM{Kernel,User}AddressSpace. Currently those are
identical, but that will change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-04 14:45:08 +00:00
Ingo Weinhold
38a97b2c36 Moved all knowledge of reserved areas from vm.cpp to VMAddressSpace. It's a
pure address space feature, so it should be handled there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34491 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-04 13:33:25 +00:00
Colin Günther
ef102a3599 Removing superflous headers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34490 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-04 13:15:48 +00:00