Commit Graph

26147 Commits

Author SHA1 Message Date
Stephan Aßmus
3f2dd98c88 This fixes a bad feeling in my stomache:
* When mounting a non-BFS volume, suggest to the user to mount it read-only.
* Store the mount flags with each volume in the automounter settings, restore
  mount settings on next boot.
The second part is probably nice to have anyways und should prevent bad surprises,
the first part should be removed again when we have absolute confidence in all
our file system implementations as well as the kernel itself.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27219 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 13:26:45 +00:00
Karsten Heimrich
3bc4dacf9a * We need to update the drawing state in case SetHighColor, SetDrawingMode etc.
is called after BeginPicture on a freshly created view.

  This is necessary because a second invocation on this view with BeginPicture
  would have caused ServerPicture::SyncState to write the default drawing state
  into the picture. This happens because to BView had now cached the values and
  therefor won't go to the app_server and tell about the change. The first call
  did not change anything as picture recording is handled in _DispatchPictureMessage
  while view changes that modify drawing state are handled in _DispatchViewMessage,
  thus leading to default draw state values beeing written.

  This fixes invalid ticket #2534.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27218 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 12:01:46 +00:00
Ingo Weinhold
96b6a162a1 Increased the number of pages the page writer tries to write per run.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27217 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 01:49:59 +00:00
Ingo Weinhold
0316483f0a * DMAResource::TranslateNext(): Added parameter to limit the maximum
operation length.
* IORequest: Added owner (IORequestOwner). Also added a SetUnfinished()
  method, which is invoked by the I/O scheduler after all operations of
  the request have been finished, but the request isn't done yet.
* Added debugger commands "io_request_owner" and "io_scheduler" printing
  information for a IORequestOwner and IOScheduler object respectively.
* Implemented an actual I/O scheduling algorithm. It's a simple round
  robin strategy (a queue per thread) with a unidirectional elevator
  serializing the operations. ATM priorities are ignored, the bandwidth
  isn't adjusted to the device, and there are TODOs all over the place.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27216 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 01:49:18 +00:00
Ingo Weinhold
ca2a5874fa Disabled support for nested partition maps for the time being. Since
we're quite lenient parsing the partition descriptors, we recognized
pretty much any partition that by accident has a PTS signature and that
no other disk system supports. Should fix bug #2668.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27215 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-27 22:36:44 +00:00
Karsten Heimrich
4e61552ecd * first implementation of passing data via area to app_server
this makes printing of large images work, fixes task #1067



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-27 13:39:16 +00:00
Ingo Weinhold
953cb30447 Re-added support for kernel breakpoints. This feature is just way to
handy in certain situations to not have it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27213 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-27 12:52:23 +00:00
Ingo Weinhold
0490454cb8 Made safe to be included from assembly code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27212 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-27 12:50:56 +00:00
Karsten Heimrich
4f3736d7b6 * show the config job panel, even if no page setup was already performed
this avoids to multiple window popup for page settings and job settings

* Note: this shows the painting regression introduced with r26665, see task #2534



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27211 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-26 22:19:00 +00:00
Stephan Aßmus
4ddc254c08 * Implemented decreasing the volume of inactive player windows according to
the global settings. This is only done though if there are multiple players
  open at the time. (It doesn't consider their "playing" state, though.)
* The SettingsWindow is now maintained by the MainApp, and there is only a
  single instance, those settings are application wide. Also used the
  "application floating" window look&feel.
* Small code cleanups.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27210 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-26 18:34:36 +00:00
Stephan Aßmus
0cafe2dfb9 * Fixed a race condition in BWindow::Show(). If it was the first time Show()
was called, the calling thread could be preempted, or simply be blocked on
  calling Lock() after running the window thread. The window thread in turn
  could be processing messages. In that case, fShowLevel would still have the
  wrong value. For example, MediaPlayer would call IsHidden() on one of it's
  views, which would then return true for this case. The result was that the
  video view was not hidden and a black rectangle was showing on top of the
  controls. This may also have caused other similar problems of course.
* fRunCalled was accessed without holding the lock.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27209 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-26 18:30:47 +00:00
Stephan Aßmus
9a5f768b19 * Implemented the "Auto start playback", "Close when done playing movie" and
"Close when done playing sound" settings.
* Removed unused member variables from Controller
* Changed Playlist::SetCurrentRef() to indicate success and prevent the
  current index from getting out of range.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27208 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-26 13:45:55 +00:00
Stefano Ceccherini
139f143c62 fixed warnings. Maybe we should do all the calculations in ints instead of using floats
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27207 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-26 06:59:00 +00:00
Stefano Ceccherini
47abb8bfef partially reverted the latest change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27206 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-26 06:08:24 +00:00
Rene Gollent
21cc1202f3 Fix this bug in the correct spot by forbidding the controller from trying to toggle the playback state if it hasn't been initialized with a file. Thanks for the tip, Stephan!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27205 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-26 02:32:13 +00:00
Karsten Heimrich
6163f3334b * some more cleanup
* pass the target directly to AddItemMenu
* use default paramter to enable the menu item
* fixed messenger leaks for file panel and resizer window messenger
* show the job config panel when the 'Print' menu item is invoked + shortcut 



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27204 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-26 00:24:21 +00:00
Ingo Weinhold
9837b719af Some documentation on swap file support by Zhao Shuai.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27203 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 22:09:45 +00:00
Ingo Weinhold
ddeb7bfaf1 Changes by Zhao Shuai and myself:
* The VMAnonymousCache destructor was unreserving too much physical
  memory.
* Addressed TODO in _SwapBlockBuild(): When the swap block couldn't be
  allocated we wait and loop until it can.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27202 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 22:04:17 +00:00
Karsten Heimrich
56b0c7b90d * cleanup, no functional change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27201 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 21:48:06 +00:00
Bruno G. Albuquerque
ec44f528d8 - Added handling for the table of contents (toc) attribute. Now it is ready to
retrieve CDDB information. This is coming as soon as I have real time (as
  opposed to some minutes during lunch) to work on it.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27200 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 17:43:10 +00:00
Bruno G. Albuquerque
dcf3842b09 - Changed the well-known "Downloads" dir to be named "downloads" for
consistency.

All well-known directories in the home dir ("mail", "people", "config") are all
lowercase. The only exception was the "Downloads" one.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27199 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 16:58:47 +00:00
Stefano Ceccherini
c63991d1f5 fixed warnings
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27198 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 15:07:14 +00:00
Stefano Ceccherini
d02fd30b90 We were leaking memory every time a BPicture was drawn. Also check if the allocations succeeded. Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27197 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 13:57:29 +00:00
Bruno G. Albuquerque
e1d9b81384 - AttributeIterator::Update() now take into account differences between its
view of the small data section and the outside view.

Long version:

AttributeIterator is a higher level class designed to make it easy to iterate
through attributes in the small data section. The first attribute in the small
data section is the special "name" attribute that is used to reconstruct the
node path when you only have a node handy. As this attribute is not user
visible nor user modifiable (except by changing a node name of course), it is
considered a special attribute so the AttributeIterator class ignores it and
starts iterating from the second attribute on.

As opposed to this, internally the Inode class accesses the small data section
directly without using the AttributeIterator class so whenever it indexes items
in the small data section, it takes into account the special "name" attribute.

This creates a off-by-one relationship between those 2 representations and this
was a problem because whenever the small data section changed, all iterators
had to be updated (through a call to AttributeIterator::Update() having an
index parameter that represented the outside view and not the AttributeIterator
view, so iterators would not be adjusted correctly and the end result is that
every other attribute was not removed from the index. This would cause all
types of havoc with indexes, the simplest one being that entries in indexes
would point to non-existing nodes.

Ingo, pleased now? ;)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27196 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 12:25:15 +00:00
Stefano Ceccherini
b6ebf6d8ae patch by PieterPanman which fixes bug #2666. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27195 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 12:19:40 +00:00
Rene Gollent
df5d28d4d9 Style cleanup.
When asked to toggle playback, PlaybackManager never checked if it had a previous playback state to copy from. This caused a crash if playback was toggled via the keyboard when no file was loaded. Fixes ticket #2664 .


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27194 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 00:40:10 +00:00
Ingo Weinhold
b9f431f1df Extended debugger language: Dereferenced addresses are now supported as
left hand side of assignments. IOW it is possible to modify memory, now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 00:24:06 +00:00
Ingo Weinhold
18f2a9c17d Added support for architecture specific debug variables, e.g. for
referencing iframe registers. Their prefix is "$". E.g. "$eax" refers to
the eax register of the current iframe. The features cooperates with the
"in_context" command, i.e. "in_context 92 $eip = 0" will set the eip
register of thread 92 to 0 (thus sealing its fate ;-)).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27192 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-24 23:01:43 +00:00
Ingo Weinhold
23fdebca54 * Added option "-b <count>" to "dis". It causes up to <count>
instructions to be printed before the given address. The feature is
  implemented by looking up the address of the previous symbol for the
  given address and disassembling forward (two passes).
* The instuction at given address is printed highlighted (blue).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27191 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-24 21:53:43 +00:00
Ingo Weinhold
1b20a9a58e arch_debug_get_interrupt_pc() does now also support the currently
debugged thread, if set. This makes "dis" without specified address work
when used with "in_context".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27190 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-24 21:46:10 +00:00
Jérôme Duval
2aa5367afb extended debug check for FS_CALL() to others FS_CALL() versions
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27189 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-24 19:52:10 +00:00
Jérôme Duval
8cf7754bc7 added a check in FS_CALL() for null hooks in KDEBUG mode
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27188 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-24 19:26:51 +00:00
Ingo Weinhold
cd56082077 * Register command with add_debugger_command_etc() and show some nicer
usage text.
* Removed "length" parameter from disasm_arch_dump_insns() and the
  instruction count limit. If at all this should be an architecture
  implementation specific limitation.
* In the x86 case we use an input hook instead of a fixed buffer, now.
* Addressed TODO: If no address is given, the current iframe's PC is
  used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27187 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-24 18:16:31 +00:00
Ingo Weinhold
de5fcb8ab4 * The IOScheduler does not create as many operations as it can before
executing them. Doesn't really make any difference ATM.
* Handle B_BUSY returned by DMAResource::TranslateNext() correctly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-24 17:00:42 +00:00
Ingo Weinhold
025f7c3289 A DMABuffer doesn't have a fixed bounce buffer assigned anymore. We do
dynamically assign one when needed. Under the assumption that in most
cases a bounce buffer isn't needed, we can thus prepare a lot more
operations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27185 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-24 16:57:31 +00:00
Bruno G. Albuquerque
fb3edfeb27 - TAB is a valid character in a file name (although weird) and it also needs to
be escaped.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27184 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-24 13:14:25 +00:00
Jérôme Duval
65e6fe82ad better check the size of the chars table for keymaps. this avoids crashing in #2659.
dunno why the keymap is invalid though


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27183 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-24 12:28:27 +00:00
Ingo Weinhold
ded820241d Added optional debug facility (can be enabled by defining
TRACK_PAGE_USAGE_STATS): The page daemon tracks the distribution of page
usage counts. Can be printed using the "page_usage" command.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27182 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 23:41:44 +00:00
Ingo Weinhold
aacb158ca2 * The LIMIT_AVAILABLE_MEMORY macro can be defined to limit the amount of
RAM Haiku uses (for debugging purposes).
* "page_stats" prints some more infos now.
* page_writer():
  - Moved the low_resource_state() invocation out of the inner loop.
    Reduces lock contention on the sLowResourceLock recursive lock.
  - Additional debug output: Every 1024 written pages the page writer
    prints a message.
* steal_pages(): Addressed the TODO: When there should be pages to
  steal, but we can't get them ATM, we now timeout on the free pages
  condition variable instead of snoozing unconditionally, so that we
  wake up earlier when someone frees pages in the meantime.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27181 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 23:38:59 +00:00
Bruno G. Albuquerque
e07a4b3be0 - Correct the index number when calling _RemoveSmallDat() with an index.
This may be masking out a different bug.
- This fixes part of bug #2614. It may even fix all of it but I have to 
  test.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27180 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 22:16:12 +00:00
Ingo Weinhold
ed43619500 * vm_page: Swapped members usage_count and wired_count. We lost 4 bytes
due to alignment padding before.
* Reorganized merging of caches a bit. Renamed MergeStore() to Merge()
  and moved some more functionality into it. The method also moves the
  pages from source to consumer, now. This is necessary, since
  VMAnonymousCache needs to consider both physical pages and swap pages
  at the same time. Before we first moved the physical pages and the
  swap pages later, which was broken for two reasons: (1) A swap page in
  the consumer cache shadows a physical page of the source cache, which
  we ignored. (2) A source cache's physical page that also had a swap
  page would lose the latter in the process when moved to the consumer
  cache, i.e. if the page was not marked modified, it could be stolen
  and its data would be lost.

These changes improve the situation when building Haiku with 256 MB RAM
in that jam doesn't crash anymore, but in my test the system became
totally unusable after about an hour or 7000 targets (GUI froze). For
some reason it didn't manage to free pages anymore although swapping
heavily.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27179 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 19:01:01 +00:00
Ingo Weinhold
fa2fa606af Added kernel tracing for the swap support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27178 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 14:54:28 +00:00
Stephan Aßmus
fe34b1990b * Fixed bug with cropped scaled bitmaps, the wrong offset was used. This fixes
a regression in MediaPlayers peak display where the last row of pixels was
  wrong.
* Fixed clipping rect bugs in the new bilinear scaling loops, the last row
  and/or columns don't always need special treatment, only if they map to the
  last row and/or column of the destination bitmap.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27177 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 14:30:57 +00:00
Stephan Aßmus
725b24098d * Fix display update when toggling the scaling mode when the video is paused
without disturbing the same thing during normal playback.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27176 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 14:23:22 +00:00
Salvatore Benedetto
0650565811 * Removed +1 in calculating utf string length as the null char was already included
* Improved debug output


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27175 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 13:00:51 +00:00
Salvatore Benedetto
c5855c9ef4 * Clean up, no functional changes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27174 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 12:58:24 +00:00
Jérôme Duval
3f60937555 Patch from mattlacey: Apply screen saver selection when it's selected, not on closing. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27173 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 12:19:34 +00:00
Fredrik Modeen
6ecf7db5fd Code cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27172 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 11:16:40 +00:00
Fredrik Modeen
88b0546730 Code cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27171 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 11:16:31 +00:00
Fredrik Modeen
9ae4d7e586 Code cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27170 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 11:16:14 +00:00