Commit Graph

21438 Commits

Author SHA1 Message Date
Axel Dörfler
7746846941 * The ProgressWindow now starts centered over the reference window on every
open.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22393 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-01 10:21:12 +00:00
Ingo Weinhold
eb138dc9c4 Moved the select_sync_pool from tty_cookie to tty. No need to have one
per cookie.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22392 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-01 01:41:46 +00:00
Ingo Weinhold
66c03dc3a9 * fd.c -> fd.cpp
* Reworked the select support:
  - The io_context additionally stores a table of lists of select_infos,
    which enables it to deselect events of a pending select() when
    closing a FD. This prevents a race condition potentially causing a
    write to stale memory.
  - The opaque selectsync* passed to FSs is now actually a select_info*.
    This was necessary, since the FDs deselect() hook (unlike the
    select() hook) doesn't take a "ref" argument and deselecting a
    single info (e.g. caused by a premature close()) was not possible.
    The select() hook's "ref" argument has become superfluous.
  - It should now be relatively easy to implement a poll_on_steroids()
    that can also wait for objects other than FDs (e.g. semaphores,
    ports, threads etc.). 
* Set/reset the signal mask in common_select(). This makes pselect()
  work as required.
* Reorganized vfs_resize_fd_table().



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22391 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-01 01:37:28 +00:00
Ingo Weinhold
f5ede4ec02 Added two small select() test programs. select_check select()s
stdin/out/err according the what was specified via arguments.
select_close_test select()s a file descriptor that is closed a little
later by another thread.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22390 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-01 00:39:38 +00:00
Stephan Aßmus
242eff3d7b * prepare optional package Vision (download at sourceforge has been updated
with HVIF icon too, thanks DeadYak!)
* enable optional packages in your UserBuildSetup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22389 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-30 17:24:57 +00:00
Axel Dörfler
e2693621b6 Correctly implemented the missing BBitmap::GetOverlayRestrictions() on the
client and the server. This should fix bug #1490, but I haven't tested it yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22388 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-30 16:03:53 +00:00
Marcus Overhagen
bfd9a59f77 This enable write support. The driver should be useable now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22387 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-30 15:54:35 +00:00
Marcus Overhagen
a2a169feab Improved interrupt handling
Removed DBC_I interrupt
Reduce debug output


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22386 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-30 15:12:39 +00:00
Marcus Overhagen
ea44575a31 Cleanup, improved error handling, fix setting of DBC_I bit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22385 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-30 14:02:04 +00:00
Axel Dörfler
083de48a4b * Rewrote the trigger selection mechanism: it now searches for uppercase
characters first, and then falls back to take everything. fTrigger is now
  uint32 and works with all unicode characters; unlike in BeOS, the
  MenuTriggerTest application now works correctly in Haiku.
* fTriggerIndex is now a character position, not a byte position of the label;
  this allows BMenuItem::DrawContent() to draw the trigger at the correct
  position, even if there are multi-byte UTF-8 characters.
* The above fixed bug #1506; triggers are still not working, though.
* Rewrote Menu.h header.
* Renamed all private methods (that are not called by BWindow) to have the
  underscore prefix.
* Removed unused methods.
* Some minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22384 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-30 10:52:45 +00:00
Stephan Aßmus
05bcaa5a60 * put more website icons under version control
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22383 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-30 09:49:01 +00:00
Axel Dörfler
b15c9adec7 * Decoupled the page_thief() from the low memory handler chain. This is
necessary because low memory handlers might need to wait for other services
  while we need to make sure the page thief can always steal pages.
* Made the page thief more aggressive when memory is critical: added a third
  run where it will also steal a small amount of active pages to keep things
  going.
* The page thief did not maintain the cache's reference correctly in all
  situations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22382 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-30 09:36:28 +00:00
Stephan Aßmus
212ad3266b * all the icons in native Icon-O-Matic format (including named paths, styles and
shapes) which have so far been done for Haiku, the website and other apps


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22381 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-30 09:34:20 +00:00
Stephan Aßmus
86952603d8 * updated WonderBrush location to the new release
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22380 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-30 07:54:58 +00:00
Ingo Weinhold
f0c668a83a Notifying readers and select() takes canonical input processing into
account when checking for the number of readable bytes. For readers
it doesn't make a difference, since they were looping anyway, but
select() would report read-availability incorrectly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22379 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-30 00:52:06 +00:00
Ingo Weinhold
d5cbcd91b7 * Use condition variables instead of semaphores for blocking readers and
writers.
* Removed the optimization for piping data between two threads of the
  same team. This greatly simplifies the code. It seems to me the case
  is very uncommon; it could be added back later, though.
* Basically rewrote reading from and writing to the pipe:
  - A blockable writer can now write more than what is currently
    available in the ring buffer.
  - Writing respects the PIPE_BUF non-interleaving limit, though our
    headers don't seem to define PIPE_BUF anywhere.
  - Unblock writers, when the last reader is gone and send those that
    haven't written anything yet a SIGPIPE. Fixes bug #1476.
* Correctly implemented select() support. We were only notifying
  writers. We manage two separate select sync pools per pipe now: one
  for the reader end and one for the writer end.
* Reading/writing from the root dir does no longer end in KDL.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22378 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-29 23:52:23 +00:00
Axel Dörfler
16da0b3cdd Added test application for menu triggers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22377 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-29 18:17:40 +00:00
Marcus Overhagen
0845746bf7 Cleanup, device present detection improved.
Added support for non-48-bit LBA, added write support.
Proper error handling still missing, write support disabled for your protection.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22376 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-29 17:11:24 +00:00
Axel Dörfler
3392e9bcd6 * Added some more debug output.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22375 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-29 15:48:11 +00:00
Axel Dörfler
b062823d81 * register_low_memory_handler() was called too early by several kernel
components - now, we divide the initialization of that service into two parts
  which allows this (before, most handlers were gone after boot).
* Added debugger command that dumps the low memory handlers.
* The slab allocator now registers its low memory handler with a higher
  priority, so that it'll run before the potentially heavier ones.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22374 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-29 15:46:40 +00:00
Stephan Aßmus
2a88281a61 * check for possible division by zero (just had a crash with divide error
on another machine, don't know if this was really the cause, but it should
  be checked nevertheless I guess)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22373 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-29 14:06:19 +00:00
Axel Dörfler
ab88b095f2 * bfs_{read|write}_pages() now only try to lock - this fixes a possible
deadlock whenever someone without a lock (like the page_writer()) is calling
  this function.
* Added a new ReadWriteLock::TryLock() method.
* Renamed bfs_read_vnode() and bfs_release_vnode() to bfs_get_vnode() and
  bfs_put_vnode() just like those functions are called in fs_interface.h.
* Fixed a warning in BPlusTree::_SplitNode().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22372 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-29 14:06:04 +00:00
Stephan Aßmus
5b06c4ae51 * improvement to checkmark and submenu indicator layout and drawing (layout
takes menu margins into account, drawing is now fully scalable)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22371 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-29 13:00:24 +00:00
Stephan Aßmus
a788be674b * some simplifications in the code, I'm not sure if it supported NULL texts as
the BeBook mentions it does
* make sure the view is invalidated on resize
* needs more fixes (for example GetPreferredSize() does not take everything
  into account)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22370 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-29 12:58:59 +00:00
Stephan Aßmus
917870d2ba * slight code style fix, but that file would need a complete cleanup to be
style compliant...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22369 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-29 12:55:19 +00:00
Stephan Aßmus
ded80ae491 * very minor cosmetic change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22368 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-29 12:54:19 +00:00
Marcus Overhagen
55d356bd98 check for device presence before executing commands
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22367 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-29 12:14:45 +00:00
Stephan Aßmus
f691c77a30 * don't know which option to pass to fopen() in order to create a file if it
doesn't exist, so I just used a BFile instead... this should fix part of
  ticket #1423, if someone wants to look into the gateway retrieval
  (settings.cpp) to fix the other half of the bug, that would be great


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22366 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-29 07:22:18 +00:00
Stephan Aßmus
c96bc8d3f1 * removed unnecessary whitespaces, small style cleanups
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22365 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-29 07:19:32 +00:00
Stephan Aßmus
b1836934f8 * when selecting objects in the list view, the controls will adapt to the
object properties


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22364 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-29 06:46:29 +00:00
Marcus Overhagen
21b4398f6a don't set the "clear on RX_OK" bits
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22363 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-29 00:34:09 +00:00
Marcus Overhagen
f5ea6b32a5 added debugging code
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22362 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-29 00:23:21 +00:00
Marcus Overhagen
6b8c1c2ad7 improved prd table handling
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22361 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-29 00:22:19 +00:00
Marcus Overhagen
2bf99ebdee Added byte swapping of identify device strings.
Added capacity reporting.
Wait for interrupts to finish transfers.
Added lba 48-bit read support.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22360 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 23:44:03 +00:00
Axel Dörfler
a3fc7b4b33 The "priority" of a handler is no longer ignored: the handlers are now
inserted into the list according to their priority; higher priority
handlers are now called first.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22359 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 21:47:31 +00:00
Ingo Weinhold
eee9e86c6b Set default template argument to void, so that one doesn't need to
bother.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22358 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 21:40:25 +00:00
Ingo Weinhold
2f6b4f3e1a * When canonical input processing is enabled reads should only return
anything, if a line is available. Fixes bug #1483.
* Replaced the request owner waiting semaphore by a condition variable
  and removed the now no longer needed SemaphorePool.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22357 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 21:37:31 +00:00
Marcus Overhagen
ece77b379a renamed SCSI_OP_TUR into SCSI_OP_TEST_UNIT_READY
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22356 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 21:30:53 +00:00
Marcus Overhagen
a79249de5b add missing file
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22355 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 21:24:26 +00:00
Marcus Overhagen
2ae9d56421 added scatter gather prd table setup, implement scsi inquiry command and emulate test unit ready
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22354 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 21:22:25 +00:00
Axel Dörfler
5036d66c8f vm_cache_resize() did not care about busy pages - now it does.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22353 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 21:20:57 +00:00
Marcus Overhagen
747c1927fd removed conditional testing code
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22352 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 21:20:46 +00:00
Marcus Overhagen
91f867e016 added sg_memcpy to copy data into a scatter-gather table (inspired by IDE device manager)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22351 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 21:19:14 +00:00
Niels Sascha Reedijk
51e5c73eca Phase I of MessageFilter.dox
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22350 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 21:14:39 +00:00
Ingo Weinhold
cfed176e68 * I just saw the page writer passing a free page to write_page().
Apparently not everyone checks the page state for PAGE_STATE_BUSY.
  vm_page_write_modified_pages() does now at least.
* Fixed typos in comments.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22349 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 18:48:09 +00:00
Axel Dörfler
a6778735f9 bonefish+axeld:
* We now have a page writer that takes some pages from the modified queue
  and writes it back every few seconds. It can be triggered by the page
  scanner to do that more often, though. That mechanism can be greatly
  improved once we have our I/O scheduler working.
* Removed vm_page_write_modified_page() again - it was all "eaten up" by
  the page writer.
* Reworked vm_page_write_modified_pages() a bit: it now uses
  vm_test_map_modification() and vm_clear_map_flags() instead of the
  iterating over all areas which wouldn't even work correctly.
  The code is much simpler now, too.
* You usually put something to the tail of a queue, and remove the contents
  from the head, not vice versa - changed queue implementation to reflect this.
* Additionally, there is now a enqueue_page_to_head() if you actually want the
  opposite.
* vm_page_requeue() allows you to move a page in a queue to the head or tail.
* Replaced vm_clear_map_activation() with vm_clear_map_flags() which allows
  you to clear other flags than PAGE_ACCESSED.
* The page scanner dumps now some arguments with each run.
* Removed the old disabled pageout_daemon() from NewOS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22348 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 15:50:26 +00:00
Marcus Overhagen
8ce98e44cc convert files to new include file locations
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22347 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 14:53:42 +00:00
Marcus Overhagen
a1a086067d cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22346 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 14:52:11 +00:00
Marcus Overhagen
41a3048db5 added missing include file (probably gcc4 only build fix)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22345 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 14:51:31 +00:00
Marcus Overhagen
1e2722379a splitting the file
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22344 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 14:19:08 +00:00