heap leak check info would otherwise be overwritten for allocations that still
fit the 16 byte bin (i.e. allocations of 0-4 bytes).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23956 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Tracing of allocations, reallocations and frees
* Leak checking infrastructure to dump allocations
The leak checking code records the team and thread id when an allocation is
made as well as stores the originally requested size. It also adds the
"allocations" debugger command that can dump all current allocations (usually
a huge list) or filter by either a team or thread id. This way it's easily
possible to find leftover allocations of no more active teams/threads.
Combined with the tracing support one might be able to track down the time and
reason of an allocation and possibly find the corresponding leak if it is one.
Note that kernel heap leak checking has to be enabled manually by setting the
KERNEL_HEAP_LEAK_CHECK define to 1.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23953 a95241bf-73f2-0310-859d-f6bbb57e9c96
allow arbitrary bus numbers. Disabled domain support for __INTEL__.
This should fix bug #1774
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23944 a95241bf-73f2-0310-859d-f6bbb57e9c96
and pages are now kept in lists as well. This allows to return free pages once
a bin does not need them anymore. Partially filled pages are kept in a sorted
linked list so that allocation will always happen on the fullest page - this
favours having full pages and makes it more likely lightly used pages will get
completely empty so they can be returned. Generally this now goes more in the
direction of a slab allocator.
The allocation logic has been extracted, so a heap is now simply attachable to
a region of memory. This allows for multiple heaps and for dynamic growing. In
case the allocator runs out of free pages, an asynchronous growing thread is
notified to create a new area and attach a new heap to it.
By default the kernel heap is now set to 16MB and grows by 8MB each time all
heaps run full.
This should solve quite a few issues, like certain bins just claiming all pages
so that even if there is free space nothing can be allocated. Also it obviously
does aways with filling the heap page by page until it overgrows.
I think this is now a well performing and scalable allocator we can live with
for quite some time. It is well tested under emulation and real hardware and
performs as expected. If problems come up there is an extensive sanity checker
that can be enabled by PARANOID_VALIDATION that covers most aspects of the
allocator. For normal operation this is not necessary though and is therefore
disabled by default.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23939 a95241bf-73f2-0310-859d-f6bbb57e9c96
makes more sense (and also completes the fix for bug #1759). Retrieve
the command from the message archive.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23931 a95241bf-73f2-0310-859d-f6bbb57e9c96
some absolute path was not enough to always recognize a library as
already loaded. This fixes problems with Perl where loading an add-on
would cause another instance of libperl.so to be loaded, which would
lead to crashes due to uninitialized static vars in the new instance.
Perl builds now and the tests run, but quite a few do fail.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23930 a95241bf-73f2-0310-859d-f6bbb57e9c96
not use a single static variable to synchronize CPUs at two points. In an
environment where CPUs do not really run concurently (in emulation or with
logical processors) it would be possible for CPUs to get trapped in the first
synchronization while another CPU might just do its thing and change the
sync variable again. These CPUs would then never leave the first loop as the
exit condition has already passed again. The key is to use two different sync
variables like it is done in early kernel initialization. As I didn't manage
to trigger this code though I am not sure if this is gonna work.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23926 a95241bf-73f2-0310-859d-f6bbb57e9c96
using the int 99 syscall method. Otherwise it would remain set e.g.
after _kern_restore_signal_frame() and the next syscall would look like
one returning a 64 bit value.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23918 a95241bf-73f2-0310-859d-f6bbb57e9c96
defined flag: NET_PROTOCOL_ATOMIC_MESSAGES.
* socket_send() now honours NET_PROTOCOL_ATOMIC_MESSAGES and returns either
EMSGSIZE if the data to be send is larger than net_socket::send::buffer_size,
or divides the data in appropriately sized chunks.
* This fixes sending >=64K over a TCP socket at once (TCP would just have
returned an error in that case).
* TCP now overrides the default send buffer size (to 32768 for now).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23915 a95241bf-73f2-0310-859d-f6bbb57e9c96
Moved SetFlags() from _InitObject() to unarchiving constructor as other
constructors already set the flags.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23914 a95241bf-73f2-0310-859d-f6bbb57e9c96
Also set the flag B_PULSE_NEEDED (for the blinking cursor) in TermView.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23911 a95241bf-73f2-0310-859d-f6bbb57e9c96
another apps works correctly (minus the blinking cursor, we'll see why
it doesn't)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23908 a95241bf-73f2-0310-859d-f6bbb57e9c96
function has the old behavior. When false, it just calls the scheduler
without any priority adjustment or other stuff.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23906 a95241bf-73f2-0310-859d-f6bbb57e9c96
/dev/urandom. It verifies that Haiku's dev/urandom is performance-wise
totally unusable -- it takes several seconds.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23904 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added gcvt(), ecvt(), and fcvt() prototypes to stdlib.h - they are all
marked legacy, but are still part of the POSIX standard, so we might want
to implement them if the need arises.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23896 a95241bf-73f2-0310-859d-f6bbb57e9c96
Not sure if this is the right place, Ingo might want to review that one.
* This fixes unmounting sessions of a multi-session CD, ie. the BeOS CD (it currently panics
when trying to access a device that's not there anymore - for debugging only, of course :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23894 a95241bf-73f2-0310-859d-f6bbb57e9c96
already knows this driver.
* This should also allow to have a driver in home/config/add-ons/... overlays
a driver with the same name in system/add-ons/...
* This should also fix bug #1750.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23892 a95241bf-73f2-0310-859d-f6bbb57e9c96
multi-session CDs. Maybe partitioning systems should give preference over
file systems, though.
This fixes bug #1634.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23891 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added temporary copyright entry for lp_solve as a placeholder, until I
know what it should say.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23890 a95241bf-73f2-0310-859d-f6bbb57e9c96
BLayout implementation (BALMLayout) using the Auckland Layout Model
(ALM). The original ALM was implemented by Christof Lutteroth, the
Haiku/C++ version by James Kim.
The code needs some review, but the test programs seem to work fine.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23889 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added other IDs from the graphics driver, but I need to look up
their bridge IDs before actually adding them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23881 a95241bf-73f2-0310-859d-f6bbb57e9c96
directly onto a device under FreeBSD.
I messed around with the code a little (style-fixes, some refactoring)
without being able to compile or test it, so be careful...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23880 a95241bf-73f2-0310-859d-f6bbb57e9c96
This is not safe when already freed memory is overwritten. But since we also
store the next pointer of the freelist in there, overwriting would break the
freelist and cause a crash in that case. This gives a drastic performance
boost when freelists grow during use and especially when opening and closing
a lot of programs.
* Optimize filling the freed element with 0xdeadbeef by writing 4 bytes at a
time instead of using single byte writes. Works as all our bins have an
element size that is a multiple of four. Put a panic in there just in case
this assumption isn't met for some reason.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23879 a95241bf-73f2-0310-859d-f6bbb57e9c96
stuff for the ExtendedPartitionAddOn. If I understand correctly, from the
point of view of the Disk Device API, ExtendedPartitionAddOn is a disk system
which supports child partitions and is analogous to PartitionMapAddOn. The
type string for the supported child partitions is probably wrong, since I
used "Intel Logical Partition".... In fact, the types currently returned by
PartitionMapAddOn are not as intended either. We will have to think of how
we want this particular feature to work.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23877 a95241bf-73f2-0310-859d-f6bbb57e9c96
to be able to call BPartition::GetNextSupportedChildType(). For the
PartitionMapAddOn, the types should be either primary or extended, depending
on the number of empty primary partitions and the existance of one
extended partition. DriveSetup shows "Intel Primary Partition" and
"Intel Extended Partition" in the Create menu now. Ingo, please review,
maybe I didn't understand the plan correctly. Also, I tried to follow the
code path, which is quite nested, and am pretty confused.. For example,
I didn't find the place where the CreateChildJob is finally created. Is this
missing yet?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23876 a95241bf-73f2-0310-859d-f6bbb57e9c96
the BDiskDevice of a BPartiton has not been prepared for modifications. To
me, it means the initialization status of the object does not support the
operation, hence B_NO_INIT. B_BAD_DATA hints to me that I have passed invalid
data to a function.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23875 a95241bf-73f2-0310-859d-f6bbb57e9c96
that doesn't look right to me (and since there is a 50 ms timeout anyway...).
* Minor coding style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23872 a95241bf-73f2-0310-859d-f6bbb57e9c96
use a cached value otherwise. Should speed up icon placement when Tracker
starts.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23871 a95241bf-73f2-0310-859d-f6bbb57e9c96
* If in B_WIDTH_AS_USUAL mode, the strings in the tabs are nevertheless
truncated to the available width.
* Pass the real area available for the string to BTab::DrawLabel(), resolved
TODO in DrawLabel() about not having to calculate an offset to account
for the slope.
* Fixed some too lines of code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23869 a95241bf-73f2-0310-859d-f6bbb57e9c96
* The BMediaTheme now uses B_WIDTH_FROM_LABEL for tabs in tabviews,
this makes tabs as wide as they need to be.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23868 a95241bf-73f2-0310-859d-f6bbb57e9c96
* BTimeSource now checks if it is about to add itself as a slave node
and refuses to.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23867 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Stumbled upon a possible bug while trying to understand the reuse of large
allocations. The "first" variable was always set to the current index at the
end of the loop, even if it was already set. This should have caused that
the success condition to never be reached.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23866 a95241bf-73f2-0310-859d-f6bbb57e9c96
BMessenger::SendMessage(), which could lead to deadlocks (as in bug
#1745).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23865 a95241bf-73f2-0310-859d-f6bbb57e9c96
TraceOutput for output options instead.
* Added "traced" option --difftime. Instead of the absolute system time
it prints the difference time to the previously printed entry.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23864 a95241bf-73f2-0310-859d-f6bbb57e9c96
for finding this. This should fix bug #1734.
* Removed unused BWindow members and the temporary PrintToStream() method.
* Indentation cleanup (DirectWindow.h had some spaces instead of tabs).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23863 a95241bf-73f2-0310-859d-f6bbb57e9c96
window every time, without reason, since _Revert() was called even if no
changes were made.
Build the list of window sizes dynamically, this way we get rid of some
code duplication.
Removed implementation of TermWindow::QuitRequested(). The
B_QUIT_ON_WINDOW close takes care of quitting the application.
Some cleanups.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23860 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added copy-to-clipboard.
* Added picture and bitmap clipboard formats.
Now you can just paste into either a text or graphics app. Even Gobe uses the text in word processor and bitmap in picture editor :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23855 a95241bf-73f2-0310-859d-f6bbb57e9c96
spaces. This way we can use all the existing logic to select them in either
list view or the disk layout view. IAW, selecting empty spaces now works.
* Changed the way the Create menu works. It is now only enabled if a space
item is selected and then the sub items are filled with the types that
the parent partition says it supports for child creation. (Does not
yet seem to work.)
* PartitionViews for spaces were not put into the partition_id -> view map.
* Fixed focus indication when switching the disk for the disk layout view,
previously, the correct view was only selected when the disk did not change.
* Added a temporary work around to avoid showing bogus space items at all
(those smaller than a "cylinder size"). Currently hard coded to 8 MB size.
But I already have an idea how we could fix this in the Disk Device API
implementation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23854 a95241bf-73f2-0310-859d-f6bbb57e9c96
name ("Intel Extended Partition"), this allows disks with extended partitions
to successfully PrepareForModifications(). I have just used DriveSetup to
initialize a partition with BFS. Yay!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23851 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Set mime type when exporting to file.
* disable netpositive stuff (only css).
* export only the table when not saving to file (clipboard).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23850 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added HTML export, and provision for more formats and clipboard export.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23848 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Use our own BBitmapStringField implementation which also requires our
own BColumn implementation. This is just a visual improvement which makes
both the eventual partiton icon and device label indent with the outline
level of the list item
* when setting the Unmount menu item enabled state, check wether the
partition in question is the /boot volume and disallow unmounting.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23845 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added it to the image, and configured it to be used.
* Currently, it cannot transfer files over 64 KB for some reason
("Message too long").
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23843 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added sigmask() macro.
* Fixed libutil.h I broke yesterday: it's thought to add functions only if
you've included some other headers before; added the correct header guard
we're using for our sys/param.h.
* Added pidfile.c to the build.
* Fixed warning in realhostname.c, and pidfile.c.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23840 a95241bf-73f2-0310-859d-f6bbb57e9c96
When specified it desigantes that the interrupt handler should not lock the
vector with a spinlock when executing the installed interrupt handlers. This
is necessary to allow the same interrupt vector to be handled in parallel on
different CPUs. And it is required for the CPU halt to work synchronously when
there is more than one AP CPU. Though the acquire_spinlock() should cause IPIs
to be processed, only this fixed the SMP_MSG_FLAG_SYNC problem for me.
Not locking is safe as long as it is guaranteed that no interrupt handler is
registered or removed while the interrupt handler is running. We can guarantee
this for the SMP interrupt handlers we install in arch_smp_init() as they are
never uninstalled. Probably this flag should be made private though.
Restored the SMP_MSG_FLAG_SYNC when entering the kernel debugger.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23838 a95241bf-73f2-0310-859d-f6bbb57e9c96
(must also compare to BSD; I've looked at their sources, but I might have
missed something).
* Added sys/file.h and the flock() system call.
* common_fcntl() could forget to put back the file descriptor on some error
conditions (I guess we should introduce and use a DescriptorGetter class).
* Cleaned up fcntl.h, moved the BSD extensions S_IREAD and S_IWRITE to
sys/stat.h where they belong, and added the missing S_IEXEC to them.
* Added some more comments.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23836 a95241bf-73f2-0310-859d-f6bbb57e9c96
This builds only with GCC 4, mostly because it needs libstdc++ v3
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23834 a95241bf-73f2-0310-859d-f6bbb57e9c96
file position in case an offset was specified.
* Reverted r23828-r23830 in File.cpp: don't fix the symptoms but the cause
of the problem (hey, that has to be in the kernel, right? :))
* Cleanup of File.cpp, removed OpenBeOS namespace.
* Moved user_fd_kernel_ioctl() to the section where it belongs to (that
function should be renamed, though).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23832 a95241bf-73f2-0310-859d-f6bbb57e9c96
ReadAt() and Read() with regards to the file position. Ie, WriteAt()
is not supposed to modify the data pointer.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23830 a95241bf-73f2-0310-859d-f6bbb57e9c96
position before calling _kern_read() and reset it afterwards.
*NOW* this fixes bug #1200 in all cases.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23829 a95241bf-73f2-0310-859d-f6bbb57e9c96
missing attributes).
I hope nothing relies on the previously broken behaviour.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23828 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added {get|set|end}usershell() functions.
* Define MAXLOGNAME, and L_SET, L_INCR, and L_XTND.
* The pidfile stuff in libutil.h is now included, too.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23827 a95241bf-73f2-0310-859d-f6bbb57e9c96
to fix bug #1731.
* However, it turns out that depot destruction obviously doesn't work
correctly, at least we keep partial or full slabs around when we're
using them (which causes the code to panic).
* Therefore, I've now disabled depots completely, until I find the time
to really work on that code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23825 a95241bf-73f2-0310-859d-f6bbb57e9c96
* added optional tracing for the main operations
* fixed bad pointer arithmetic when reallocating/moving the object's data
* it was impossible to remove the very first space via _RemoveSpaces()
* added a little more variaty to error return codes for some
functions to make them a little more helpful
-> This fixes the bogus space values in DriveSetup (#1737)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23824 a95241bf-73f2-0310-859d-f6bbb57e9c96
HaikuBuildCompatibility.h; this fixes building agp_gart and the intel
extreme driver for BeOS.
* Added sockaddr_storage to HaikuBuildCompatibility.h.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23823 a95241bf-73f2-0310-859d-f6bbb57e9c96
* While this is not a really good idea for a lock with supposedly little
contention, but it'll fix bug #1731. I haven't tested it yet, but will
do so in a minute :-)
* I will need to rework the slab anyway so that it's possible to use it
as a replacement for our heap, and then I'll switch back to a benaphore
again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23822 a95241bf-73f2-0310-859d-f6bbb57e9c96
PrepareModifications() on the parent BDiskDevice first. Hm. I should
probably reorganize things a bit.
* Selecting these empty spaces is still not supported.
* Fixed inserting empty spaces in the DiskView at the correct index.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23812 a95241bf-73f2-0310-859d-f6bbb57e9c96
partitions - I couldn't test it yet, but what is definitely missing
is being able to select these spaces to create new partitions on them
* fixed the bug that if you select a partition on another disk, the
disk view does not switch to the new disk. (I was comparing disk
pointers, but since I deleted the old BDiskDevice instance first, the
new one got assigned the same pointer... at least it appears I am not
leaking memory anywhere... :-))
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23811 a95241bf-73f2-0310-859d-f6bbb57e9c96
destination of the message and it's "what" field are stored. It might be
nice to also get some info about its fields -- maybe as an additional
option.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23810 a95241bf-73f2-0310-859d-f6bbb57e9c96
_kern_ktrace_output() syscall, since it will be stored in a separate
entry anyway.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23807 a95241bf-73f2-0310-859d-f6bbb57e9c96
for reading my commit and noticing! :-)
Using the test application I could have found that bug; that codepath is
currently not used in Haiku.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23801 a95241bf-73f2-0310-859d-f6bbb57e9c96
confirmation after sending off the startup IPIs. We simply moved on and setup
the temporary stack address for the next CPU to be started. With this it was
possible that the trampoline code did not manage to load the address before
we overwrote it. So for configurations with more than two CPUs it was possible
that two CPUs were setup to the same kernel stack which could have caused all
sorts of things - most likely a tripple fault and a reboot. On real hardware
this seems very unlikely but it was easily reproducible with QEMU and -smp >2.
We now use the shared trampoline stack to implement a notification mechanism.
The trampoline code will clear the stack location variable once it has loaded
everything it needs from the trampoline stack. On the other side
smp_boot_other_cpus() will wait for this variable to be cleared after it sent
the startup IPIs so that it knows when it can safely move on and overwrite the
area to boot the next CPU.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23800 a95241bf-73f2-0310-859d-f6bbb57e9c96
the GTT is not part of the stolen memory. However, the BIOS popup seems
to be - removing that page solves the flickering overlay when its buffer
contained it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23799 a95241bf-73f2-0310-859d-f6bbb57e9c96
we now always only use the primary ring buffer.
* Removed secondary ring buffer allocation and member fields.
* Increased size of the primary ring buffer to 65536 bytes.
* The bytes per row register is computed differently for 9xx chips.
* On G33, the overlay does not need a physical address anymore, so we
don't pass B_APERTURE_NEED_PHYSICAL to the allocation anymore for that
device.
* intel_free_memory() accidently added the aperture base to the allocation
and would therefore never free any memory.
* INTEL_RING_BUFFER_SIZE_MASK was shifted one bit to the right, didn't
cause any harm with our buffer sizes, yet, though.
* With these changes, the driver runs stable on a G33 chipset (I have not
yet tested the hardware cursor, though, it might need some work, too).
The only known issue left is that overlay flickers a bit if its buffer
is partially backed up by reserved and allocated memory.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23798 a95241bf-73f2-0310-859d-f6bbb57e9c96
memory (so no memory was ever bound in that case).
* Disabled debug output in the Intel GART module.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23797 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Removed "physical" parameter of GART's bind_aperture() - I don't think this
be of use to anyone.
* Fixed binding/unbinding pages in the Intel GART driver; I accidently shifted
the page offset twice.
* Actually forgot handling of allocated memory in Aperture::BindMemory().
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23796 a95241bf-73f2-0310-859d-f6bbb57e9c96
* The kernel now opens up to 8 debugger modules (and puts them into an array;
maybe we'll want to switch to a doubly linked list when there is the need).
* Implemented an example debugger module that prints a stack trace of the
current thread when the kernel debugger is entered (not included in the
image).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23794 a95241bf-73f2-0310-859d-f6bbb57e9c96
compiling a regex. Note this is probably a bug in how MDR uses regex and not in
the regex implementation itself. This is just the simple fix while I
investigate bug #1200.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23792 a95241bf-73f2-0310-859d-f6bbb57e9c96
these key combinations (ALT + +/-) can't be used on many keymaps, we
might want to change. Moved view resizing to a private window method.
Seems to work, more or less (ticket #1334)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23791 a95241bf-73f2-0310-859d-f6bbb57e9c96
selection (for example, moving around text with the mouse).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23789 a95241bf-73f2-0310-859d-f6bbb57e9c96
that. This fixes bug #1475.
* Now accepts file arguments (will pick a random one out of them) as fortune
sources.
* Minor cleanup and simplifications.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23788 a95241bf-73f2-0310-859d-f6bbb57e9c96
taken as-is from a previous launch time, as number of CPUs could have changed since last boot.
Size is now enforced and height is always dynamically computed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23785 a95241bf-73f2-0310-859d-f6bbb57e9c96
instead of rl_delete for the delete key. That was one reason for bug #1495.
* The other one was that an inputrc file at /etc was ignored, the bash would
only check for ~/.inputrc. If changed that now such that if ~/.inputrc could
not be read, /etc/inputrc is tried.
* Both of these changes close#1495.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23783 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Since it didn't check if any mouse button was pressed at the time it was
called, it would still initiate a drag, and thus caused bug #1710.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23782 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Now uses the AGP GART module for memory management. This greatly simplifies
the memory handling, and memory is now actually allocated on demand,
instead of a fixed size (stolen memory is not freed, though).
* The Intel GART module should now also work with older chipsets.
* No longer remove the GTT size from the stolen memory; this appears to have
been a mistake in the X driver. Not sure about the BIOS popup yet.
* The AGP module (in combination with the Intel GART module) is now mandatory
to use the Intel driver.
* Removed now superfluous settings (like memory size). Only enabling/disabling
the hardware cursor is still supported.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23781 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Debug output now defaults to on (much more useful for debugging...)
* The receiver now stops when it got 0 bytes (signals peer is closing the
connection).
* The random reorder stuff did not work correctly.
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23775 a95241bf-73f2-0310-859d-f6bbb57e9c96
also used in BindMemory() and UnbindMemory() - before the latter two were
just not working correctly for memory in the reserved region.
* The Aperture destructor now also frees (and unbinds) all still existing
allocations.
* Aperture::fFirstMemory was not initialized.
* Added some more debug output.
* BindMemory()'s vertical to physical address translation didn't work correctly.
* alignment must be at least B_PAGE_SIZE in _Insert().
* bind_aperture() needs to pass the B_APERTURE_NON_RESERVED flag to
CreateMemory().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23774 a95241bf-73f2-0310-859d-f6bbb57e9c96
* map haiku console colors to atari's palette.
* move the stack up for testing.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23769 a95241bf-73f2-0310-859d-f6bbb57e9c96
with an unsupported sound card or the like, the fSoundOutput initialization
is checked in more places.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23764 a95241bf-73f2-0310-859d-f6bbb57e9c96
* a little cleanup in PartitionList to respect the 80 chars/line limit
* added PartitionList::AddSpace() and alternative PartitionListRow
constructor in preparation for support of empty spaces on devices
* refactored a _InsertIndexForOffset() method, the insertion index is
now based on offset instead of partition_id (untested)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23761 a95241bf-73f2-0310-859d-f6bbb57e9c96
(I guess frenchies are guilty here, as mmu_man's ThemeAddOn have the same disease...)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23757 a95241bf-73f2-0310-859d-f6bbb57e9c96
* It now also serves as a generic GART manager and accepts bus modules as well
as custom modules of graphics drivers if they want to (could be used for the
Radeon PCI GART stuff, for example).
* Implemented GART support module for Intel i965 and G33 chipsets (the other
Intel chips will come later).
* Renamed agp bus manager to agp_gart to reflect its new functionality (even
though the AGP functionality is already outdated (due to PCIe), the GART
stuff remains current).
* Adapted existing users of the AGP bus manager to the API changes.
* Not very well tested yet...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23754 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added some defines needed when playing with the bridge controller.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23753 a95241bf-73f2-0310-859d-f6bbb57e9c96
was a race condition when more than one CPU would enter the debugger at the
same time (or rather before one CPU could stop all the others). We now use the
inDebugger variable to tell if someone is already in the debugger and then
only process inter CPU messages and retry entering the debugger.
Since sending the synchronous broadcast most of the time hung over here with
SMP enabled I removed the synchronous flag and added a simple spin to give the
other CPUs a chance to process the halt request. Added comments that explain
the reasons and a ToDo to revert to synchronous delivery once we fixed the
problem. The kernel debugger is now usable on my quad core.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23751 a95241bf-73f2-0310-859d-f6bbb57e9c96
systems it can easily happen that the thread gets removed from the queue (when
it times out for example) during the time we don't hold the sem lock.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23749 a95241bf-73f2-0310-859d-f6bbb57e9c96
at the end of that loop we guaranteed a crash when this special handling was
triggered.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23748 a95241bf-73f2-0310-859d-f6bbb57e9c96
OS-owned bit. Otherwise we overwrite exactly the bit we later have to wait for.
Could theoretically help on legacy support issues, but I doubt it since most
hardware probably does not even use EHCI legacy support as it's normally not
needed to support full/low-speed input devices.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23747 a95241bf-73f2-0310-859d-f6bbb57e9c96
"teams".
* "team" without arg prints info about the current team.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23746 a95241bf-73f2-0310-859d-f6bbb57e9c96
path. Makes the "teams" output prettier and "team <name>" becomes
usable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23745 a95241bf-73f2-0310-859d-f6bbb57e9c96
useful soon so that you can actually do something after entering KDL.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23742 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Implemented _RemoveTransferFromEndpoint
* Reworked _AppendChainDescriptorsToEndpoint as now every endpoint has (must have) a dummy descriptor
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23741 a95241bf-73f2-0310-859d-f6bbb57e9c96
pointer (as needed by the G33 chipset).
* Minor debug output improvements.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23739 a95241bf-73f2-0310-859d-f6bbb57e9c96
This should be in line with all uses of scheduler_enqueue_in_run_queue() and
simplifies a few places where it is used.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23738 a95241bf-73f2-0310-859d-f6bbb57e9c96
controller ownership in EHCI to aid debugging USB legacy support issues.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23735 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Fixed _SubmitControlRequest in order to use _AppendChainDescriptorsToEndpoint
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23734 a95241bf-73f2-0310-859d-f6bbb57e9c96
enqueued into the run_queue again. Modified the workaround to a panic in the
scheduler so we notice when something else does the same.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23731 a95241bf-73f2-0310-859d-f6bbb57e9c96
A thread that just missed a semaphore and put itself into the sems notify
queue could be enqueued into the run queue by release_sem_etc() of another
CPU before the CPU running the thread had a chance to reschedule it. Therefore
there is a timeframe where a thread can be running on one CPU and already be
in the run queue again. In this case no other CPU may schedule this thread
because then it would overwrite the threads' CPU pointer which kills the rest
of the scheduler logic, smp_get_current_cpu() and everything that depends on
that (like the kernel debugger). The more CPUs you have the easier this could
happen, up to the point where it was always triggered during boot on my quad
core system. The system would freeze and you could not enter the kernel
debugger, because two CPUs thought they were the same and disabled each other
through SMP communication. This makes booting my system stable and might fix
the occasional hang on boot for other SMP systems with only 2 CPUs/cores.
I've put a ToDo comment that details this above the workaround. Maybe we
should fix this in another way. Reviews, comments and suggestions welcome ;-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23721 a95241bf-73f2-0310-859d-f6bbb57e9c96
DirectConnected() could be called twice with B_DIRECT_STOP when closing
the BDirectWindow.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23718 a95241bf-73f2-0310-859d-f6bbb57e9c96
Notify the finisher thread after canceling transfers. It was possible that freeing the allocated
transfer resources would be delayed unnecessarily until some other transfer completed and woke up
the finisher thread. Found by Salvatore Benedetto, thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23714 a95241bf-73f2-0310-859d-f6bbb57e9c96
transfer resources would be delayed unnecessarily until some other transfer completed and woke up
the finisher thread. Found by Salvatore Benedetto, thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23713 a95241bf-73f2-0310-859d-f6bbb57e9c96
* set_gtt_entry() used the wrong index to fill the GTT - this could have never
worked correctly when you specified more memory than the amount of stolen
memory.
* Implementing maintaining resources for emulating overlay using the 3D engine
on i965. I don't yet commit the actual overlay code, as that is a) ugly, and
b) does not work yet.
* Moved AreaKeeper into its own header.
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23709 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Our behaviour differs a bit from how BeOS handles those windows, added a
comment to the code which explains that, and how we could change it if we
really wanted to.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23705 a95241bf-73f2-0310-859d-f6bbb57e9c96
* renamed trasfer_data memeber top to first_descriptor
* added data_descriptor member to transfer_data (useful for control transfer)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23702 a95241bf-73f2-0310-859d-f6bbb57e9c96
so in the first place)
* Renamed local variable descriptor to current in the finisher thread
* Using next_done_descriptor instead of next_logical_descriptor, as the latest
is used to keep track of all descriptors that belongs to the transfer
* Added _UnlinkTransfer private method
* Implemented _FreeDescriptorChain
* Moved endpoint pointer from the ohci_general_td structur to the transfer_data_s
structure, ad the ohci_general_td has already a transfer_data_s pointer which can
be used to the endpoint pointer reducing ridundancy.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23701 a95241bf-73f2-0310-859d-f6bbb57e9c96
are not that useful, and the terminal doesn't like it anyway.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23700 a95241bf-73f2-0310-859d-f6bbb57e9c96
the command would overwrite its own output, not always on the bottom of the
screen.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23699 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added block_writer thread that continuously writes back blocks for all current
block caches.
* A block cache now maintains the number of dirty blocks if it doesn't use
transactions. That knowledge could also be used in block_cache_sync()...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23698 a95241bf-73f2-0310-859d-f6bbb57e9c96
For commands with this flag set, the parser won't parse the
arguments provided (it will only check for matching parentheses and
brackets), but will pass the unparsed argument list string to the
command instead.
* Set the new flag for the "expr" command, so one doesn't have to quote
the expression to evaluate anymore (or put it in parentheses).
* Fixed tokenizing of quoted and unquoted strings in expression mode.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23697 a95241bf-73f2-0310-859d-f6bbb57e9c96
* This should speed up writing a transaction considerably.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23694 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Removed the public hash_grow() function again (at least for now, it's only
private).
* Removed the newSize argument from hash_grow(); it will compute the new size
automatically.
* The block cache is now using hash_insert_grow() instead of hash_insert()
which should make hash lookups much faster with some 10 thousand blocks,
also increased the initial table size from 32 to 1024...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23692 a95241bf-73f2-0310-859d-f6bbb57e9c96
when the view is detached, fRenderer has already been released, and wouldn't
unlock the looper anymore in GLTeapot. This fixes bug #1626.
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23691 a95241bf-73f2-0310-859d-f6bbb57e9c96
already using.
* We don't have to try posting _QUIT_ more than once, as it cannot block; the
looper is local, so direct message passing is used in this case.
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23690 a95241bf-73f2-0310-859d-f6bbb57e9c96
printing the last 30 entries, it continues the last iteration, thus
making the more common use case more comfortable. The old functionality
is still available via "traced 0".
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23689 a95241bf-73f2-0310-859d-f6bbb57e9c96
views don't have a valid screen clipping yet. If then later we want
to invalidate the clipping of an entire hierarchie, the traversal stops
before reaching some of the child views, because the assumption was that
for any views with invalid screen clipping, their child views have invalid
screen clipping as well. Though this might cost a little performance, we
always invalidate the screen clipping of all child views, ignoring the
flag of the current view. Fixes ticket #1198 (garbled screen clipping of
E-Mail prefs and WonderBrush tool area when switching tabs).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23688 a95241bf-73f2-0310-859d-f6bbb57e9c96
kSyscallParametersInfos to kExtendedSyscallInfos) and added "name"
field. Now the classes for syscall kernel tracing don't need to lookup
the syscall function symbol anymore, which speeds up printing/filtering
of those entries dramatically.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23687 a95241bf-73f2-0310-859d-f6bbb57e9c96
is recorded in a kernel trace entry (if tracing is enabled).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23686 a95241bf-73f2-0310-859d-f6bbb57e9c96
volumes root directory when trying to unmount it. This fixes bug #1694.
Thanks to Ingo for investigating this! :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23685 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added "printteam" switch to "traced" command, enabling the printing of
the team ID.
* Added "team" filter to the "traced" command expression language.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23684 a95241bf-73f2-0310-859d-f6bbb57e9c96
comfortable number. Somewhat more complex "traced" filter expressions
tended to exceed the old limit easily.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23683 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Made the iterator static, so that it's possible to move from the
iteration position of the previous invocation to the current start,
instead of always having to start from the beginning or the end.
* Filtered backward iteration:
- Restrict the range to dump to the entries between the first and the
last filter match.
- Use new FILTER_MATCH entry flag to avoid applying the filter a
second time in the print loop.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23681 a95241bf-73f2-0310-859d-f6bbb57e9c96
- Changed Backgrounds preflet to account for the fixes in BColorControl
First commit :) Hi everybody!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23680 a95241bf-73f2-0310-859d-f6bbb57e9c96
vm_cache_write_modified() here anymore since quite some time, it actually
doesn't make any sense to call the file system's "fsync" method here.
This should make syncing all file systems much faster when many vnodes are
in use.
* If a file system doesn't use the file cache, it can still just sync everything
it needs to in its "sync" method.
* Added a TODO item on how to improve sync speed further, if necessary.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23679 a95241bf-73f2-0310-859d-f6bbb57e9c96
write code aligned to what one has written in the comment (or the
other way around).
* Made trace_entry structure doubly linked, by introducing a
previous_size member. By using bit fields, shrinking the flags field
to 4 bits, and not saving the lower two bits of size and previous_size
(which are always 0 due to alignment), the structure remains 4 byte
sized and can still address the same entry size.
* kBufferSize is no longer one less than it could be.
* "traced" command:
- Use static variable for the iteration state rather then cluttering
the temporary debug variable name space.
- The <count> parameter can now be negative, in which case the entries
before (and including) <start> are printed.
- Added a new optional parameter, specifying the maximal number of
entries to be filtered. Filtered iteration is beautifully
comfortable now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23678 a95241bf-73f2-0310-859d-f6bbb57e9c96
command usage texts, which can be too long for kprintf().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23677 a95241bf-73f2-0310-859d-f6bbb57e9c96
Implemented palette mode and fixed bugs listed at ticket #1701. Thanks
for your work!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23671 a95241bf-73f2-0310-859d-f6bbb57e9c96
We use an indirect page descriptor instead of pointing the page to itself like on x86.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23668 a95241bf-73f2-0310-859d-f6bbb57e9c96
* the structure of the add-on was originally designed to handle all kinds of
different input devices, but has been limited to handle Wacom tablets for
now, since our mouse add-on handles the rest already.
* various Wacom Tablets are supported including Cintiq Partner, Graphire,
Graphire2/3/4, Intuos, Intous2/3, PenStation, PenPartner and Volito
TODO: Currently, the add-on does not work for some reason, though the kernel
driver publishes a devfs entry and the input_server picks it up, the Wacom
device thread is running. Need to investigate...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23667 a95241bf-73f2-0310-859d-f6bbb57e9c96
* the driver should be generic for all Wacom tablets, but there is a
special control transfer to put the devices in to "absolute mode", it
may not work with future tablets. The driver allows to use read devices,
for which there is a special protocol. If the read request has a certain
size, then the driver will transmit info on the device, like the vendor
and product id as well as the max the packet size, for reads larger than
that, it will issue an interrupt transfer and put the raw data received
from the device behind the info header
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23666 a95241bf-73f2-0310-859d-f6bbb57e9c96
in question as it used to find the view that is under the mouse (found
during a short phone session with stippi :-)). This fixes bug #1714.
* The local view clipping is still not correctly maintained by the
app_server, but that only affects the drawing now. I've added some
commented out code that give you some visual feedback on this problem
(ViewLayer::MarkAt()).
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23663 a95241bf-73f2-0310-859d-f6bbb57e9c96
disabled in most cases.
* Wrapping in make_space() was broken. When wrapping the second time or
later, sFirstEntry would already be greater than sAfterLastEntry and
resetting sAfterLastEntry to the beginning of the buffer would
erroneously "free" all entries between the buffer start and the
original sAfterLastEntry. If the tracing buffer was small enough,
the odds were that a not yet fully initialized entry would already
be re-allocated, causing all kinds of weird behavior.
* When an entry that is not yet fully initialized needs to be
freed, we let the allocation causing the freeing fail. We can't wait
for the entry, since we've interrupts disabled and since the entry
initialization might even try to allocate more (buffer) entries.
* make_space() is now safe to be called in any situation, and
allocate_entry() will do that, which simplifies things there and
avoids a few duplicate checks.
* Moved maximum allocation size check from alloc_tracing_buffer() to
allocate_entry(). Just in case... :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23662 a95241bf-73f2-0310-859d-f6bbb57e9c96
boolean operators ("not", "and", "or") and filters matching thread IDs
or contained strings.
I'm still not fully happy with the command. It should be possible to
define a filter and then comfortably scroll through the matching
entries. Currently having to specify an index range of the unfiltered
entries is rather unhandy in combination with filtering.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23658 a95241bf-73f2-0310-859d-f6bbb57e9c96
also move the thread ID from AbstractTraceEntry to TraceEntry).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23657 a95241bf-73f2-0310-859d-f6bbb57e9c96
parent node could temporarily get invalid (ie. CheckNode() would
fail).
* Since shrinking the stream was done in edge cases only, anyway, we
will no longer do that which works around the problem. This fixes
bug #1716.
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23656 a95241bf-73f2-0310-859d-f6bbb57e9c96