Due to introduction of user-defined suffixes C++11 requires that there
is a space between literal and identifier to avoid ambiguity.
This patch makes the whole kernel build successfully with C++11.
This patch makes it possible to inline rdmsr and wrmsr instruction. The
performance impact shouldn't be significant since they are used relatively
rarely and wrmsr is usually a serializing instruction, but there is no reason
not to do so.
The goal of this patch is to amortize the cost of context switch by making
the compiler aware that context switch clobbers all registers. Because all
register need to be saved anyway there is no additional cost of using
callee saved register in the function that does the context switch.
Similarly to previous patch regarding GDT this is mostly a rewrite of
IDT handling code from C to C++. Thanks to constexpr IDT is now entirely
generated at compile-time.
Virtually no functional change, just rewriting the code from
"C in *.cpp files" to C++. Use of constexpr may be advantageous but
that code is not performance critical anyway.
CommitTransactionHandler: Since the VolumeState is now always copied
(including the contained packages), we can't just use the passed in
packagesAlready{Added,Removed} sets, since they refer to the original
packages.
While resolving TLS related relocations it is necessary to know the DSO
that defines the symbol. Without proper support in caching that information
is available only when the symbol is resolved first time. That works well
for TLS since TLS_DTPMOD is guaranteed to be before TLS_DTPOFF relocation.
This patch makes the newly introduced parts of the interface work in a
general case.
Previously TLS_DTPMOD relocation blindly returned ID of the current DSO.
This patch does proper symbol lookup if there is a symbol assigned to the
relocation and uses ID of the DSO in which the symbol is defined.
This patch introduces support of ELF based TLS handling with lazy allocation
and initalization of TLS block for each DSO and thread. The implementation
generally follows the official ABI except that generation counter in dtv
is in fact a pointer to Generation object that contains both generation
counter and size of the dtv. That simplified the implementation a bit, but
could be changed later. The ABI requirements regariding in memory position
of TLS block is not honoured what results in static TLS model being
unsupported. However, that should not be a problem as long as
"executables" in Haiku are in fact shared objects and optimizations which
require specific TLS block in memory layout are not possible anyway.
With some testing, found that even with the second patch
provided in #10792, the behaviour is still inconsistent, so
reverting for now.
This reverts commit 273109e004.
* Linux is the only one of our supported build hosts to not have
mergesort. Provide an implementation that calls qsort, since the qsort
implementation in the glibc used by Linux uses a mergesort (!) for small
arrays.
* Use merge sort, which is a stable sort, instead of the qsort used in
BList::SortItems
* This allows setting two stops with the same offset to create a sharp
color change in a gradient. This trick is used to create stripe patterns
with css gradients in some web pages.
Fixes#10733.
When a system package is going to be deactivated, activate/deactivate
the packages of the whole transaction only to the latest state.
Afterward latest state and active state will differ.
* VolumeState: Move locking to Volume.
* Package: Pull the file related functionality into new class
PackageFile. A Package refers to a PackageFile. A PackageFile can be
referenced by multiple Packages. PackageFiles are managed by the new
PackageFileManager.
* CommitTransactionHandler: Clone the passed volume state.
* Volume now manages two VolumeStates: A state reflecting the currently
active packages and the latest state (i.e. the one reflecting the
situation of the packages directory). Usually the two are the same,
unless an old state has been booted.
* The client interface hasn't been adjusted yet. Clients only see the
latest state.
* If --no-downloads has been given, Haiku will be built without
trying to download anything, all required packages need to be put
into the download folder manually (the build will stop on missing
packages).
* As the required HaikuPorts repository can't be downloaded in this
mode, a local repository is created during the build, which only
contains the packages available in the downloads folder.
This is useful for building Haiku completely from source.
* The content of the preprocessed package-info files and the package
contents depend on the build type, so we use a different folder for
each build type.
* Nothing ever reads fTargetName in the scrollbar code, so remove the
field.
* Frees one reserved slot, and a little memory, as the target name was
copied with strdup.
* This is enabled by shift+click on the Original Size toolbar button.
* The button stays pressed as long as the feature is enabled. Clicking
it again disables it.
* When this is enabled, all images will be shown at original size,
instead of being scaled up or down to fit the window.
* This is not persistent, and only affects the current session/window.
* BIconButton is not needed anymore, now that BButton supports icons.
* Slight look changes. These buttons are a bit bigger, with extra
whitespace. I compensated this by reducing the insets and spacing, which
looks the same when no button is hovered, but a bit different when one
is, as the button frame is bigger. Maybe we need to tweak BButton to
have smaller margins like BIconButton did.
* Don't intercept Enter key press in a window when there is default
button and another BControl focused.
* Current behavior was basically breaking every window using default
button. Even if there was a button focused (using Tab key), when Enter
was hit, default button handled the message, therefore instead of
i.e. 'Revert' 'Apply' was pressed.
* Fixes#10792.
Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
* Fix the condition so that big images are fitted to the window on first
time only if the option is set.
* Small images are never stretched to the window size, as this isn't
very useful.
The interaction of this global setting with the zoom buttons is a bit
confusing. Should they be merged?
A value node might not have a location due to e.g. issues resolving its parent.
Guard against this case and simply return early as we won't be able to take any
meaningful actions on such a node. Fixes the second crash listed in #10781.
Default is shown, a menu option in the View menu allows you to show
or hide the bar.
Also move the bookmark bar below the tab frame, it looks better
here I think and matches other browsers (e.g. Firefox.)
* This is a BMenuBar with IconMenuItems.
* Uses node monitoring to live-update the bar as bookmarks are modified.
* Bookmark folders are BNavMenus and can be browsed.
* This needs some improvements, for example handling more bookmarks than
the window width allows us to show (with an extra menu like for tabs?)
Fixes#10232.
As suggested by stippi, we can use system_time and the CurrentMessage
when field to determine the relative time of the actual mouse clicks,
rather than the time of message delivery.
* Simple, incomplete JSON string-builder.
* Not yet using the new bulk information method of the web-app.
* Not yet parsing the reply and doing anything with it, consequently
commented out.
* What works is generating a JSON command and receiving the reply.
* This may be fine in media server where it lands in logs, but certainly
not when the code is run in applications.
* Helps with all media-related webkit tests.
* MHTML: give a higher priority than HTML to improve detection results,
as MHTL is likely to contain HTML in the first chunk.
* HTML: scan the first 512 bytes to increase likeliness of finding a tag
* XHTML: don't try to identify on the dectype, this is not reliable and
missing from some documents. Recognize "<html xmlns" and the utf-16
equivalent, as well as part of the DTD tag.
The menu was closed, but immediately reopened by the click on the
button. If the time since the menu closing is shorter than a
double-click delay, don't open the menu again.
Fixes#9538.
* Setting the important/failure color on the whole view looked ugly.
* Important notifications use B_CONTROL_HIGHLIGHT_COLOR, instead of
white.
* We may want to select better success and failure colors. Pure red and
green don't look very good. Suggestions welcome.
* They crash app_server if you try to use them, which is not a good idea.
* we could clamp them to 0/255, but reporting the error to the user
seems better.
* Instead of forcing the hash-table to use a copy of the key,
introduce and use TypeOperation template to avoid taking a
reference of a reference type (which gcc2 doesn't allow).
* Fixes missing atomic stuff that gcc requires
* The gcc build still fails further down, because of a mixup of
VFP/nonVFP objects (at least for beagle build).
* This is built for the host system, so we can't use B_PRIdOFF.
* Until POSIX introduces a format constant for off_t, cast the variable
to long long to avoid a warning.
The scheduler expects that all threads expect the initial idle threads
have priority in range [THREAD_MIN_SET_PRIORITY, THREAD_MAX_SET_PRIORITY].
If the requested pririty is out of range the value is clamped. Failing
with B_BAD_VALUE is probably an overkill since there isn't any real
change in the guarantees provided by the scheduler about the behavior
of such thread. Also, BeBook suggests that spawn_thread() can specify
priority 0.
* PackageFSVolumeInfo: Add the directories for all relevant states.
* PackageFSPackageInfo: Include the package file's parent directory node
ref.
Package daemon and package kit still don't support old states yet.
If an old state is specified via mount parameters we load the packages
as specified in its activated-packages file.
The interface for the package daemon, the package daemon itself, and
the package kit are still to be adjusted, so ATM some PM components
might be a bit confused when an old state was booted.
For potential boot volumes with older packages states the respective
item in the boot volume menu now has a sub menu for selecting a state.
The boot loader functionality for this feature is complete -- i.e. the
respective kernel is loaded and the name of the old state is added to
the kernel args -- but kernel packagefs and package daemon support is
still missing.
Some tests in WebKit have no <html> and no <head>...
* Allow "<style", "<script", and "<a href" to identify HTML
* Scan up to 256 characters instead of 64
* Also remove the rule identifying "<!--", because this really isn't html
specific.
* qrspec.h isn't yet part of the package for some reason.
* removed qrencode from the bootstrap package.
* only include qrencode when the qrencode package is found.
* didn't check qrencode itself, tests welcome.
* The DataReceived hook gets a position argument, making it possible for
listeners to handle out-of-order data (from two range requests at
different positions, for example)
* Adjust HaikuDepot (only user of the API in our sources)
* Add a copy constructor to HTTPRequest that copies the relevant
parameters from an existing request. Makes it easy to repeat a request
with a different range. Could be useful for restarting downloads, or
paralellizing them.
* Add SetRangeStart, SetRangeEnd calls to HTTPRequest, no implementation
yet. I'm putting all the API changes in this commit as it needs to be
synced with a matching haikuwebkit release.
* All archs must update to HaikuWebkit 1.3.0. Previous versions are
broken by this.
These were acceptable in media kit log, but are only annoying now that
the AddOnManager is ran in applications. Moreover, these get to stdout
and make some WebKit tests fail.
... in filenames. Replace the existing Unicode conversion functions
with UTF conversion functions from js that he relicensed MIT for us.
Put the UTF conversion functions in a private but shared code location
so that they can be accessed throughout the kernel.
Right now we only provide functions to convert between UTF-8 and UTF-16.
At some point we should also add functions to convert between UTF-8 and
UTF-32 and UTF-16 and UTF-32 but these aren't needed by exfat.
Remove the old Unicode conversion functions from exfat as they assumed
UCS-2 characters and don't work with UTF-16 used by exfat.
Rename most variables with the term length with code unit where code units
are intended. The term length, when used, means length in bytes while code
units represent either a full 2-byte UTF-16 character or half a 4-byte
surrogate pair.
Add becomes +, Remove becomes −, the current button labels "Add" and "Remove"
are used as tool tips. Relayout the controls so that they fit nicely with the
buttons:
The add button is placed left of the server text control showing that it
adds new server names while the remove button is placed next to the list
view showing that it removes server names from the list.
The reset button is placed next to the "Synchronize" button at the bottom of
the tab group and is renamed "Reset to default server list".
This makes the window a bit taller.
* WebKit testsuite relies on the MIME types being correct, so when the
file doesn't have one, try to identify it.
* May be useful for other apps using FileRequest, anyway.
* WebPositive testsuite relies on the mimetype to parse xhtml files.
* This has a higher priority than HTML, because it is more reliably
detectable
* Uses the same icon as html and mhtml. Who wants to draw new ones?
This patch remove the old thread migration logic which used few special
cases and (broken) general check that attempted to balance threads.
The new logic is pretty straightforward and seems perform well without
any additional special cases. Current core is compared with the least loaded
one and the thread is migrated if that would result in estimated loads of
both cores (i.e. the current one and the least loaded one) to become closer
to the average load (i.e. average of that two cores).
Currently, ThreadData::ShouldRebalance() (and mode specific functions
it calls) only decides whether to migrate thread to another core or not.
However, in most cases it actually needs to find the best candidate for
new core so it could as well return that information.
Create and use BLayoutUtils::AlignOnRect() to position the button label
in BControlLook::DrawLabel().
AlignOnRect(), unlike AlignInFrame(), provides the possibility to return
a rectangle with dimensions greater than the available size.
Add some comments above the methods in LayoutUtils that indicate such.
Also update copyright headers in LayoutUtils and ControlLook
* Uses the same icon as HTML. Anyone wants to design something better?
* Also add support to Web+ (not actually supported yet, but the next
version will).
These files are useful as self-contained documents (application
offline documentation), and for saving web pages in a single file.