* 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
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
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
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
* 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
* 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
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
* 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
* 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
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
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
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
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
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
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
* 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
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
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
* 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
Patch by Mika Lindqvist. Could we give give him Commit access?
I am getting daily patches from him with fixes and new features.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26227 a95241bf-73f2-0310-859d-f6bbb57e9c96
the thread issuing the command called acquire_sem_etc() on the semaphore
that the interrupt handler would otherwise release. The semaphore is now
released unconditionally, but to prevent the race condition that the
B_RELEASE_IF_WAITING_ONLY was trying to avoid, it is released with the
spinlock held.
* The error interrupt handler did not reset the fCommandsActive flag, but
it seemed to us like it should do that.
* WaitForTransfer now also acquires the spinlock to reset fCommandsActive,
which may be unnecessary but does not harm either.
* Cleanup of some long lines, sorry for mixing that with the actual fix.
Fixes bug #2359 (long pauses when accessing the disk).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26223 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Turn off text cursor when switching to text mode.
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26222 a95241bf-73f2-0310-859d-f6bbb57e9c96
them with the ROUNDUP macro that was specifically made for this task so that
too tired developers do not mess up the calculations...
* Don't use area allocation during kernel startup (not that it really happened).
* Minor simplification of similar calculations in heap_attach().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26221 a95241bf-73f2-0310-859d-f6bbb57e9c96
contiguous pages, it will request growing even if there are still more than
10% free pages available. Previously that case was not handled anymore and the
allocation would have just failed. Note that this is a pretty rare case, as
there are no "large" allocations happening in either the small or large heap
classes, but only in the huge one for allocations between 128KB and 1MB.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26220 a95241bf-73f2-0310-859d-f6bbb57e9c96