Private semaphores will have a key of -1, but IPC_PRIVATE is 0,
meaning it is possible to wind up here and get a NULL semaphoreSet
if someone passes us an argument of -1.
Reported on Twitter.
* This is an initial implementation of the DVD streamer.
It needs various development to actually work, so can be
considered as a begin.
* Navigation is not implemented, this needs some work to
add hooks in the BMediaStreamer to allow mouse tracking.
* Stop/Reset/Set was commented out because it caused invalid context
states. This was because we cannot run those commands until after
we have configured the endpoint. Moving them to after that
makes it work properly.
* Add the endpoint to the context after configuring it, not before.
* After configuration, we need to issue either an EvaluateContext
or a ConfigureEndpoint, but not both, depending on whether
this is endpoint number 1 (Control) or not.
All cross-checked against FreeBSD (the last change in particular comes
directly from a change of theirs.)
Tested with usb_disk and usb_hid on already-working hardware, no
obvious regressions. Possibly helps with #13834, among other
initialization problems.
* Cap fSlotCount at the hardware level, not just at the software
level.
* Clear interrupts in init routine.
* Write high DMA address of DCBAAP.
Found by cross-comparing with DragonFlyBSD and OpenBSD.
* Fix potential leak of 'controlData' at line 701, which is allocated
at line 695. Pointed out by Clang Static Analyzer.
* Add NULL check to 'controlData'.
Change-Id: I96b0244d05d303b4c08ac8969f5ce5fc2e5012f9
Reviewed-on: https://review.haiku-os.org/c/1059
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
This didn't trigger any panics on my bare-metal dev install when tested,
but it might explain some easily-reproducible hardlocks (i.e. can't
even drop to KDL via emergency keys) I was seeing on other machines.
"are_interrupts_enabled()" is a "relatively" expensive function, so avoiding
it makes sense. This is the same way it's done elsewhere in sem.cpp, as well
as for mutexes and condition variables also.
* Additional return BAD_DATA after error conditions encountered
when attempting to decompress BTRFS extents.
* MemoryDeleter for extent_data added to ReadAt() preventing
double-free after error.
Change-Id: Ib9f8e9723d3fb6aaff8e69dbb66cd279e86f226b
Reviewed-on: https://review.haiku-os.org/c/1045
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
Nothing that uses this API at present needs a const iterator (and
as far as I could see, nothing ever called Remove() on the iterator.)
But this is now how HashMap's API works, so let's be consistent.
Changes are pretty straightforward. The iterator is now const
again, but can be passed to the hash table itself for removal
of the current item.
Change-Id: Ifd3c8096ffb187a183ca5963ed69a256562a524f
Reviewed-on: https://review.haiku-os.org/c/1042
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The HashMap and HashSet classes are copied from userlandfs. The
HashMap one works as-is as it's already used in userlandfs; the
HashSet does not even compile yet.
Change-Id: I1deabb54deb3f289e266794ce618948b60be58c0
Reviewed-on: https://review.haiku-os.org/c/1041
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The current volume-id is "bootimg", does not matter which version of
haiku nor to which architecture the ISO is targetting.
Having a "too generic" name as volume-id directly affects the ISO's
recognition by libosinfo.
From now on, let's use:
haiku-$(HAIKU_VERSION)-$(TARGET_ARCH)
Which would generate an ISO with volume-id as:
Volume id: haiku-default-r1~beta1-x86_64
Fixes: #14695
Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
Change-Id: I25e2f5338403058a363872abd196d698764cc3c1
Reviewed-on: https://review.haiku-os.org/c/1034
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This reverts commit 279470d553.
Reason for revert: Commited in wrong order.
Change-Id: I1163b12728f19aee4506c95512d0afdea0433362
Reviewed-on: https://review.haiku-os.org/c/1046
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
* Test the correct allocation before returning no memory
Change-Id: Id4422dab2e99487e015e1d915bfba5c18d1b8030
Reviewed-on: https://review.haiku-os.org/c/1044
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>