Commit Graph

25205 Commits

Author SHA1 Message Date
Axel Dörfler
9dcc2929fa * Made a class FileMap from struct file_map.
* Added two TODO comments to the start of the file.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26287 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 11:16:50 +00:00
Stephan Aßmus
62bf33df96 Don't reset the window size when playing a new file if it isn't necessary.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26286 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 08:33:03 +00:00
Stephan Aßmus
591f4c05bc Remove the negative delay that was supposed to account for client->app_server
delay. The audio is later than the calculated realtime anyways, I suspect
the OSS Node does not advertise it's latency 100% correctly yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26285 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 08:32:17 +00:00
Michael Lotz
432e3df3c7 * Change the fixed bin list to a generated one based on a few constraining
factors per heap class. The previous bin sizes would in many cases just have
  wasted memory by not fully using up the available space while not providing
  any more elements than a bigger size. The computed bins ensure that the best
  sizes are used based on a min count, min size, alignment and max waste per
  page. Also changed the heap sizes to more reasonable values and renamed them
  to small, medium and large.
* Remove the shouldGrow parameter from heap_memalign() and just check it using
  heap_should_grow() where appropriate.
* Fix readding a nun-full area to the area list, the added page count can be
  bigger than one, therefore the check must be free_page_count == pageCount.
* Simplify ensuring correct alignment, just aligning the size instead of
  checking each candidate bin for alignment is enough.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26284 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 01:09:41 +00:00
François Revol
1308815ba3 Fix scope for gcc4.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26283 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 20:23:25 +00:00
Jérôme Duval
df709516a0 moved stateStatus read/write out of the interrupt handler
added some error verbose


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26282 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 19:20:03 +00:00
Stephan Aßmus
4a684bb832 That is more likely to give the right realtime...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26281 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 18:32:28 +00:00
Stephan Aßmus
9282400ff4 * The SeekSlider did not update the knob when it was resized.
* Subtile visual improvements to the SeekSlider.
* Added a PeakView for displaying the audio peaks that are produced by
  the AudioProducer.
* A MessageEvent can now directly take a custom BMessage for delivery.
* The peak notification mechanism is a bit separate from the rest of the
  Controller notification design, since the notification delivery should
  be delayed until the audio is actually audible. I may change this
  quick and dirty design though, since it is not so nice. The target
  time could also be part of the message and be handled at a different
  stage, but that would make it less efficient.
* Layout improvements to the playback controls.
* Code cleanup here and there, changed some license statements.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26280 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 18:29:42 +00:00
Ingo Weinhold
e146a7bf2f Also print the indices of stack frames. This makes the "call" command
more convenient to use.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26279 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 15:32:40 +00:00
Karsten Heimrich
ba18b05b5d * Fixed broken archive functionality, before we would not archive subitems
and store the archived items in the wrong message field. Verified on R5.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26278 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 14:46:06 +00:00
Oliver Tappe
7da7c45951 * when finding out whether or not R5 compatibility mode is required, we may have
to scan loaded libraries, too, as the dependency on network libraries may not
  be present in the executable image, but may be "hidden" in one of those
  library images (as is the case with Beam).
  


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26277 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 13:50:28 +00:00
Karsten Heimrich
d2805ca9aa * Archive the thread priority as well, it can be found in an R5 archive if Run() was called.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26276 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 10:34:47 +00:00
Karsten Heimrich
cd6265ec4d * don't leak fTrack
* fixed broken while loop
* call _InitObject also from the archive constructor
* just noticed while trying to load the R5 epson printer driver, still not working...



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26275 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 10:26:14 +00:00
Karsten Heimrich
f589ec0229 * remove whitespaces, no functional change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26274 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 10:21:41 +00:00
Michael Pfeiffer
21a0d9a1f7 Forgot to enable firewire bus manager. Thanks to JiSheng for the
notification.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26273 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 09:15:14 +00:00
Michael Pfeiffer
504092a4de Patch by JiSheng Zhang to fix firewire gcc4 build instability.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26272 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 07:45:09 +00:00
Oliver Tappe
1aa3d2e3f3 Resolved a couple of problems in BNetAddress implementation:
* fixed several byte order inconsistencies, it does not make sense to always
  convert the byte order input/output values - no we convert where it can
  be expected and leave it where it is confusing
* fixed size inconsistencies with respect to family and port, both of which
  were sometimes handled as int8, as int16 and as int32 in different places
  (now they are always int16)
These fixes make Beam connect to the correct address and port, but it still doesn't work, as it seems to be using UDP instead of TCP (doh!). Will look into that tomorrow.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26269 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-05 22:37:06 +00:00
Oliver Tappe
49cdfc106f * added a test for BNetAddress that exposes a couple of problems with the
current implementation (especially byte-order problems)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26268 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-05 22:27:05 +00:00
Jérôme Duval
43eab982cf reads now returns B_IS_A_DIRECTORY instead of B_BAD_VALUE for directories
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26267 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-05 22:26:21 +00:00
Stefano Ceccherini
165db546bf should've been part of the previous commit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26266 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-05 20:45:17 +00:00
Stefano Ceccherini
6e29a04d36 Patch by Dustin Howett which 'modularizes' timers. The best timer is
automatically selected at boot time. Pit and Apic timers are implemented
for now. Thanks Dustin!



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26265 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-05 20:40:06 +00:00
Stephan Aßmus
34ff70da4f * Added "Randomize" feature to Playlist window (Edit menu). It randomizes
either the selected items, or the entire list if nothing is selected.
* Small cleanups here and there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26264 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-05 19:21:38 +00:00
Stephan Aßmus
0ff21997d1 Small clean up.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26263 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-05 19:19:39 +00:00
Stephan Aßmus
ad5756bf3d * Accidentally left some dirt when removing debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26262 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-05 18:23:52 +00:00
Stephan Aßmus
e6ac2ec43e * The window would not reset the audio/video track to 0 on a new file if
the Controller would keep the last audio/video track index across files
  (which would be nice for certain situations).
* Better error message for unsupported files, especially for the
  B_MEDIA_NO_HANDLER error.
* In the Controller, try to obtain the track duration and ignore tracks that
  return a bogus duration. I have some MP3 files on ZETA that are obviously
  not handled correctly by the ZETA mp3 decoder. Previously, the player would
  just sit there and appeared to have some other internal error.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26261 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-05 18:22:37 +00:00
Axel Dörfler
9b74b9cda8 Vastly improved the file map implementation:
* adjacent vecs are now joined.
* partial invalidation no longer frees all cached extents.
* the array can now be larger than the needed number of entries, allowing
  for a saner array allocation policy.
* it does no longer read the whole file map when the first translation is
  requested, but only as much as required (it will still ask the file system
  for the maximum file size, but it won't traverse further as long as the
  initial request is fulfilled).
* This should help a lot with the ext2 file system that doesn't support real
  file extents (but keeps a list of blocks).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26260 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-05 17:58:47 +00:00
Axel Dörfler
609865fd21 * Implemented binary search for the disk offsets.
* Moved the file_extent array into its own structure (unnamed union problem
  with GCC4), and added max_count field (currently unused).
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26259 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-05 13:38:38 +00:00
Michael Lotz
dde0ba6223 Make the all_areas list ordered by base and take advantage of this ordering
when looking up the target area on free(). This makes free() scale better with
large area counts, as the lookup can abort early when it knows that no area
below the only candidate can contain the address.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26258 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-05 01:12:34 +00:00
Michael Lotz
a8f9741c8c * Removed -Wno-unused from all KernelMergeObjects in kernel Jamfiles.
* Fixed most of the warnings resulting from that by removing actually not used
  variables or moving declaration into the #IF. Left unused functions there
  though, as I wouldn't know if they are supposed to be used again.
* Fixed two statements with no effect (clamping to MAX_ANCILLARY_DATA_LEN in
  socket.cpp and unsetting fCounterSem in MessagingService.cpp).
* Some style cleanups.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26253 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-04 23:14:19 +00:00
Michael Lotz
4d9151c499 * Give the heaps a name so the grow heap can be distinguished from the small one.
* Rename sHeapList[] to sHeaps[], as there are no heap lists anymore.
* Rename the debug defines to be even more obvious.
* Also initialize allocations by area with non-null values when being paranoid.
* Disabled some debug output.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26252 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-04 21:05:46 +00:00
Michael Lotz
0ea16d8b5b Fix missing newline.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26251 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-04 17:38:34 +00:00
Michael Lotz
e5f7642ca8 Remove a few unused variables.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26249 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-04 16:10:25 +00:00
Ingo Weinhold
b8a6621507 fault_find_page(): When the source of the top cache is busy, we may
find our own dummy page. This is equivalent to not finding a page at
all. Fixes #2471.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26248 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-04 15:46:27 +00:00
Ingo Weinhold
063a092f93 Test to quickly reproduce bug #2471.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26247 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-04 15:20:43 +00:00
Michael Lotz
af637076ad * Avoid calling vm_unreserve_memory() if there is no change in the commited
size. Removes a bit of overhead (call and mutex_lock / mutex_unlock).
* Don't fail if there is exactly enough memory available to satisfy the
  reserve request. Not that it would really matter as it's rather an edge case...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26246 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-04 14:49:25 +00:00
Michael Lotz
45b309e39d Spotted this while reading through page code. The usage_count would be set for
wrong pages when allocating a page run unless the run started at page 0 as the
start offset was missing.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26245 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-04 14:41:17 +00:00
Michael Lotz
e511f726ea * Implement freeing of empty heap areas. When a heap_area becomes completely
empty and there is another empty area already, it is now removed from the
  heap and the underlying area is deleted.
* Fix grow suggestions to be based on 20% of a grow size instead of 10% of the
  current page count, as the current page count obviously gets larger over time
  making 10% of it larger than the grow size itself.
* Fix non-urgent grow request handling so that not two areas at once get added.
* Made some of the debug output more useful, turned off some other and fixed
  some comments.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26244 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-03 22:57:27 +00:00
Ingo Weinhold
71dffe8b84 The stack layout changed in r23983. Since then user_debug_post_syscall()
wouldn't be passed the syscall start time anymore. Fixes weird syscall
timings when using strace.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26243 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-03 21:14:54 +00:00
Axel Dörfler
dcdf3137e1 * Unnamed volumes now get the disk size instead of "unnamed" in their mount
menu name, ie. "(unnamed Ext2 File System)" could become "(12.5 GB Ext2 File System)".
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26242 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-03 20:44:57 +00:00
Axel Dörfler
c4d5cef0c6 * Now prints the disk size as part of the default name so that different
volumes are easier to differentiate.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26241 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-03 20:41:31 +00:00
Ingo Weinhold
dc27129332 stippi + bonefish:
* Missing backslash in UPDATE_THREAD_KERNEL_TIME() macro. Caused the
  thread's kernel time never to be updated when the thread left the
  kernel. The time would be added to the user time instead.
* Changed semantics of thread_at_kernel_exit(). It leaves interrupts
  disabled when returning, now. All code using it would disable
  interrupts afterwards anyway, and inbetween the thread could be
  interrupted causing two more time updates (or actually not causing
  them erroneously).
* The code in x86's interrupt handler entry (int_bottom) also checks
  thread::in_kernel now, to determine whether the thread was already
  considered to be in userland. This is necessary since the sysexit
  instruction doesn't reenable interrupts, so that we have to do that
  with the preceeding instruction. Hence an interrupt can occur
  inbetween, which would incorrectly add the interrupt's kernel time
  to the thread's user time.
* For userland threads team_create_thread_start() didn't invoke
  thread_at_kernel_exit() or any equivalent. We do that in 
  arch_thread_enter_userspace() now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26240 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-03 20:37:08 +00:00
Axel Dörfler
0875ae984f * Preparations for a module listener API - this will be used in the (disk)
device managers.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26239 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-03 11:52:36 +00:00
Stephan Aßmus
9380c00233 Tweaked the default preferred apps for some text mime types. The chances
are high that Pe is installed, if not, StyledEdit is used anyways. Also
Firefox is more likely to be present on these days images than NetPositive.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26238 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-03 11:36:28 +00:00
Michael Lotz
85ebbd1318 Another partial rewrite of the kernel heap. There are no heap lists anymore,
there is only one heap_allocator for each heap class. Instead of adding
complete allocators, individual areas can now be added to existing allocators.
This removes a lot of complexity in the frontend code and avoids the previous
duplications wasting resources (allocator lock, bin sizes, bin list).
The pages are now managed in heap_area structures that are attached to areas.
They store the page table, page free lists and local variables. The same
mechanism as used for heap_pages is now used for heap_areas too, i.e. they
are kept in a sorted list where the fullest but not yet completely full area
is always at the top. This favors areas to become completely full and other,
not as frequently used areas, to become completely empty over time so they can
be freed. Full areas are removed from the list, so they do not need to be
looked at/skipped when allocating new pages. Through this mechanism and as
there are no allocator lists anymore that grow bigger over time, allocations
should be far more scalable. Note that actually removing areas once they are
not needed anymore is still not implemented, but it is now a relatively easy
addition whereas previously it would have killed the whole design.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26237 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-03 01:44:35 +00:00
Axel Dörfler
bb956ce2ea * Fixed coding style.
* Since there is no "Haiku license", I replaced that with a reference to the
  MIT license as usual.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26236 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 22:03:04 +00:00
Oliver Ruiz Dorantes
625f6e7f92 Fix EOL, last one... sorry for the eolspam
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26235 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 21:32:59 +00:00
Oliver Ruiz Dorantes
43c93ca367 Fix EOL
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26234 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 21:26:41 +00:00
Oliver Ruiz Dorantes
d51d2501bf Fix EOL
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26233 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 21:18:43 +00:00
Oliver Ruiz Dorantes
75c310bc5b Fix EOL
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26232 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 21:12:07 +00:00
Oliver Ruiz Dorantes
ade530ec1d Fix EOL
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26231 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 21:10:24 +00:00