bool return type. Did I mention this was an unstable Haiku extension?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28181 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added a new class BAffineTransform, currently in the BPrivate namespace
and the inofficial "shared kit".
* Extended BPolygon to be transformable by a BAffineTransform.
Thanks a lot!
Minor fixes by myself:
* The class accidentally still derived from agg::trans_affine.
* Added then missing comparator operators.
* Swapped the BPoint* and count arguments of Apply(), since that seems
to be the more common order in the other Be API.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28176 a95241bf-73f2-0310-859d-f6bbb57e9c96
the data of two BMessages and allows recursive comparison (BMessage inside
BMessage). Note that using this API might require you to recompile your app in
the path to R1.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28174 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Add possibility to restart a complete pipe through B_KDEBUG_RESTART_PIPE.
* Implement tail in the kernel debugger making use of the former.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28154 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Resolved TODO: The type of the gradient is no longer encoded twice in the
app_server link protocoll.
* Moved instantiation of the BGradient into the LinkReceiver::ReadGradient()
method.
* Check success for (at least) ReadGradient() in ServerWindow.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28150 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Fixed a general problem with respect to overriding of the reserved
virtual function slots: instead of statically invoking the method
that corresponds to the reserved slot on the class that contains the
slot, we now invoke the virtual Perform() method. Perform() then dispatches
the method invocation to the "proper" class, i.e. the highest class in the
hierarchy that actually implements the requested method.
This fixes a crash in apps that use liblayout's MSlider class and
should fix one or other spurious bug with old apps or libraries, too.
* added new header folder 'binary_compatibility' that contains files that
define the method codes and data structures required by Perform()
* looked for and implemented all used reserved virtual slot functions to
invoke Perform() where necessary or to pass on the method call statically
(for slots that were already maintained by Be)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28124 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Implemented BGradient, BGradientLinear, BGradientRadial,
BGradientDiamond, BGradientConic and BGradientRadialFocus
new Interface Kit classes.
* Implemented all the (AGG-based) backend necessary in
the app_server to render gradients (Painter, DrawingEngine)
* app_server/View can convert a BGradient layout to screen
coordinates.
* Added BGradient methods of the Fill* methods in BView.
* Implemented a test app and added it to the image as a
demo.
* Adopted Icon-O-Matic and libs/icon in order to avoid
clashing with the new BGradient class. Re-use some
parts where possible.
Awesome work, Artur! Thanks a lot. Now a more modern
looking GUI has just become much easier to implement! :-)
TODO:
* Remove the need to have gradient type twice in the
app_server protocol.
* Refactor some parts of the patch to remove duplicated
code (Painter, DrawingEngine).
* Adopt the BPicture protocol to know about BGradients.
* Review some parts of the BArchivable implementation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28109 a95241bf-73f2-0310-859d-f6bbb57e9c96
- initialize the time_base_frequency kernel arg (should be done in the bootloader though...). We will use MFP timer to support system_time(). At least try to.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28098 a95241bf-73f2-0310-859d-f6bbb57e9c96
file system can write to files before mounting.
* Set the flag for all file systems that actually can write.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28055 a95241bf-73f2-0310-859d-f6bbb57e9c96
the methods IsFile() and GetFilePath() to BDiskDevice, and
BDiskDeviceRoster::GetFileDeviceForPath().
* Added new syscalls to implement this functionality.
* Added new flag B_DISK_DEVICE_IS_FILE.
* Fixed wrong operator precedence assumption in the BDiskDevice class at
several places.
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28052 a95241bf-73f2-0310-859d-f6bbb57e9c96
* added opengl to build be api headers
* define USES_BE_API for gen_matypes
this should fix the build for Linux which don't provide GL headers :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28050 a95241bf-73f2-0310-859d-f6bbb57e9c96
- remove dead ppc code
- add support for probing hardware registers the way linux does (early, hook with VBR to trap faults)
- detect MFPs this way.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28031 a95241bf-73f2-0310-859d-f6bbb57e9c96
debugger add-on set a demangle hook, all modules under debugger/demangle/ are
now considered demangle modules.
* Added another function to the demangle module interface that gives you access
to the arguments.
* Implemented a demangling module for GCC2.
* The older demangling module is now called "gcc3+", but doesn't support
getting the arguments yet.
* The "call" KDL command is now using demangling to automatically show you
the arguments of a call from a stack crawl.
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28018 a95241bf-73f2-0310-859d-f6bbb57e9c96
* In _StealMouseMessage(), don't maintain fLastMouseMovedView, instead,
prevent B_MOUSE_MOVED message from being stolen that are important for
detecting transit changes. The point is that some apps (like Tracker) are
shooting themselves in the foot because they steal mouse messages via
GetMouse() in one place, but then rely on sane transit values in another
place. The way it works now, the view in question may get notified of the
same mouse moved coordinate twice, once via GetMouse() and once via
MouseMoved().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28002 a95241bf-73f2-0310-859d-f6bbb57e9c96
r27530 - allow faults with ints disabled if there is a handler
r27648 - call the end-of-interrupt thread callback
r27718 - add <asm_defs.h>, not used yet
r27722 - register the commpage as image and symbols (but we don't use it yet)
- remove dupped call to thread_get_current_thread()
- use 16MB iospace for now, 4MB seems too small.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27999 a95241bf-73f2-0310-859d-f6bbb57e9c96
* This makes it possible to select a specific device, even if no interface
has been configured for it yet. To make it work, each interface now has a
private direct route which will be returned if a socket is bound to a device.
* This will be used for example in DHCP to make it work when more than one
adapter is attached.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27983 a95241bf-73f2-0310-859d-f6bbb57e9c96
PHYSICAL_PAGE_{NO,CAN}_WAIT into an actual flag
PHYSICAL_PAGE_DONT_WAIT.
* Pass the flags through to the chunk mapper callback.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27979 a95241bf-73f2-0310-859d-f6bbb57e9c96
datagram to have the SO_BROADCAST flags set (the flag
is only needed for sending a broadcast) - fixes part of
#2065
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27973 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Use the new VMCache::Read() flags parameter to directly read into the
physical page in the page fault handler instead of mapping it first.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27966 a95241bf-73f2-0310-859d-f6bbb57e9c96
in struct stat.
* Instead, I followed Marcus' great idea and added a compatibility check in
the runtime loader: now, R5 binaries (also shared libraries) are detected,
and they get special versions for stat(), fstat(), and lstat() that return
the smaller stat struct.
* However, I've disabled (in src/system/libroot/posix/sys/stat.c) using the
larger stat field for now, as this breaks some of our optional packages.
So until we rebuild them all, this shouldn't be enabled.
* This should now also be used for BeOS compatibility in libnetwork.so.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27961 a95241bf-73f2-0310-859d-f6bbb57e9c96
* added some convenient functions, operator etc...
* reused parts of the patch by Stephen Deken, thanks
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27954 a95241bf-73f2-0310-859d-f6bbb57e9c96
* memset() is now available through the commpage.
* CPU modules can provide a model-optimized memset().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27952 a95241bf-73f2-0310-859d-f6bbb57e9c96
arch_vm_aspace_swap().
* The x86 implementation does now maintain a bit mask per
vm_translation_map_arch_info indicating on which CPUs the address
space is active. This allows flush_tmap() to avoid ICI for user
address spaces when the team isn't currently running on any other CPU.
In this context ICI is relatively expensive, particularly since we map
most pages via vm_map_page() and therefore invoke flush_tmap() pretty
much for every single page.
This optimization speeds up a "hello world" compilation about 20% on
my machine (KDEBUG turned off, freshly booted), but interestingly it
has virtually no effect on the "-j2" haiku build time.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27912 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added smp_send_multicast_ici(), which sends the message to all CPUs
specified via a mask.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27910 a95241bf-73f2-0310-859d-f6bbb57e9c96
* The hardware cursor is now disabled at 640x480 with a Virge VX (before it
was just invisible).
* EDID info can now be read for all S3 chips.
* For the Savage IX, Savage MX, and SuperSavage chips the display is no
longer expanded to fill a laptop LCD display when the mode resolution is
less than the size of LCD display.
* Savage IX, Savage MX, and SuperSavage chips will now display mode
1400x1050 on a 1400x1050 laptop LCD display. Previously the display was
blank at that resolution.
* Previously about half the Savage chips would not draw properly at
1400x1050. That is, the image was badly skewed and unusable. All of
them now draw properly at 1400x1050.
* Some code was reorganized to remove unnecessary and redundant code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27863 a95241bf-73f2-0310-859d-f6bbb57e9c96
Currently it only contains KDEBUG and the block cache debugging macros.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27816 a95241bf-73f2-0310-859d-f6bbb57e9c96
#2261.
* Made at least BFS report it more or less correctly (the attributes are
ignored, though).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27791 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added stdio_ext.h header with declaration for the only currently implemented
stdio extensions fsetlocking() and flushlbf() and associated constants. This
helps compiling some software like gettext and cvs.
NOTE: I have not tested this myself, but trust the review done by Andreas
and Scott.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27789 a95241bf-73f2-0310-859d-f6bbb57e9c96
buffer format, the buffer can now also contain other events than just
stack traces. ATM these are only references to the image events
(created/deleted). Therefore we no longer have to flush the profiling
buffer after such an event, since the debugger can exactly match the
samples. Since we couldn't flush when the profiling timer hit while the
thread was in the kernel, that wasn't working that well anyway.
"profile -f" fails to translate stack trace addresses only very rarely,
now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27775 a95241bf-73f2-0310-859d-f6bbb57e9c96
enumeration (getting roothubs, enumerating child devices and detecting device
topology) and hub port management (resetting and disabling ports). These were
laying around for quite some time.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27768 a95241bf-73f2-0310-859d-f6bbb57e9c96
letting the boot loader provide full paths for the pre-loaded images.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27753 a95241bf-73f2-0310-859d-f6bbb57e9c96
been mounted, before anyone could try to load any modules from it.
Also pass it a flag whether the boot volume is where the boot loader
pre-loaded the modules from.
* module_init_post_boot_device() changes the pre-loaded module image
paths to normalized boot volume paths, now. Got rid of the code in
register_preloaded_module_image() which tried something like this.
* Changed module image ref counting. A referenced module has single
reference to its image, which is released when the module becomes
unreferenced.
* get_module() for a reference module will not try to re-get and re-set
the module's image anymore. That could lead to a similar module (from
different paths) being loaded at the same time. A module from a new
file can only be loaded when the old one has been put completely.
* Simplified B_KEEP_ALIVE module handling a bit. When the module is
initialized, we add another reference, which we'll never free. Thus
the module remains loaded without special handling. Removed
module_image::keep_loaded. A B_KEEP_ALIVE module remains referenced
and thus its image remains referenced, too.
* Removed module::file, a cached path to the module's image. An
optimization that wouldn't work with multiple root directories for
modules (/boot/beos/..., /boot/common/...) or when module files were
moved. get_module() does now always search the image file, when the
module is still unreferenced. This should be a bit slower than before,
but I didn't notice any difference in VMware at least. If it turns out
to be a problem we could introduce a more intelligent cache that stays
up to date by using node monitoring.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27752 a95241bf-73f2-0310-859d-f6bbb57e9c96
function (normalize_path()), now. There was some code duplication
before.
* Added "bool traverseLink" parameter to vfs_normalize_path(). When
true and the leaf component is a symlink, it will be resolved.
* KPath:
- Added similar leaf link traversal parameter to SetTo() and
SetPath().
- Added Normalize().
- Added DetachBuffer(), which returns the object's current buffer and
unsets itself.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27751 a95241bf-73f2-0310-859d-f6bbb57e9c96
elf_add_memory_image_symbol(). The former creates and registers a new
image that has not been loaded from a file. The latter adds a symbol to
its symbol table. This is mainly a debug feature, allowing to name code
or data in memory regions that aren't associated with loaded ELF
objects.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27721 a95241bf-73f2-0310-859d-f6bbb57e9c96
I'm not happy with the location, but I didn't see any better one in the
header tree.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27717 a95241bf-73f2-0310-859d-f6bbb57e9c96
been called for a team, and fail installing the default debugger if it
is set. This makes disable_debugger() actually work. Fixes bug #2763.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27713 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Extended the profiling API by an option to record a variable number of
samples per tick. The stack depth is used as a maximum.
* Added new option "-f" to the "profile" tool. When specified it
increments the hit counts of all symbols in the full available caller
stack. I.e. the resulting hit counts will approximate the total time
spent in each function or any function directly or indirectly called
by it. Thus "_start" and "main" will usually get 100% and leaf
functions only what time has actually been spent in them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27699 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Relaxed the stack depth and profiling interval limits a bit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27697 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Reduced the kernel_args array size from 32 to 16 (7 are used on a normal
build).
* Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27690 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Fixed hash_remove_current(): It didn't update "lastElement" and thus
always also removed all elements in the same bucket preceding the one
to be removed. Also got rid of the useless "for" loop.
Fixes#2757.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27689 a95241bf-73f2-0310-859d-f6bbb57e9c96
* The class calculates a minimum width now, which is based on the line height,
this may also fix the bug with the small text inputs in the Pe Find window.
* Added TODOs about implementing GetHeightForWidth(), which may be a good idea
when a BTextView is used as non-editable informative text in an interface,
and one wants to make sure that the entire text is shown.
* Replaced the call to _Refresh() in Draw(), which recalculates all the line
breaks for no reason with _DrawLines() again. The TODO mentioned that text
will be drawn without drawing the background first, but maybe this is a
relict from times where Draw() was invoked directly? At least I cannot see
any negative consequences, and this should be much more efficient.
(Other than that, this patch should hopefully have no potential negative
side effects...<crosses fingers>)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27670 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Adjusted used files systems accordingly.
* BFS::Stream::GetName() was broken. It accessed the small data region
which wasn't loaded, since BFS::Stream derived from bfs_inode, which
is a variably-sized structure with the small data region at the end.
Changed that to a ref-counted, shared member instead.
* Implemented RootFileSystem::GetName().
* Added Directory::GetPath() to get a full path of the directory or an
entry.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27664 a95241bf-73f2-0310-859d-f6bbb57e9c96
into BTextView class as well, hopefully fixing the GCC4 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27661 a95241bf-73f2-0310-859d-f6bbb57e9c96
buffer during a timer event that interrupted a kernel function: We do
now flush the buffer as soon as it is 70% full, *if* we didn't interrupt
a kernel function. When the buffer runs full and we still haven't hit a
user function, we drop the tick. The number of dropped ticks is recorded
and sent to the debugger with the next update message.
Reverted the previous partial solution (the temporary disabling of
profiling while in debugger support code).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27658 a95241bf-73f2-0310-859d-f6bbb57e9c96
is created or deleted (or exec*() has been invoked). The counter is
sent with several debugger messages.
* Track the image event counter that is used when samples are added to
the profiling buffer. If the current team counter differs, we flush
the buffer first (sending an update message to the debugger), so that
the debugger has a chance to match the addresses to the correct images.
* Disable profiling for a thread while it runs in the debugger support
code. This fixes potential deadlocks which could occur when a
profiling timer event occurred that would require the buffer to be
flushed while the thread was just sending something to the debugger or
waiting for a command. As it turns out, this is not sufficient either,
since we should never try to flush the buffer when the timer event
occurred in the kernel, since the thread might hold a lock that the
debugger thread could try to acquire. Will implement a more general
solution later.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27656 a95241bf-73f2-0310-859d-f6bbb57e9c96
BTextView classes:
* Declared the directly used BTextView helper classes as private BTextView
classes and changed all affected files.
* Realized that Tracker's BPoseView was (accidentally?) using what used to
be _BWidthBuffer_. It had declared it's own class with the same name and
same members/size in headers/private/tracker/TextViewSupport.h, but the
implementation was nowhere to be found. I can only explain this that
the BTextView implementation was then actually linked and used. But the big
problem was that it was used without locking (unlike in BTextView)! When
many Tracker windows opened during system startup or later and they happened
to each request characters not yet in the cache, I imagine things could have
gone bad and corrupted memory. Anyways, since I can see the usefulness of
the cache, BPoseView uses BTextView::WidthBuffer on purpose now. And I moved
the locking inside BTextView::WidthBuffer::StringWidth().
* Adjusted InterfaceDefs.cpp accordingly.
* TODO: Move subsequent classes into BTextView namespace as well, ie derived
classes that BTextView doesn't directly know about. All stuff in src/kits/
inteface/textview_support/
* Added preliminary and not yet implemented layout friendly BTextView
constructors.
* I will try to handle the insets imposed by BTextView::fTextRect a bit
differently when used inside the new layout management framework. For this,
I added BTextView::SetInsets() and GetInsets(). SetInsets() doesn't do
anything yet.
So far, everything seems to work still... ;-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27654 a95241bf-73f2-0310-859d-f6bbb57e9c96
* We can't enable interrupts in an interrupt handler. Instead we use the
newly introduced callback feature, which notifies the debugger right
before returning from the interrupt.
* We didn't indicate that the profiling buffer was full and that the
thread shouldn't be profiled ATM. Therefore it could happen that it
was profiled while trying to notify the debugger that the profiling
buffer was full, resulting in a deadlock. Introduce a respective flag
in the thread debug structure.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27649 a95241bf-73f2-0310-859d-f6bbb57e9c96
interrupt handler and will be executed right before returning from the
interrupt.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27648 a95241bf-73f2-0310-859d-f6bbb57e9c96
be tracked to the kernel, which then counts the hits, an area is
passed to kernel in which the hits are recorded. When the area is
full, the debugger is notified. For some reason that part doesn't work
yet -- the whole system freezes when waiting for a reply.
* Reorganized the profile tool code a bit. For one with respect to the
changed API, but also to prepare tracking of image creation/deletion.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27640 a95241bf-73f2-0310-859d-f6bbb57e9c96
* wait_for_timer() now detects if it has been called from within the timer
execution thread, and will return in error instead of waiting for itself
forever. This fixes bug #2682.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27620 a95241bf-73f2-0310-859d-f6bbb57e9c96
various system information.
* Implemented retrieving some VM stats via this call.
* The VM now maintains a page fault counter, and sets system_info::page_faults
accordingly.
* Added a (pretty simple) "vmstat" command line app.
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27597 a95241bf-73f2-0310-859d-f6bbb57e9c96
* The layout friendly constructors don't need to mess with the control size.
* The layout friendly constructors can use the respective BControl constructor.
* Refactored some duplicated code.
* Removed duplicated GetFontHeight() calls.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27585 a95241bf-73f2-0310-859d-f6bbb57e9c96
doing a lot of these things the same way as BMenuField are already doing.
Perhaps a private helper class could be refactored from these two controls
to avoid duplicating a lot of this code, although there are a few subtle
differences here and there.
These changes make a BTextControl behave properly in the layout management
frame work, in case CreateLabelLayoutItem() and CreateTextViewLayoutItem()
are _not_ used to layout the BTextControl.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27584 a95241bf-73f2-0310-859d-f6bbb57e9c96
MaxSize(). This makes sure that MaxSize() returns a proper size when the
user "unsets" the explicite max size.
* minimum label height is 0 if there is no label.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27583 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Removed unused fClean member
* Got rid of fSkipSetFlags member by simply calling the BView::SetFlags()
directly where fSkipSetFlags was supposed to prevent the custom
implementation.
* Added some debugging facilities.
* Used the layout friendly constructors of BControl where appropriate.
* Used B_FOLLOW_ALL for the child text input, it should be more correct.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27576 a95241bf-73f2-0310-859d-f6bbb57e9c96
VMware this doesn't produce very good results though. In my tests I only
got twice as many hits as with 1 ms, although it should be roughly ten
times as many. Might work better on real hardware.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27572 a95241bf-73f2-0310-859d-f6bbb57e9c96
still pretty much work in progress.
* Introduced init_thread_debug_info() which is used instead of
clear_thread_debug_info() when the thread is created. The latter
requires former initialization.
* user_debug_thread_deleted() is now already invoked in thread_exit(),
not in the undertaker.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27531 a95241bf-73f2-0310-859d-f6bbb57e9c96
many iframes are supposed to be skipped before recording the stack
trace. Currently implemented for x86 only.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27529 a95241bf-73f2-0310-859d-f6bbb57e9c96
When specified, the message is read but not removed from the port.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27527 a95241bf-73f2-0310-859d-f6bbb57e9c96
* The most important fix is that in BMenuField::_ValidateLayoutData(),
divider was calculated, but then never used. If the menu field was not
using the layout management, it should take the existing fDivider into
account, but never did. This caused #2728.
* Added some tracing that helped me debug this.
* Fixed a bunch of layouting inconsistencies. It will also improve some
unnecessary resizing of the menu bar.
Will test all of this some more. But in the test app I do have, the BMenuField
works more like in BeOS now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27508 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added BScrollBar::SetOrientation().
* Improved _DrawArrowButton() to have a good visual result even when the
scroll bar does not have the standard width or height.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27494 a95241bf-73f2-0310-859d-f6bbb57e9c96
interfaces, endpoints and generic descriptors.
* Add getter for active interface index and simplify the count operation as
it isn't misused to also get interface descriptors anymore.
* Refactor out some common code into helper functions.
* Adapt the USBKit to the changed/new interface.
* Change how alternate interfaces are exposed by USBKit by providing normal
BUSBInterface objects for alternate interfaces that can easily be examined
and used.
* Make BUSBInterface class aware of its alternate index and use the alternate
aware usb_raw functionallity to build the endpoint and descriptor lists.
* Add ActiveAlternateIndex() to find out what alternate is currently active.
* Style cleanup of the USBKit classes, use std::nothrow everywhere and check
all allocations. Simplify some code by removing optimization where the benefit
is questionable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27409 a95241bf-73f2-0310-859d-f6bbb57e9c96
for PPC would give compiler errors if this is not defined (to nothing). For
the MetroWerks compiler, one needed to explicitely import/export classes and
methods, but GCC does not need it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27405 a95241bf-73f2-0310-859d-f6bbb57e9c96
be used now. Tested only with VMware so far.
* apm_shutdown() is now called with interrupts turned on.
* Renamed arch_cpu.c to arch_cpu.cpp.
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27404 a95241bf-73f2-0310-859d-f6bbb57e9c96
wake vector (not tested at all).
* Removed disabling interrupts when entering the sleep state - looks like
ACPI still needs memory then.
* Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27403 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Imported radix bitmap tree implementation from FreeBSD and adjusted it
for Haiku.
* Make use of the radix tree in the swap support implementation instead
of using simple bitmaps. This will allow for faster swap slot
allocations. ATM Haiku doesn't benefit that much, since we always
allocate single pages, but that will change eventually.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27355 a95241bf-73f2-0310-859d-f6bbb57e9c96
unscheduled was incorrect.
* Introduced _kern_analyze_scheduling() syscall. It requires scheduler
kernel tracing to be enabled. It uses the tracing entries for a given
period of time to do a similar analysis the "scheduler" debugger
command does (i.e. number of runs, run time, latencies, preemption
times) for each thread. Additionally the analysis includes for each
thread how long the thread waited on each locking primitive in total.
* Added kernel tracing for the creation of semaphores and initialization
of condition variables, mutexes, and rw locks. The enabling macro is
SCHEDULING_ANALYSIS_TRACING. The only purpose is to provide
_kern_analyze_scheduling() with more info on the locking primitives
(the name in particular).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27304 a95241bf-73f2-0310-859d-f6bbb57e9c96
tracing buffer entries even when not in the kernel debugger.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27302 a95241bf-73f2-0310-859d-f6bbb57e9c96
* more get/ set functions, operators
* date until 1582 are handled in julian calendar
* date above 1582 are handled in gregorian calendar
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27264 a95241bf-73f2-0310-859d-f6bbb57e9c96
for message queue
* Removed unnecessary header Vector.h
* Removed HasSemaphoreSet method: since there will be an IPC table for each
subsystem, if a key exist, it already has a semaphore set associated
with it
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27256 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Implemented _kern_msgget()
Work in progress, some stuff may be removed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27254 a95241bf-73f2-0310-859d-f6bbb57e9c96
vector at the end of the file will be aligned to the given value.
* BFS uses an alignment of 512 bytes (should be block size of the
underlying device or BFS block size, whatever is less), which should
be fine, since file data are only stored in BFS blocks. This totally
avoids any partial operations at the I/O scheduler level, thus saving
disk operations. Not that I could measure any performance difference.
Theoretically it should help a lot though, particularly when dealing
with lots of small files, since we avoid using bounce buffers, which
are (a) limited in number and (b) require copying of the data.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27246 a95241bf-73f2-0310-859d-f6bbb57e9c96
256 MB RAM, 1.5 GB swap, and "jam -j2", so it basically seems to do its
job alright.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27233 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Implement color palette generation for the boot splash images in the
generate_boot_screen build tool. Only 4-bit screen support is missing now.
* Adopted images.h with the new results from generate_boot_screen.
This should fix black boot screens for graphics cards that don't support
true color modes for the native resolution. I've tried to find the ticket,
#2177 almost looks like the one, but it looks more like the mode is out
of range if I understand the ticket right.
Thanks a lot, David, and sorry it took so very long to apply your patch!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27223 a95241bf-73f2-0310-859d-f6bbb57e9c96
Powel. The functionality was written by Jeff Prosise and Davide Pizzolato and
has been cleaned up and adopted to the Haiku coding style by David Powell and
myself. The class can perform a color quantization for generating the optimal
color index palette (with given maximum size) from a given RGBA image.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27221 a95241bf-73f2-0310-859d-f6bbb57e9c96
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
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
PC of the innermost iframe.
* The "in_context" command does now set the currently debugged thread
respectively.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27166 a95241bf-73f2-0310-859d-f6bbb57e9c96
debugger and added respective getter/setter methods
debug_{get,set}_debugged_thread(). By default the currently debugged
thread is the thread that dropped into the kernel debugger, but commands
like "in_context" can change it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27164 a95241bf-73f2-0310-859d-f6bbb57e9c96
state_to_text().
* state_to_text() can now deal with a NULL thread argument.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27163 a95241bf-73f2-0310-859d-f6bbb57e9c96
first command line argument of a given command line string.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27155 a95241bf-73f2-0310-859d-f6bbb57e9c96
as they aren't unloaded when there is no boot device yet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27136 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added a second kernel daemon service, resource resizer, which is
mainly supposed to be used for resizing allocations asynchrounously.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27122 a95241bf-73f2-0310-859d-f6bbb57e9c96
create_area_etc().
* When the new flag CREATE_AREA_DONT_WAIT is specified, the functions
don't wait for memory or pages to become available. They fail
immediately instead.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27117 a95241bf-73f2-0310-859d-f6bbb57e9c96
of free objects an object cache should try to have ready. If the number
of free objects drops below the threshold, a new urgent priority thread
is asked to asynchronously resize the object cache (pretty similar to
the heap grower thread). Such a mechanism is necessary for code paths
that are supposed to free pages, but may need memory themselves (like
the swap support).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27100 a95241bf-73f2-0310-859d-f6bbb57e9c96
is enabled to set a per-heap get_caller() function.
* Added "-h <heap>" option to the "allocations_per_caller" command. If
given only the allocation for the specified heap are considered.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27097 a95241bf-73f2-0310-859d-f6bbb57e9c96
be passed on to the IORequest. Most relevantly physical pages can now
be written directly by passing B_PHYSICAL_IO_REQUEST.
* Added VMCache::WriteAsync() which is supposed to write pages
asynchronously. The base class version version falls back to the
synchronous Write(). Only VMVnodeCache implements WriteAsync() ATM,
VMAnonymousCache (swap support) still has to be adjusted accordingly.
* write_page() doesn't need to map the page anymore as it can write the
physical page directly.
* Modified the page writer to write pages asynchronously. This shouldn't
have any noticeable effect yet. It will though as soon as the I/O
scheduler reorders I/O operations.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27056 a95241bf-73f2-0310-859d-f6bbb57e9c96
writes the given page iovecs asynchronously. The new class
AsyncIOCallback is used to inform the caller when the request has been
finished.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27055 a95241bf-73f2-0310-859d-f6bbb57e9c96
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes#1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
Ingo suggestions: instead of having one global sem_undo list,
we now have two local list, one per semaphore set and one per team
which is held in its xsi_sem_context structure, along with a mutex.
A mutex has also been added to the semaphore set class in order to
protect the local list, but also in order to (hopefully) improve
concurrency.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26993 a95241bf-73f2-0310-859d-f6bbb57e9c96
currently points to /etc for the system, and dedicated "data" directories
for common/user (the system directory should get a dedicated "data", too,
though).
* Added B_USER_CACHE_DIRECTORY (in config/cache).
* These additions were discussed some years ago, but I just had a good reason
to use them :-)
* Coding style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26990 a95241bf-73f2-0310-859d-f6bbb57e9c96
wait_for_timer() function.
* Moved the internal Fifo class into utility.cpp - we should probably just
remove it again.
* Fixed uninit_timers() so that it would even work in combination with the
timer thread if there are timers left to be scheduled.
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26980 a95241bf-73f2-0310-859d-f6bbb57e9c96
our dma_restrictions structure (but we're using blocks instead of bytes,
since unlike the block size, the restrictions attributes are constant).
* We might want to use blocks for the dma_restrictions structure as well in
the future...
* Fixed another bug in the device_node variant of DMAResource::Init(): the max
segment size was specified in blocks as well.
* Removed the "hardcode" block_io module and header.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26973 a95241bf-73f2-0310-859d-f6bbb57e9c96
heap_class object now. Removed unused heap_allocator::heap_class.
* Made heap_class, heap_create_allocator(), heap_memalign(), heap_free()
public, so that a specialized allocator can be used elsewhere in the
kernel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26965 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Fixed TraceEntryIterator::Current(): If fEntry was NULL, it would
return 0x4.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26955 a95241bf-73f2-0310-859d-f6bbb57e9c96
get_window_order() will retrieve the application respectively window order
on the selected workspace.
* Moved private BeOS compatible functions (as used by the Deskbar) into the
private WindowInfo.h header.
* Whitespace cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26951 a95241bf-73f2-0310-859d-f6bbb57e9c96
(fault address, pc, read/write) when a page fault occurs, and print them
in case this caused the termination of a debugger command.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26949 a95241bf-73f2-0310-859d-f6bbb57e9c96
about. ServerWindow::GetInfo() now fills in that value following this logic
as well as further testing.
* Whitespace cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26942 a95241bf-73f2-0310-859d-f6bbb57e9c96
* The global BPathMonitor looper is now always used, no more optional looper
and no more BApplication looper usage. This way we know how the looper behaves
and PathHandler::Quit() can be synchronous. In the end, the bug I was
observing was not caused by the previous asynchronous node monitor stopping,
but this should be safer anyways. When BPathMonitor::StopWatching() returns,
you have really stopped watching and not some time later.
* Introduced "FileEntry" which is an entry_ref plus node id. This is now used
instead of the node_ref for the "watched files set". The whole point
is to really be able to add the "path" field to the B_PATH_MONITOR message.
Previously, the initial path that was passed to StartWatching() was added,
regardless if the message was for an entry somewhere down the hierarchy when
watching recursively. The downside of the new method is that it uses a lot
more RAM per entry. Another option would be to store the node id of the parent
directory and iterate the directory always when in need to construct the path.
* Watching a folder recursively now really adds all the existing subfolders
as well as all the files if not watching for folders only. The tests for the
old implementation only tested what happens when the watched folder was newly
created and then subfolders were created. Those where already added by the
code. Now it also adds the subfolders of folder that appear in a watched
folder.
TODO: Remove folders and files recursively when they dissappear. More testing
for B_ENTRY_MOVED. Optimizations are possible when some information is
retrieved twice. I am also planning to add a way for the BPathMonitor user to
filter the automatically watched files/folders in B_WATCH_RECURSIVELY mode.
I grepped the entire Haiku tree for usage of BPathMonitor. Only net_server
and Mail were using it, but both in a way that is not affected by these
changes. Anyways, TextSearch works more reliable now, even for entries in
subfolders.
Feedback very welcome! :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26936 a95241bf-73f2-0310-859d-f6bbb57e9c96
build for others, namely those that also include <Debug.h>
* This fixes the remaining problems of building Pe under Haiku.
* Those files need a giant style cleanup... Fredrik, time to have a look at
our style guide :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26931 a95241bf-73f2-0310-859d-f6bbb57e9c96
specifying the protection of each page (4 bits per page).
* Added no-op implementation of posix_madvise().
* Replaced a few "addr_t size" parameters by "size_t size".
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26871 a95241bf-73f2-0310-859d-f6bbb57e9c96
then be used for receiving node monitoring messages.
* Reenabled using be_app as default BLooper if the API user does not provide
one. I think the problem that Stefano needed to work aroung in r23995 was
actually caused by the incorrect locking (an never unlocking) of the looper
before calling PathHandler::Quit().
->If I understand correctly, this code as supposed to work around the possible
situation that the looper holding those PathHandlers may have already quit,
leaving stale PathHandler pointers behind. But that case was not prevented
by the old code anyways, since one would have had to access freed memory to
even get the stale BLooper pointer. The real fix would be to store the
BLooper pointer with each PathHandler so that the possible gone-ness of
those loopers could be checked independent of accessing the PathHandler
pointer. (The whole problem is that PathHandler adds itself to the BLooper
and if the looper quits, it will free all its attached handlers.)
* Introduced a global fallback BLooper for the case that no BApplication is
running, which resolves a TODO.
All this is yet untested, but should have a good chance of working.
(Famous last words...)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26843 a95241bf-73f2-0310-859d-f6bbb57e9c96
dedicated functions.
* Introduced gMappedPagesCount variable which counts the total number of
physical pages that are mapped.
* Added vm_page_get_stats() which fills in the memory related part of
the system_info structure. Used and cached pages are computed
differently, now. The "available" (== not committed) memory is no
longer used for the computation as it doesn't say anything about the
actually used/free pages (with swap support enabled it is even
less meaningful, since we first commit swap space when possible).
We do also consider the memory used by the block cache as cached
pages, now. All in all these changes should fix the memory statistics
reported by get_system_info(), IOW bug #2574.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26837 a95241bf-73f2-0310-859d-f6bbb57e9c96
architecture: for now, we do this on the lowest layer only, therefore all
requests are handled synchronously (ie. in the scheduler's thread).
* Instead of using the block_io module, scsi_disk (and scsi_cd) are now
exporting a device on their own, and use an I/O scheduler with an appropriate
DMA resource.
* There are still lots of TODOs, and it can easily panic - don't update if
you intend to demo Haiku.
* scsi_periph now only has an io() function that get an io_operation, instead
of the previous read/write functions, moved preferred CCB size from those
functions into the device registration.
* Changed all scsi_periph files to C++.
* scsi_cd ported, too, but untested.
* Removed block_io from image - it will be removed completely soon.
* Temporarily commented an ASSERT() in the ATA bus manager (in case you use
it); it's sometimes triggered by the code now, and I haven't yet looked into
the issue -- doesn't seem to harm, at least.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26828 a95241bf-73f2-0310-859d-f6bbb57e9c96
include the guard pages. Adjusted the kernel and boot loader code
accordingly -- the guard pages size is added/not removed respectively.
The stack size passed to _kern_spawn_thread() is now the actually usable
size, and it is no longer possible to specify a size smaller than or
equal to the guard pages size.
* vm_create_anonymous_area(): Precommit two pages maximum -- a stack with
only one page usable size obviously doesn't need two pages.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26819 a95241bf-73f2-0310-859d-f6bbb57e9c96
* sync against the preview driver
* fixed totally broken multiple pages on single page preview
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26812 a95241bf-73f2-0310-859d-f6bbb57e9c96