Commit Graph

3553 Commits

Author SHA1 Message Date
Axel Dörfler 6242fd5977 * Added the possibility to debug latency issues with spinlocks.
* When DEBUG_SPINLOCK_LATENCIES is 1, the system will panic if any spinlock is
  held longer than DEBUG_LATENCY micro seconds (currently 200). If your system
  doesn't boot anymore, a new safemode setting can disable the panic.
* Besides some problems during boot when the MTRRs are set up, 200 usecs work
  fine here if all debug output is turned off (the output stuff is definitely
  problematic, though I don't have a good idea on how to improve upon it a lot).
* Renamed the formerly BeOS compatible safemode settings to look better; there
  is no need to be compatible there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33953 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-08 20:26:48 +00:00
Axel Dörfler 01ce3f26d2 * Cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33951 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-08 17:31:39 +00:00
Ingo Weinhold be350af3d9 Added methods AddToMessage() and SetFromMessage() to add the value of the
variant as a field to a message, respectively initialize the variant from
one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33901 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-05 17:24:58 +00:00
Ingo Weinhold 8d24cfc6c2 * Added Iterator::NextValuePointer().
* Made reference returned by _GetKey() const. That's sufficient.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33898 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-05 17:18:12 +00:00
Ingo Weinhold 4736b6b9e5 * 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
2009-11-04 15:08:53 +00:00
Axel Dörfler 29e37d8842 * Made BTokenSpace not throw any exceptions on memory shortage.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33874 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-04 12:19:59 +00:00
Colin Günther 8ac8b52a03 Removed part about where RadixBitmap is currently used, because the FreeBSD compat layer uses it, too. I think it is prone to inconsistency managing a usage list in the header file.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33860 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-01 20:37:03 +00:00
Brecht Machiels 8b20f2e4ae forgot to add this file in r33815
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33821 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-28 21:37:38 +00:00
Axel Dörfler d337132b41 * Coding style cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33792 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-27 18:22:39 +00:00
Axel Dörfler 86a999adfb * delete_owned_ports() no longer scans the whole port array for ports belonging
to the owning team.
* Instead, the team now maintains a list containing the ports it owns.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33771 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-26 13:34:43 +00:00
Axel Dörfler 7691a788d0 * Minor cleanup, updated copyright.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33762 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-25 15:14:49 +00:00
Rene Gollent 203049400f Also remove _B_APP_INFO_RESERVED1_ as it's used for nothing whatsoever.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33758 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-25 13:11:29 +00:00
Rene Gollent 75f60c8b38 Set default flags to B_MULTIPLE_LAUNCH only, as is the case on BeOS. This fixes issues where apps that forgot to specify flags in their resources would be unable to receive remote messages.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33755 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-25 03:34:24 +00:00
Rene Gollent 650454ae2e gcc4 build fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33753 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-24 01:26:14 +00:00
Brecht Machiels dfdfbd3eef * added support for GM45 (might work for other chips in the G4 series)
* added header for dealing with binary numbers and bitmasks (C++ templates)
   these "macro's" might not work well for long words, though


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33749 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-23 23:03:49 +00:00
Axel Dörfler ddbe12007a * Semaphores are now put into the team struct in a doubly linked list.
* This makes sem_delete_owned_sems() a lot more efficient; before it would need
  to scan the entire semaphore table.
* This speeds up the test build of the kernel by another 2 seconds (with
  KDEBUG=2) on my laptop.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33743 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-23 02:06:51 +00:00
Axel Dörfler f28dd36b82 * The alphabet is obviously hard, moved some tracing defines at their
(hopefully) correct place.
* It seems to be even harder to understand basic locking primitives: when you
  think about it, it shouldn't surprise you that conditional variables never
  return B_WOULD_BLOCK. This fixes gdb again.
* Added tracing support to the ports subsystem.
* get_port_message() will now resize the port heap if needed (but will also
  take timeouts into account while doing so, more or less). The initial port
  space is 4MB (as before), the growth rate is the same, and the system wide
  limit is arbitrarily set to 64 MB (all swappable). A team limit has been set
  to 8 MB, but is not enforced yet. Since ports are using up address space in
  the kernel, those seems to be proper limits.
* This also fixes a strange, and rare lockup where the mouse cursor would still
  move, but everything else would basically hang, but look perfectly normal from
  KDL on the first look. As recently happened on Brecht's laptop, and debugged
  by mmlr and me: the cbuf space got used up when lots of windows wanted to
  redraw after a workspace switch. The app_server wouldn't answer anymore to
  client requests, but thought it would have done so, as LinkSender::Flush()
  doesn't care if it got a B_NO_MEMORY (the ports will now block until memory
  is available if possible, so that should not be a problem anymore).
* Improved "port" KDL command, it now also prints the messages in the port.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33735 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-22 23:14:10 +00:00
Brecht Machiels 926e63c885 * added click to focus mouse mode; right-click for bring-to-front and send-to-back
(might cause some regressions in FFM)
* made accept first click user configurable
* updated the Mouse preflet to use the layout kit
* removed the warp and instant warp modes from the Mouse preflet
* changed internal representation of mouse modes (warp modes moved)
* coding style fixes



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33732 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-22 21:10:19 +00:00
Axel Dörfler e8885f2097 Basically rewrote the ports subsystem to use:
* its own heap allocator instead of cbuf - this makes cbuf superfluous, and I
  therefore removed it from the kernel. The heap is swappable, so lifts the
  kernel's resource usage a bit. In the future, the heap should grow as well;
  right now it should be at least as good as before.
* it no longer uses spinlocks, but just mutexes now for better scalability - it
  was not usable with interrupts turned off anyway (due to its semaphore usage).
* it no longer uses semaphores, but condition variables.
* Needed to move the port initialization to a later point, as swappable memory
  wasn't usable that early.
* All ports test are still passing, hopefully I didn't mess anything up :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33728 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-22 13:24:12 +00:00
Axel Dörfler e0aad96f94 * Allow to use symbols as variables (prefixed with '@'). Now only tab completion
for variable names is missing B-}


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33723 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-22 11:44:29 +00:00
Axel Dörfler 68d9d8809b * Just use the heap instead of cbuf for send_data().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33722 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-22 11:42:51 +00:00
Michael Lotz 4bee71c211 * Implement per-CPU heaps. They only get enabled in case there's enough memory.
* Allow an allocator to be created on the heap to allow for non-locked
  allocators to be created.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33721 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-22 08:57:34 +00:00
Michael Lotz 5ee1f125e5 Make use of the wait status field so it can be provided in Notify() and then
read out in the ConditionVariableEntry::WaitStatus(). That way you can notify
with a specific status that can be read out on the other end.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33718 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-21 23:44:59 +00:00
François Revol 546376e654 Typo.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33671 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-19 23:23:33 +00:00
François Revol 7c595f3353 ARM920T specific definitions (not done yet).
Board config file for the FreeRunner.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33667 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-19 21:13:46 +00:00
Rudolf Cornelissen b793b9cbd0 added dithering support for DAC1. Dithering is enabled for digitally connected panels on DAC1 on laptops. This should remove the 'colorbands' displayed previously on gradients. Bumped version to 1.06.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33653 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-19 10:33:01 +00:00
Axel Dörfler 39e3058e5b * Reverted r33643 - while it doubled the performance for my test case (with
high contention of the read lock (I experimented with the VM page mapping
  lock)), it actually hurt the compile performance pretty obviously.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33647 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-19 00:16:54 +00:00
Stephan Aßmus 7d05cf36fc Revert my additions to the patch from #4733, Core 2, Core 2 Duo and Core 2
Quad are all reported as "Core 2", because the CPU count is already reported
separately.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33646 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-19 00:07:59 +00:00
Axel Dörfler 22ea088498 * The rw_lock is now using a mutex to protect its reader/writer counts. This
makes the reader case a lot less expensive, and should relieve the thread
  spinlock contention a bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33643 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-18 19:52:09 +00:00
Axel Dörfler b2a7fcb404 * Added an arch_debug_stack_trace() function that is called from the KDL loop
in case there aren't any KDL commands available yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33642 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-18 19:50:13 +00:00
Axel Dörfler 795bd7a697 * The save_lvds_mode() function did not correctly support the i965 chipset -
I've now removed that code, and factored out a retrieve_current_mode()
  function that can work on head A and B.
* This fixes Adrien's flickering problem on his laptop - I can't find the
  bug ticket, though. Hopefully it does not break other laptop chips. Testing
  would be welcome, as I don't have any other machine here.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33633 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-18 10:03:01 +00:00
Axel Dörfler 9b912c694a * Cleanup, no functional change - this is now a pure C++ header.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33596 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-15 10:13:02 +00:00
Axel Dörfler 3066f3dbf8 * Reverted r33547, this closes bug #4782 - this is obviously a regression in
GCC4.
* Adapted code accordingly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-15 07:48:31 +00:00
Ingo Weinhold 2fc49d9b36 Added ColumnAt(BPoint) version.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33587 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-15 04:31:42 +00:00
Oliver Tappe 41426d9bac * Moved three locale-related headers back into a safe place (where no
software looking for them will find them) as a temporary fix for #4747.
  In the long run, the functions declared in these headers should be
  implemented by means of ICU and then the headers shall be made public again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33575 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-13 17:15:49 +00:00
Axel Dörfler b74a098352 * Got rid of the duplicated functionalities provided by RWLocker.cpp, and
Locker.cpp.
* The services are now using recursive_locks, and rw_locks instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33548 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-12 14:29:05 +00:00
Axel Dörfler 4baa865937 * Added casts to the *_INITIALIZER macros, so that they can also be used in
a member constructor list.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-12 14:27:02 +00:00
Michael Lotz 93b63126e1 Adding mutex and rw_lock with the same interface as the kernel versions to
libroot. The mutex is a simple benaphore, the rw_lock is pretty much the same
as the one from libkernelland_emu but uses a mutex per lock instead of emulating
a global thread lock. Also added MutexLocking and RWLock{Read|Write}Locking and
AutoLockers based on them. It's cased with __cplusplus so the locks are also
usable from C. Everything's currently exposed in shared/private/locks.h but I
think we should make these locking primitves public.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33543 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-12 11:19:33 +00:00
Michael Lotz 7ebd7cfc40 Add a vm_page_allocate_page_run_no_base. It bases its search on the pages found
in the free and/or clear queue. This performs better in the case where only few
pages are free/clear but performs worse in the case where there are a lot of
usable pages. It's not used anywhere but it might come in handy one time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33527 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-11 16:55:21 +00:00
Michael Lotz 44778a8a28 Introduce vm_map_physical_memory_vecs. It is like vm_map_physical_memory but
takes a list of iovecs describing the physical pages to be mapped. With it one
can map a set of physically disjoint pages into one linear virtual range. This
is a private API right now, but we might want to make it public as
map_physical_memory_vecs alongside map_physical_memory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33523 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-11 16:48:03 +00:00
Michael Lotz 1af7d11504 * Rework page writing to combine page writes where possible. For now the pages
are required to be physically contiguos, which should be reworked to put them
  into seperate iovecs. Still this manages to combine a great deal of page
  writes into larger bursts already. Reduces the amount of IO requests being
  scheduled (and greatly benefits media where page wise writes are slow when
  they are accessed through a non-IOScheduler path, i.e. USB mass storage until
  that is properly implemented).
* Abstracted per page page writing tasks into a PageWriteWrapper class.
* Abstracted per transfer page writing tasks into PageWriteTransfer class which
  formerly was the PageWriterCallback.
* Use both classes from the PageWriterRun and from
  vm_page_write_modified_page_range to remove code duplication.
* Adjusted synchronous VMAnonymousCache::Write() to cope correctly with larger
  iovecs and more than one iovec. It assumed that there was exactly one page per
  vector previously.
* Introduced MaxPagesPerWrite() and MaxPagesPerAsyncWrite() to VMCache to allow
  a cache to specify restricitions. VMAnonymousCache does restrict the max pages
  to 1 for WriteAsync right now as I didn't feel like reworking that one to cope
  with non single page writes just yet.
* Pulled out PageWriteTransfer methods for better readability.
* Some typo fixes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33507 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-10 22:37:26 +00:00
Michael Lotz 793d0f340d Add a nogrow variant for new[] as well.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33506 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-10 22:29:11 +00:00
Stephan Aßmus 011a4cdbfc * Removed now obsolete notification (this was not even used in Tracker
anymore).
* Added interface to get the current settings.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33486 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-07 19:31:57 +00:00
Stephan Aßmus 21f2402e20 Work in progress of moving the (audo-)mounting functionality from Tracker into
a dedicated mount server. This is pretty much a straight copy from the
AutoMounter code from Tracker, except
* the eject on unmount setting has been added (in Tracker, it's part of the
  general settings, not the mount specific ones),
* scripting features have been added, such that it becomes possible to trigger
  mounting the previoulsy mounted volumes from the outside, and most
  importantly block until the operation is done (waiting for the reply).

TODO:
* Change Tracker to not run it's own AutoMounter, but send messages to the
  new server.
* Move the eject when unmounting setting to the mount settings window.
* Enable the mount_server in the Bootscript.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33484 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-07 18:34:29 +00:00
Axel Dörfler 931cd377aa * Added a new flag kAcceptKeyboardFocusFlag that allows B_AVOID_FOCUS windows
to still receive keyboard events. This is now used for menu windows (before,
  the menu feel alone would trigger that behaviour).
* This also fixes bug #4691, as tool tip windows use the menu feel as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33481 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-07 16:26:32 +00:00
Oliver Ruiz Dorantes 515209e338 Merge view class in the window object
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33471 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-06 20:03:36 +00:00
Stephan Aßmus b0488dca68 Patch by "v" to fix ticket #4733, there are Core and Core 2 Celerons. I
enhanced it to also say Core 2 Quad and Core 2 Duo again, instead of just
Core 2. Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33470 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-06 17:08:24 +00:00
Axel Dörfler fc548b41f3 * Removed the pretty useless "Multifinger scrolling" option - it's now always
the same as the two finger scrolling option (could be disabled, too, opinions
  welcome).
* Added a new settings to disable horizontal two finger scrolling, since it's
  not that easy to only scroll in one direction with this. Maybe a higher
  starting boundary would also be an option for this instead, Clemens what do
  you think?
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33468 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-06 14:30:57 +00:00
Stephan Aßmus 852e81f6cb Come to think of it, this is actually a multi-line if...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33464 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-06 12:27:19 +00:00
Stephan Aßmus 8ee28a00be Fixed a style violation that I missed, thanks Axel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33463 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-06 12:26:06 +00:00