It seems GCC2 occasionally will inline a call to memcpy with
a count of 0, which this function did not previously expect
and would result in a "Divide Error Exception."
Hopefully fixes#14613.
* Initialize "status" to B_NO_INIT, which will skip the main 'if'
the first go-around and go straight to the acquire_sem_etc(),
as we will have be invoked from the callout initializer, and so
there will of course be no callouts.
* Actually check the return code of mutex_lock, and do another loop
iteration (which skips this main 'if' as status will not be one
of those things.)
* Correct failure deinitialization order in init_callout().
* Destroy the mutex after the worker thread exits (this is the real fix.)
Fixes#14660, and other "hang on cursor" / "hang on black screen" /
or possibly even a "hang on rocket" introduced in yesterday's builds.
DeleteChains() needs the chain locks and domains, so those need to
be uninitialized after them. This now matches the constructor's
deinitialization order.
Fixes a panic exposed by the previous commit.
Previously, there were a number of circumstances where these were
not getting reset properly, leading to some destroyed mutexes having
holders of the last thread which locked them, and some with "-1",
which meant that the next call to "mutex_lock" just behaved as if
the lock was still valid (!), and so the unlucky caller would deadlock
forever.
Now we properly reset these fields, which means from now on attempts to
lock or unlock destroyed mutexes will lead to "PANIC: uninitialized mutex"
on KDEBUG kernels, and (as before) an infinite deadlock on non-KDEBUG
kernels (perhaps we should store the thread_id of the locker on non-KDEBUG
kernels also?).
As the next commits will show, this already uncovered a number of bugs,
and there are of course potentially more strange deadlocks caused by this.
* We're making the assumption about EFI here, but it's
fine since those defines will just go unused on non-efi builds.
* Jam segfaults when we get two for's, a case, and an if deep.
(adding an x86_64 check to efi section just below)
Change-Id: Id98e87b6570ddc7d9c2195cd05b0526e71771675
Added subsystem_vendor_id and subsystem_id for iMac 24 inch early 2008 (iMac 8,1) and Macbook Pro 3,1 with specific quirks for those systems. This enables sound via head phone out at a decent level and quality. Previously, sound with the Haiku HDA driver was distorted and very low
Change-Id: I8e3dc3dbf5324bafff2b35ae64b43a0088272c8d
Reviewed-on: https://review.haiku-os.org/647
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Use delete[] instead of delete, since memory is allocated by new[]
at line 139.
Pointed out by clang.
Change-Id: I70396283b8d2c01d52886f7543804998d891ea44
Reviewed-on: https://review.haiku-os.org/646
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Some packages have excessively long copyright labels that were forcing
the HaikuDepot window to become too wide. So in this case, put the full
copyright string in the tooltip, and only the first 45 characters in
the label.
As discussed in #14598, there are now two tabs instead of the
checkbox: "Featured packages" and "All packages". It otherwise
behaves as before.
Also fixes#12428.
Currently using the LEGACY_TX path as the newer one requires mtx_trylock()
and "curcpu", which I haven't implemented yet.
Completely untested as I don't have this hardware.
* init_hardware is unnecessary and mostly a duplicate of init_driver;
so just remove it in favor of that.
* Deduplify some of the _DRIVER macros as possible
* Don't include net_stack.h, we don't need it here; and fix
callout.h following that.
Technically the profile is supposed to be sourced, but it seems that
some scenarios / applications do not do this and instead run it.
Before the recent changes to PS1, it was also exported, and now
it is again. Should fix entering HaikuPorter chroots under the new profile.
Also renamed "ARCH" to "_ARCH" to better accomodate those
who are sourcing this file, in case they want to pass a variable
named ARCH through.
* Fixed colour localization on test page
* Changed JobListView to use plural placeholders
* Changed PrintersWindow to use placeholders
Change-Id: I39477351364a0182cf629476de767af18f9c0d61
Reviewed-on: https://review.haiku-os.org/524
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This addresses some of what's reported in ticket #14637.
* Keymap preferences: Localize key labels. Translators have
to be careful not too use too long words here...
* Media preferences: Fix typo "SoundFonts" -> "SoundFont"
The two popup menus, Video input/output, both use "<none>",
which when the catkeys are collected is reduced to one item.
Apparently, Italian likes to have different tranlsations for
them. I hope to fix that by using B_TRANSLATE_COMMENT with
differing comments. Not sure if that'll work...
* Network preferences: Localize "on/off" and "Enable/Disable"
in the Services.
* Repositories preferences:
Add RepoRow.cpp to DoCatalogs.
* Shortcuts preferences: Localize "Left/Right/Both/Either/None"
* Bluetooth replicant: Localize menu items and alerts.
* DeskCalc: Localize button names.
* HaikuDepot:
- Use BStringFormat and variables to replace for the WorkStatusView.
- Put package name in single quotes; nicer if you have package names
with spaces.
- Avoid leading and trailing spaces in translatable strings. Those
can be overlooked b the translator.
- Use B_UTF8_ELLIPSIS instead of "...".
Change-Id: Ia32908f9faad5188aa87c918c31229277decbda9
Reviewed-on: https://review.haiku-os.org/631
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Since index's type is uint8 (range 0-255) and kTermColorCount set to 256
(declared in terminal/Colors.h at line 31), 'index < kTermColorCount' is
always true.
Pointed out by clang.
Change-Id: I49e45cbd8a55223177fd2d6a64a0e37cf6341fc7
Reviewed-on: https://review.haiku-os.org/637
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>