Commit Graph

21339 Commits

Author SHA1 Message Date
Stefano Ceccherini
6fc1a5d0ea Mail's inherited InsertText() calls CancelInputMethod()
indirectly, and since InsertText() is called inside 
BTextView::HandleInputMethodChanged(), this method would see fInline 
slip away from under its feet.. Now we call the BTextView version 
explicitly. Fixes bug #1022, although I'm not sure if this is completely 
correct.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22444 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 19:57:27 +00:00
Ingo Weinhold
bcc2eb0c72 Moved the write support code into a separate source file.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22443 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 18:27:25 +00:00
Ingo Weinhold
33e38cdad2 * Implemented bfs_validate_initialize(). It should probably do more
checks (e.g. if the partition is big enough), though.
* bfs_initialize():
  - Report job progress.
  - Rescan the partition after it has been initialized, so that all
    partition_data fields are properly initialized.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22442 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 18:11:00 +00:00
Ingo Weinhold
8c8f8c8420 Added scan_partition() function which can be used by disk systems (e.g.
in *_initialize()) to save some work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22441 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 18:03:24 +00:00
Ingo Weinhold
088136f66b gcc 4 warned unnecessarily.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22440 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 17:59:29 +00:00
Axel Dörfler
edf668344a * Added some docs.
* Removed dead code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22439 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 16:53:02 +00:00
Axel Dörfler
9d8c209014 * vm_remove_all_page_mappings() now returns an accumulation of the flags of
the unmapped page.
* This is needed by everyone who calls this to make sure modifications to a
  page aren't ignored. Namely, the page scanner and the page thief were
  affected.
* Cleaned up locking the page's cache a bit in page_thief(); there is now
  a helper class that takes care of everything.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22438 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 16:36:35 +00:00
Axel Dörfler
06cd40f399 Forgot to replace the error code with the new "mayBlock" logic, thanks Ingo!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22437 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 15:11:48 +00:00
Ingo Weinhold
6f05787478 * rootfs.c -> rootfs.cpp
* Made the kernel rootfs reusable by the FS Shell and removed the
  copy in the FS Shell sources.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22436 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 14:30:50 +00:00
Axel Dörfler
417f276c05 Forgot to commit the fs_shell with r22434, thanks for the note, Stefano!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22435 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 13:23:00 +00:00
Axel Dörfler
3e9513aa4a * fs_{write|read}_pages() now has an additional argument "mayBlock".
* the page writer don't allow to block, while all other writers do. This fixes
  bug #1509. The reason the page writer needs this is because it marks several
  pages from different caches as busy.
* Fixed a warning about ASSERT being defined already in BFS, since
  util/DoublyLinkedList.h now includes debug.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22434 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 12:45:15 +00:00
Stefano Ceccherini
94b9294f48 oops! Somehow I managed to commit a version with some extra debug code
enabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 11:37:04 +00:00
Stefano Ceccherini
f2476bcc9c Patch by Rene Gollent: TextViews now can scroll even if they aren't
attached to a BScrollView.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22432 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 11:32:06 +00:00
Ingo Weinhold
39c99f8644 The toggledView variable was assigned twice. The last assignment should
win. Interestingly with gcc 4 and optimizations enabled the same value
was passed twice to Add().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22431 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-03 22:53:19 +00:00
Ingo Weinhold
45f9d60c9f Some KDEBUG enabled sanity checks.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22430 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-03 22:22:21 +00:00
Ingo Weinhold
d45ce8b1dc Move the job control entries of a dying team's children to the kernel
team as well. Otherwise the children would later try to remove them from
a list they weren't in.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22429 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-03 22:20:30 +00:00
Ingo Weinhold
76ab7bdcf8 Added function dprintf_no_syslog(). It is basically equivalent to
dprintf() with the exception that it doesn't write anything to the
syslog. The reason is that syslog_write() releases a semaphore and can
therefore not be invoked when the thread spinlock is held.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22428 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-03 22:14:53 +00:00
Ingo Weinhold
0e69ce7702 Define _BOOT_MODE.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22427 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-03 22:10:06 +00:00
Stephan Aßmus
bf7ab50d4c large patch by Bek (HOST team):
* style improvements, header reformatting, small refactoring and adding
  of missing copyrights

(to Marcus: this is not the original patch, it has already been revised two
times by myself and I thought it was very nice now)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22426 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-03 21:19:17 +00:00
Marcus Overhagen
88d9b383f5 added more IDs, removed Intel IDE mode ID due to possible collision with a physical PATA interface
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22425 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-03 20:16:11 +00:00
Ingo Weinhold
0febb19caf Added the students who worked on the DDM and intel partitioning system.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22424 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-03 20:15:05 +00:00
Ingo Weinhold
b2537f99cd Added option "--thread" which will perform the crashing operation in
another thread.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22423 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-03 19:35:40 +00:00
Ingo Weinhold
99454e4a90 If the ring buffer is full line_buffer_readable_line() returns the
buffer size in case the buffer does not contain an EOL or EOF. This
prevents readers from waiting infinitely, if canonical input processing
is enabled in that situation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22422 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-03 19:07:51 +00:00
Ingo Weinhold
e8429ec9e6 * Added debugger command "tty", which dumps some info about a tty.
* RequestOwner was removing the wrong request from the second queue,
  which could cause the list structure to become invalid and result in
  bug #1526.
* In the writer loops we do now call tty_notify_if_available() when
  we're potentially going to wait and had written something before, so
  that a waiting reader will be woken up also when we write more bytes
  than fit into the ring buffer.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22421 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-03 19:04:44 +00:00
Marcus Overhagen
2f28a3f623 Added PCI ids from Freebsd, Netbsd and Openbsd pcidevs files.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22420 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-03 17:57:09 +00:00
Marcus Overhagen
83447512ed Changed device detection. The driver now first uses device and vendor id to check
for devices. This allows using devices that are in IDE compatibility mode.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22419 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-03 16:05:23 +00:00
Ingo Weinhold
b2d056ecde Add wait_for_objects.cpp to the kernel, too.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22418 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-02 19:52:47 +00:00
Ingo Weinhold
b16fdbd661 Little test program for wait_for_objects_etc().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22417 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-02 19:48:39 +00:00
Ingo Weinhold
636bfc08ae * Renamed fs/vfs_select.cpp to wait_for_objects.cpp and got rid of
vfs_select.h, respectively moved most of it into the new kernel
  private header wait_for_objects.h.
* Added new experimental API functions wait_for_objects[_etc](). They
  work pretty much like poll(), but also for semaphores, ports, and
  threads.
* Removed the "ref" parameter from notify_select_events() and the
  select_sync_pool functions as well as from fd_ops::fd_[de]select(). It
  is no longer needed. The FS interface select() hook still has it,
  though -- the VFS will always pass 0.
* de]select_fd() take a select_info* instead of a select_sync* + ref
  pair, now. Added respective functions for semaphores, ports, and
  threads.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22416 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-02 19:47:31 +00:00
Axel Dörfler
a82d70c719 Fixed PLL clock for i8xx chips again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22415 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-02 17:40:05 +00:00
Stephan Aßmus
2a74c55308 * when a vector icon was present, BAppFileInfo::GetIcon() would return an
error if the provided bitmap was B_CMAP8, now BIconUtils will convert the
  icon to B_CMAP8
-> this behaviour is a little inconsistent compared to what happens when
  reading icons from attributes, there, the CMAP8 icon is prefered in case
  such a bitmap is passed, even if a vector icon exists. I am not really
  sure which behaviour is better. For a consistent UI, maybe it is better
  to prefer the vector icon always. I've added a note to BAppFileInfo.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22414 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-02 16:54:34 +00:00
Axel Dörfler
e5b464d09f Added a TODO what we need to do with stolen active pages - for now, we don't
do anything with them, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22413 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-02 16:06:17 +00:00
Axel Dörfler
4421183286 * Changed Ld rule to allow adding resource files.
* Changed ResAttr rule to allow not deleting the file before writing the
  attributes.
* Added application signatures for the runtime_loader and zbeos, just so that
  they may have an icon, too (hint, hint) :-)
* As a side effect, this also let's FileTypes handle these two as apps (even
  though they aren't), so that I can close bug #606.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22412 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-02 15:22:13 +00:00
Stephan Aßmus
0064e64138 patch by Julun:
* fixed ticket #1500
	* big cleanup and removal of unused code


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22411 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-02 14:54:15 +00:00
Stephan Aßmus
4d1c422802 * added a way for the ServerWindow message loop to determine the required type
of locking before processing the message (single/all window lock)
  -> in most message cases, I could comment out the unlocking/locking which
  switched to the different lock, because the required lock is now already held,
  this removes some race conditions which were commented in the code already
* EventDispatcher::SetDragMessage() didn't lock the object, this would have
  been bad if multiple windows tried to set a drag bitmap at once
* the Desktop object keeps track of mouse position and pressed buttons, so
  that it doesn't need to lock the EventDispatcher for sending fake mouse
  moves to windows on show/hide of windows (solves some cases of possible
  dead locks with the new locking strategy)
* the keyboard EventFilter switches the current workspace asynchrnously from
  the Desktop thread (another source of possible deadlocks)
* the "reader is trying to become writer" check in MultiLocker is only used
  in DEBUG mode now

As a summary: It would be nice if ServerWindow used a readlock for all messages
it processes itself, and forwards all messages for which it needs a write lock
to the Desktop thread. All cases where either the Desktop or the ServerWindow
mess with the EventDispatcher are possible sources of deadlocks. This is solved
right now by making sure that the lock is released before using the
EventDispatcher.

I have not observed any deadlocks while switching workspaces and launching
many apps anymore, neither crashes. But I have not tested extensively except
for in the test environment. That being said, I could reproduce the problems
on first try before in Haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22410 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-02 14:09:11 +00:00
Axel Dörfler
2760c4cd73 * load_program() (and probably others) could call delete_image() with a NULL
pointer - which it now handles gracefully.
* This also fixes starting the runtime loader directly: it no longer crashes
  but will just return an error.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22409 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-02 13:17:19 +00:00
Axel Dörfler
828d9454da * Fixed module leak in case there was an error during init when used on BeOS.
* Check safemode settings only when it's not already disabled (doesn't make
  sense to check those then).
* Minor cleanup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22408 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-02 11:56:33 +00:00
Axel Dörfler
fb151b4af1 Fixed initialization threading issues I introduced yesterday.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22407 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-02 10:54:32 +00:00
Stefano Ceccherini
9c16019f62 Patch by Rene Gollent which fixes displaying of current time. I've used
snprintf instead of sprintf and reduced the size of the char array, 
though. Hope you don't mind, Rene.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22406 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-02 09:37:41 +00:00
Axel Dörfler
b5b11466b2 If opening the net_stack driver failed because there was no stack, opening it
a second time would magically work, as it skipped its initialization then...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22405 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-02 01:01:01 +00:00
Axel Dörfler
9f0d226c72 The no-swap store shouldn't fool the page writer into believing that its pages
could be written back. This should stop the page thief from stealing active
pages that cannot be recreated easily :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22404 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-02 00:01:18 +00:00
Ingo Weinhold
3c3674113f Fixed a race condition on thread exit: There was a gap between releasing
the death stack and reacquiring the thread lock in which another thread
could snatch our stack that we were still going to use for the
scheduler. Now we've got a second spinlock that we can hold while
releasing a semaphore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22403 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-01 22:46:56 +00:00
Ingo Weinhold
8609f5a242 * Increased condition variable hash size.
* Renamed condition variable debugger commands to cvar and cvars.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22402 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-01 22:28:54 +00:00
Ingo Weinhold
d0c2af7713 Addressed a deadlock race condition: Acquiration of condition variable
and thread spinlock was reverse in Wait() and Notify(). The thread lock
is now the outer lock -- this way it is still possible to call Notify()
with the thread lock being held.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22401 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-01 22:24:42 +00:00
Ingo Weinhold
1c118ebc62 * Added a handy FDGetter AutoLocker-style class.
* In select_fd(): First get the file descriptor, then check whether any
  events have to be selected at all. This has the advantage that the
  caller can interpret an error return code as invalid FD. Consequently
  common_poll() no longer checks FD validity separately -- this was a
  race condition.
* common_poll() always selects POLLERR and POLLHUP now, which it has to
  do according to the specs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22400 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-01 18:48:52 +00:00
Ingo Weinhold
1221a4f200 Allow derived classes to access the member variables.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22399 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-01 18:39:02 +00:00
Ingo Weinhold
21873fffb3 Partitions are no regular files. The check for mere existence shall
suffice.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22398 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-01 17:36:52 +00:00
Ingo Weinhold
f515ed5f77 Added build variable HAIKU_DONT_CLEAR_IMAGE. When set and the image does
already exist, it won't be zeroed out. The image will still be
initialized with BFS, though. Handy for installing Haiku on a partition.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22397 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-01 17:27:13 +00:00
Axel Dörfler
a977fc17e3 Build fix; I renamed the "dos" file system to "fat".
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22396 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-01 15:52:28 +00:00
Axel Dörfler
10194ebc8a Minor build fix - it still doesn't link, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22395 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-01 15:43:45 +00:00