* Adds some missing methods signatures.
* integer vs float framerate is a longstanging debate. In theory,
in digital a/v there should not be need for floating point framerates.
This is because unless the software is run on exoteric hardware, there
is not need for it. Unfortunately, some legacy from the past like the
29.7 hz debate (NTSC) still may need to work under floating point framerates.
Even if in pratice it'd be run at 30 hz anyway.
* In theory, to handle all those correctly we should use a rational framerate,
however most code should be rewritten to support that correctly, and
it'd add some excessive complexities.
* All integer types are reverted back to unsigned ones. There's really
no reason to use signed integers there, and more importantly the danger
for integer underflows and the attached security concerns is very big.
There was no synchronization of the check of the done flag and the
waiting thread suspending to wait for it. It was therefore possible that
the new team both set the flag and triggered the wakeup of the waiting
thread in that time window, causing it to miss both the set flag and the
thread resumption.
Use a condition variable instead.
Fixes#13081.
Change-Id: I93c45db8dd773fe42b45c4b67153bcd39e200d3b
Reviewed-on: https://review.haiku-os.org/803
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This allows heap implementations to initialize and clean up any thread
specific structures. The current default hoard heap does not use these.
Note that the thread exit hook will not be called for the main thread as
the heap may be needed during process termination (__cxa_finalize for
example).
Change-Id: I703fbd34dec0d9029d619a2125c5b19d8c1933aa
Reviewed-on: https://review.haiku-os.org/799
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Fixes#2832
For details, please check the comments to ticket #2832.
In short: while not needed normally, it'd be nice to be able to edit
the subject attribute, for example when the sender accidentally forgot
to enter a subject or made an especially awkward typo that would spoil
querying for it.
Also: sentence casing the attribute name to "Reply to".
Change-Id: I41e0ebade25d550d0cb260c0dfebd4b9c1c8b34c
Reviewed-on: https://review.haiku-os.org/793
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Remove unneed if condition, since 'error' is initialized to B_OK.
Change-Id: I2fd0edb99a3d055beafaf15f1140071a31140892
Reviewed-on: https://review.haiku-os.org/798
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>
Remove unneed if conditions, since unsigned type value is never < 0.
Change-Id: I76621f79883752cd3560c6e02f18384b1ddd9cf3
Reviewed-on: https://review.haiku-os.org/797
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>
FreeBSD 12 has no major changes to the ifnet KPIs that constitute a
source compatibility break, save a single one related to locking
which doesn't really apply to us, and so we don't need to create
a "freebsd12_network" directory to work through the upgrades.
Fixes#4022.
When a user keymap was deleted in Tracker while the Keympas prefs
are open, the map is still visible in the list of user maps. It
just doesn't react on a click.
With this change, we just silently remove the item from the user map
list when it's clicked. Not totally nice (should I add a BAlert?),
but the suggested node monitoring for this seldomly encountered
situation is overkill, I think.
Change-Id: I5ea6dd2aa117f30a7be348a005a10f3757d52459
Reviewed-on: https://review.haiku-os.org/794
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Since we use sentence-cased menus, there is probably only one capital
letter in the line, so looking for only capitals won't be very useful.
Instead, accept any ASCII character (< 255) which is alphanumeric,
as these are more likely to be command-able in any given keymap.
(IsAlNum returns true for accented Latin characters also, which may
be un-command-able if they require dead keys to type.)
It is not allowed to use isspace, tolower, etc, on character outside of
the char type range (and EOF). Use BUnicodeChar instead to avoid out of
bound accesses.
Fixes the second crash in #14753.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Some changes by me to make "index" a byte instead of character index
as it needs to be.
This replaces the old Haiku-native driver that was removed in the last commit.
It should support all the same chips that one did, in addition to the SiS 7014,
and the DP83815 also.
I don't have this hardware, so for anyone who does, please test.
Fixes#1657.
The MoveTo() call is not restricted in any way; it can easily move the
window's titlebar offscreen, which is very confusing for users as if
they don't remember the window manipulation keyboard shortcuts,
dealing with such windows is often very tricky (or impossible
if the window is actually larger than the screen.)
Now we also call MoveOnScreen with DO_NOT_RESIZE and
MOVE_IF_PARTIALLY_OFFSCREEN set, which will simply get the size of
the decorator bar and then ensure it is entirely on-screen.
Fixes#11763.
Fix comparison between pointer and zero character constant.
Pointed out by gcc7.
See also: 3d4c1b73b9
Change-Id: I917ceefce69e269fbaa12a3ae60f0702f5c5d4a7
Reviewed-on: https://review.haiku-os.org/782
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Fix there are two 'if' statements with identical conditional expressions.
Change-Id: I3396d4e34b70dd293957a892cd603033d6664699
Reviewed-on: https://review.haiku-os.org/789
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
* Previously, the assumption was that your settings would configure
all devices.
* Now, all devices that are not covered by the "interfaces" settings
file will be automatically configured.
* This fixes ticket #6423.
Change-Id: Ib1e0c70314dc27cde14a00601fc8045d32937dfd
Reviewed-on: https://review.haiku-os.org/787
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
Remove unneed menset(), since media_format already use memset()
in its constructor.
Also fixes -Werror=class-memaccess pointed out by gcc8.
Change-Id: I3283417323550492799a34a2d29cdad03a82a2d5
Reviewed-on: https://review.haiku-os.org/783
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This reverts commit def61273ed.
This isn't a fix for the issue, it will just throw away all settings.
Change-Id: I2979c02c54f9379f25dc5d41d3a6085c09e87ac3
Reviewed-on: https://review.haiku-os.org/785
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Increase size of text[], since snprintf() write to it max 66 bytes.
(sizeof(positionText)-1 + sizeof(" / ") + sizeof(durationText)-1 + 1 = 66)
Pointed out by gcc8.
Change-Id: Ic6ce221edb4ceff4b63c7b30d26c52d613cbb35e
Reviewed-on: https://review.haiku-os.org/779
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
In the "Queries" menu, add three items at the top to start a query
for the same recipient/sender/subject as the current email. Move the
separator and "Edit queries..." item to the bottom of the menu.
The temporarily created queries are put into B_USER_CACHE_DIRECTORY/Mail/.
The data in those queries might be private, therefore not in system /tmp.
The queries use the DefaultQueryTemplates for x-email, if that exists. This
is done by copying all the template's attributes. Code for that borrowed from
'copyattr'.
When creating a query for the same subject, use the MAIL:thread text for
the search, as that doesn't contain stuff like "Re: Re: Fwd: Re...". Do
the query for MAIL:subject though, because sent emails don't have a
MAIL:thread attribute.
Change-Id: I23b46f3ec07760d17b076d8b8aa8839c5f88963f
Reviewed-on: https://review.haiku-os.org/768
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Previously we didn't need to care about threading in here, as it
was used only up to the point where the application's _start was called
and then libroot's heap would take over. But with the introduction of TLS
support by pdziepak in 2014, we also handle TLS bookkeeping inside
runtime_loader, and so this heap needs to be thread-safe.
Properly fixes the JVM crashes korli was attempting to fix in hrev52658,
and fixes#13154, #14129, #14304, #14342 for real.
This reverts commit d0111efead.
Initially, I, too thought this was the correct solution. In
investigating the related #14342, I found that adding a lock of
the mutex in the function that crashed most often in (DestroyAll())
increased the time it took to cause a crash from 1-2 seconds
to 10-15 seconds, but it still inevitably crashed.
Further, crash addresses were often very low (e.g. 0x1, 0x18); on
inspection I determined these were coming from the fPointer fields
of TLSBlocks. But accesses to TLSBlocks were now well protected
by the TLS mutex, and they were memset'd after allocation, so that
didn't make any sense.
At that point, I went back and read over the code until I understood
it, and it became clear this solution was incorrect: TLSBlocks and
their underlying data are always associated with a specific thread,
meaning _Resize() and DestroyAll() would never be called on the same
data from different threads, despite appearances to the contrary.
Thus despite a dearth of comments in this file, it seems pdziepak
knew what he was doing when he wrote this; no locking is needed.
That left only one place to cause this kind of memory corruption...