Commit Graph

26960 Commits

Author SHA1 Message Date
Karsten Heimrich
d751323939 * reintroduce member fOffscreen which got removed in r2917
* check if locking the offscreen window succeeds before calling delete on it
* don't return offscreen windows in CountWindows and WindowAt (works now as on R5)

  fixes ticket 1522, 1591, 1946, 2318 and propably more

  While creating an BBitmap in BApplication the bitmaps window looper would
  be added to the applications gLooperList, thus calling Quit() on that window
  and later delete on a stale window pointer in BBitmaps dtor. The Lock() check
  would fix the problem, but tests on R5 have shown that BApplication hides the
  offscreen window in CountWindows() and WindowAt().



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28236 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-19 12:23:18 +00:00
Karsten Heimrich
a02979bb3f * cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28235 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-19 12:05:37 +00:00
Michael Lotz
cde552bdcb Don't select anything in type ahead mode when no match is found anymore. This
makes sure that the best match just stays selected instead of always selecting
the topmost pose.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28234 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-18 23:43:18 +00:00
Michael Lotz
aa22e8db2e Changed the score calculation for type ahead in the Tracker. Previously if there
was at least one character matching at the start of any file it would have
gotten a score >= 1. This rendered the substring matching completely useless
as soon as this happened, because it would always get a score < 1 depending on
the position of the occurance. Now substring matching is the first (and without
word mode, the only) score to get. Since the score depends on the position of
the match, this doesn't change anything for exact matches at the beginning, but
it does allow for substring matches even if there is a file starting with the
same letter as the search string. Also use strcasestr() instead of strstr() to
make the search case insensitive.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28233 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-18 20:12:09 +00:00
Michael Lotz
3b839d857b The fs_mount structure now has a constructor/destructor and is used with new and
delete. Therefore the constructor/destructor of the contained EntryCache is also
called. The manual call of the destructor to the OpenHashTable inside the
EntryCache was therefore superflous and the destructor would be called twice,
leading to bug #2869.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28232 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-18 18:22:33 +00:00
Alexandre Deckner
842cd2b8cc * Removed the call to Refresh() when switching to scaled icon mode as it
would scroll to (0, 0), and screw the now always-in-sync fViewState.
  After testing every possible mode transition, there seem to be no side
  effect as the comment would suggest. Stippi, do you remember why it 
  was necessary? See r18699. 
* This enabled me to do my previously added TODO's. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28231 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-18 16:32:10 +00:00
Rene Gollent
ca5e024130 Probably forgotten changes in the last commit, though I'm not sure if Axel had any other style cleanups in mind in this file. Fixes build at any rate.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28230 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-18 15:45:57 +00:00
Axel Dörfler
8f2be9ef82 * Cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28229 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-18 13:53:03 +00:00
Axel Dörfler
0f32f7ddeb * Added an ASSERT() and a check to make sure the workspace that Backmost() and
Frontmost() are using is valid.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28228 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-18 11:59:02 +00:00
Ingo Weinhold
9aabc02b4c Fail when the OpenSSH optional package is enabled and
HAIKU_IMAGE_HOST_NAME is not set.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28227 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-18 09:36:14 +00:00
Ingo Weinhold
2dd847b6ff Changed CopySetHaikuRevision1 actions not to fail, when either of the
tools doesn't exist. Fixes #2860.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28226 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-18 09:23:42 +00:00
Rene Gollent
a6a18aeb66 Add OpenSSH to list of available OptionalPackages.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28225 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 22:40:17 +00:00
Axel Dörfler
955307393f * Reworked EventDispatcher::SendFakeMouseMoved() after an idea by Stephan
that solves most app_server locking headaches: it now works asynchronously,
  and therefore doesn't need to lock the EventDispatcher anymore.
* EventStreams now allow to inject messages into the stream to allow the above
  functionality.
* InputServerStream::GetNextEvent() no longer returns when there is no event.
* Desktop::ActivateWindow() now locks all windows before checking the
  workspaces of the windows, fixing a race condition that could lead to
  Window::Foremost() being called for a window that isn't on the current
  workspace, leading to a crash.
* I currently cannot access Trac, but I recall there should be an open bug
  report about this.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28224 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 21:37:10 +00:00
Ingo Weinhold
7ab39de989 * Removed unused SMP_MSG_RESCHEDULE ICI message.
* Introduced flag "invoke_scheduler" in the per CPU structure. It is
  evaluated in hardware_interrupt() (x86 only ATM).
* Introduced SMP_MSG_RESCHEDULE_IF_IDLE message, which enters the
  scheduler when the CPU currently runs an idle thread.
* Don't do dprintf() "CPU x halted!" when handling a SMP_MSG_CPU_HALT
  ICI message. It uses nested spinlocks and could thus potentially
  deadlock itself (acquire_spinlock() processes ICI messages, so it
  could already hold one of the locks). This is a pretty likely scenario
  on machines with more than two CPUs, but is also possible when the
  panic()ing thread holds the threads spinlock. Probably fixes #2572.
* Reworked the way the kernel debugger is entered and added a "cpu"
  command that allows switching the CPU once in KDL. It is thus possible
  to get a stack trace of the thread not on the panic()ing CPU.
* When a thread is added to the run queue, we do now check, if another
  CPU is idle and ask it to reschedule, if it is. Before this change, the
  CPU was continuing to idle until the quantum of the idle thread
  expired. Speeds up the libbe.so build about 8% on my machine (haven't
  tested the full Haiku image build yet).
* When spinlock debugging is enabled (DEBUG_SPINLOCKS) we also record
  the spinlock acquirer on non-smp machines. Added "spinlock" debugger
  command to get the info.
* Added debugger commands "ici" and "ici_message", printing info on
  pending ICI message respectively on a given one.
* Process not only a single ICI message in acquire_spinlock() and other
  places, but all pending ones.
* Also process ICI messages when waiting for a free one -- avoids a
  potential deadlock.
* Mask out non-existing CPUs in send_multicast_ici(). panic() instead of
  just returning when there's no target CPU left.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28223 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 18:14:08 +00:00
Ingo Weinhold
b7b7ca0fc3 * Removed debug check.
* "iospace p" should only print the entries for actually existing
  memory.
* Fixed output of "iospace v".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28222 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 16:59:24 +00:00
Ingo Weinhold
78c90d44ca Moved definition of the PAUSE macro to <cpu.h>, respectively
<arch/cpu.h>.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28221 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 16:53:31 +00:00
Ingo Weinhold
7b8683b252 Updated write_to_cache() to use physical pages for I/O and the new
{memset,memcpy_to}_physical() functions.
Mapping lots of physical pages at once as done before was an actual
problem on systems with enough RAM, as the physical page mapper can map
only 64 chunks at a time. So multiple threads could play dining
philosophers, each getting only one of two chopsticks, waiting for
another one to be freed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28220 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 16:45:14 +00:00
Ingo Weinhold
901f1930e1 * Moved memset_physical() to vm.cpp and made it available in the kernel.
* Added memcpy_to_physical().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28219 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 16:32:12 +00:00
Ingo Weinhold
808de9c700 * The undertaker was not locking when enqueuing the thread structure in
the free queue.
* "thread" also prints the thread's I/O priority.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28218 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 16:28:02 +00:00
Axel Dörfler
c2a8fd9b70 * AS_ACTIVATE_WINDOW must not hold a window lock when calling
Desktop::ActivateWindow(), or Desktop::SendWindowBehind().
* This fixes a potential deadlock.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28217 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 15:48:29 +00:00
Axel Dörfler
c3657d1abd stippi+axeld:
* Made the StressTest app into a real stress test for the app_server, as the
  windows are now randomly changed, ie. moved, resized, hidden, activated, ...
* This already helped identifying two long-hiding bugs in the app_server code!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28216 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 15:46:45 +00:00
Axel Dörfler
703aecaaa5 * Instead of having the mount_link, struct vnode now subclasses from
DoublyLinkedListLinkImpl, and fs_mount now uses a DoublyLinkedList instead
  of a typeless struct list.
* Also added a constructor/destructor to fs_mount which simplifies and cleans
  some code.
* This should not contain any functional changes :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28215 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 15:44:13 +00:00
Michael Lotz
2bb834901c Fix two bugs related to the use of the entry cache for parent entries in BFS:
* The parent entry ("..") of a directory was not removed from the cache when its
  directory was removed.
* When moving a directory to a new parent, it's cached parent entry wasn't
  updated.

Those would lead to stale cache entries for directory parents. If a certain inode
would be reused to create a new directory after removing another, this would lead
to an invalid inode being returned when looking up the parent of the new
directory. This was easily reproducible by unzipping some directory structure,
deleting it and unzipping it again. You would end up with many "inode already
deleted" messages.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 13:42:48 +00:00
Axel Dörfler
218f8c8632 * Give a more detailed error message in case someone just tried to access a
deleted inode (which might always happen when accessing an inode by ID),
  for example by using the BDirectory(node_ref&) constructor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28213 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 09:56:57 +00:00
Axel Dörfler
552c8edcd1 * fs_sync() now holds the sVnodeMutex while iterating over the mount list.
* This has the advantage that we no longer need to call get_vnode(), and
  instead can use lookup_vnode().
* This means at least most of the "corrupted BFS inode" messages should be
  gone; they were produced when fs_sync() tried to get already deleted vnodes.
  This was actually harmless, but doesn't really help in trusting your system :-)
* Also, it no longer tries to write back removed vnodes.
* And finally, it now uses a marker vnode when iterating over the list, so
  that it doesn't need to break out of the loop anymore, and can always sync
  all willing vnodes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28212 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 09:55:34 +00:00
Stephan Aßmus
c4b429ca1c Patch by Humdinger:
* Refactored a User Guide style documentation from the previous Welcome
  documentation. The Welcome documentation links to the User Guide, the
  biggest difference is that there is now a separate contents page.
* Improvements to the text.
* Added Tracker-Add-ons page.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28211 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 09:53:43 +00:00
Alexandre Deckner
3704f31d73 * AddPosesCompleted could be called actually before all the poses were added.
The method was called after _sending_ all the messages, not after receiving
  them all. This fixes the scroll validity check in AddPosesCompleted in list
  mode (bug mentioned in my last commit).

 We can now close #2441, tracker windows should now be completely persistant
with regard to scrolling now, in all modes (spatial mode, single window 
mode in list or icon mode). \o/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28210 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 09:52:09 +00:00
Alexandre Deckner
e85ca56c7d * Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28209 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 08:57:24 +00:00
Michael Lotz
f7de7fa4e3 Add throw() to the nogrow new operator. This will cause the right version to be
used that handles NULL returns and doesn't expect an exception. This fixes that
certain constructors would still be called even if the allocation failed in low
memory situations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28208 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 08:32:42 +00:00
Stefano Ceccherini
6bda235a59 some gcc4 warning fixes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28207 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 08:08:20 +00:00
Rene Gollent
4a4355bd7d app_server was not storing its settings when the workspace count was changed.
As a consequence this setting was lost unless another setting was also altered
that affected the workspace configuration in some way.
Fixes #2849.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28206 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 01:56:44 +00:00
Alexandre Deckner
3d7584da5c * Rewrote the way BViewState checks if changes needs to be saved on quiting a navigation window (icon mode and
list mode) or switching dir in single window navigation. Fixes the other half of the problem in #2441. Left some 
todos.
  I discovered an other bug that can add a random offset after finishing adding poses.  


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28205 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 01:41:43 +00:00
Axel Dörfler
64ba396fa7 * When changing the workspace of a window, it's workspace position will now be
set to its current position if that is the only workspace it's in.
* This fixes missing windows on other workspaces in the Workspaces app after
  boot, ie. before you had visited that workspace.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28204 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 01:31:44 +00:00
Axel Dörfler
4e59d9c7b4 * Use a good default "yellow" in case there is no decorator (otherwise yellow
isn't initialized, but also not really used currently).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28203 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 01:30:06 +00:00
Rene Gollent
d8383f234c Update example description to the current state of affairs. Please revert to old description whenever we enable ACPI by default again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28202 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 01:01:11 +00:00
Bruno G. Albuquerque
2cb8652f55 - The Trash context menu was using a checkmark to keep track of the last
selected item which does not make much sense. Disabled the checkmark.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28201 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 00:33:38 +00:00
Michael Lotz
bba5ce5afe * Add a mapping of interrupt handler data and remove the panic on installing
the interrupt handler. There can be more than one interrupt handler installed
  on the same interrupt number with different data, so we also need the data
  pointer when removing the handler (to remove the right one). But since ACPI
  doesn't supply it to us, we have to do the mapping ourselfs. Fixes #2848.
* Renamed acpi_root to sACPIRoot.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28200 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 22:25:04 +00:00
Michael Lotz
85c66f1c22 * Disable ACPI by default for now as it currently introduces problems with
interrupts (UHCI/EHCI not working).
* Add missing line break in debug output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28199 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 22:06:27 +00:00
Ingo Weinhold
51f837ae42 Dynamically adjust the page writer's I/O priority depending on how many
pages have to be written and how tight the memory situation is.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28198 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 22:02:55 +00:00
Ingo Weinhold
6e595b29e3 Moved KERNEL_BREAKPOINTS to kernel_debug_config.h.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28197 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:43:32 +00:00
Ingo Weinhold
3b248948f2 Added ThreadCPUPinner AutoLocker class.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28196 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:41:11 +00:00
Ingo Weinhold
d52718a5f8 Fixed serious race condition: If the thread waiting for a request was
interrupted, another thread closing the other end of the pipe could
invoke thread_unblock() while the first thread already entered
mutex_lock(). This would make the first thread think it successfully
locked the mutex, without removing its (on-stack) wait entry from the
mutex queue, thus leading to crashes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28195 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:40:32 +00:00
Oliver Tappe
9f3fce1eac Stippi + zooey:
* fixed LineHeight() for the case when the textview does not yet contain
  anything - instead of returning 0 we now return the lineheight of the
  default style (or the textview's font).
Fixes #2231


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28194 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:40:12 +00:00
Ingo Weinhold
9b0eb8c8f4 Removed "lal" alias and added "-A" to "ll" instead.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:34:15 +00:00
Ingo Weinhold
8a05bb865f Added TODO regarding serious locking problem.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28192 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:32:14 +00:00
Michael Lotz
471844b258 Add the ACPI module to the boot module symlinks.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28191 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:31:32 +00:00
François Revol
4d05f2f108 Added an updated version of BeHappy as optional package. This one can use NetSurf instead of NetPositive if it finds it.
Make sure you rm generated/downloads/NetSurf.zip to get the new replicable one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28190 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:31:17 +00:00
Michael Lotz
88db388930 Remove one line of whitespace.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28189 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:22:00 +00:00
Michael Lotz
6ddf7ae490 * Make the initialization of the DPC module lazy. It'll not be available in early
boot, but it's not needed there either.
* Return 1 for the thread id when ACPI asks and we are thread 0 (early boot),
  because it treats 0 as an error.
* Switch over logic when installing/removing interrupt handle to panic when
  installing the interrupt handler if the data supplied is non-NULL. In case it
  is NULL we're fine because we can remove it again without knowing the data.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28188 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:19:23 +00:00
Michael Lotz
d4c300d8f1 Prepare usage of the ACPI module. Actual code for getting PCI interrupt routing
not yet done though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28187 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:12:33 +00:00