Commit Graph

50671 Commits

Author SHA1 Message Date
John Scipione 47852bff02 IK documentation update
* Add \since directive to each method.
* Add documentation for BScrollBar and BScrollView classes.
* Title Case group titles.
* Some other minor documentation updates.
2014-06-13 17:44:22 -04:00
John Scipione 1f424632be Style fixes to IK, focus on docs 2014-06-13 17:27:01 -04:00
PulkoMandy 4a2260f21a Let the bootloader know about ARMv7.
When an ARMv7 CPU is detected, immediately turn on the FPU. This allows
us to use vsnprintf in the TRACE call in that function, as our libc is
compiled with floating point support and will trigger a fault if the FPU
is not available.

This lets the boot go further, and crash in mmu_init. Next steps:
* Find why mmu_init is crashing
* Setup some fault handlers, otherwise we call uboot ones, and they are
not very helpful. They will also probably not work once the mmu is
enabledvery helpful. They will also probably not work once the mmu is
enabledvery helpful. They will also probably not work once the mmu is
enabled...
2014-06-13 22:15:54 +02:00
PulkoMandy afe56d3ab3 Load uImage higher so it doesn't overwrite itself
Loading of haiku_loader from an uImage is a 2-step process:

* First, the uImage is loaded (in our case from SD card using fatload)
to RAM at a temporary address.
* Then (using bootm), it is unpacked. The uImage is a container format
and can hold several files, with a load and execution address. The files
are copied from the uImage to their final location, and it's better if
that doesn't overlap with the uImage content

When this loading is done, bootm jumps to the entry point found in the
uImage.

We now actually execute our code from haiku_loader. This crashes with
the following call stack:
* vsnprintf
* dprintf
* boot_arch_cpu_init
* cpu_init

It seems vsnprintf is trying to use VFP instructions (probably from the
libgcc) but that triggers some kind of fault, and the handler (setup by
uboot?) ends up crashing the system by jumping to unmapped memory at 0.
2014-06-13 20:26:51 +02:00
PulkoMandy 0c66734e4d Add a small helper script to configure gdb
This is useful for debugging the ARM port with qemu gdb stub.
2014-06-13 20:26:50 +02:00
John Scipione 2a6a3109e5 shortcut_catcher: tiny style fix 2014-06-13 12:52:49 -04:00
PulkoMandy 3d6edc43d9 Patch by dnivra (GSoC 2014, ARM suppport)
* Cleanup the SD card image building to allow jam -q @bootstrap-mmc to
work.

There are a few remaining tricks before you can safely build an image:
* This uses a non-POSIX du option, and is only tested with Linux du
only (Linux is the only supported system to run bootstrap builds,
anyway)
* The Python recipe in haikuports.cross is known to not build on
Debian/Ubuntu, but work fine on OpenSuse. There is a patch available in
haikuports bugtracker to allow the reverse.
* You need to populate the haikuports repo package list with some
packages (which don't exist yet) to make the build system happy. But our
git hook to generate the repositories is preventnig me to share this
hack.

Once built, the image currently crashes early in the kernel execution.
On to debug that!
2014-06-13 17:22:48 +02:00
Jérôme Duval b64f1a9768 tiff: drop sources and headers from the source tree
* also drop jpeg and png headers
2014-06-13 15:52:11 +02:00
John Scipione f1e2e389be shortcut_catcher: rename a couple variables
Fix build, msg => message

Fix warning use int32, not uint32

Also do a bit of refactoring.
2014-06-13 00:25:09 -04:00
John Scipione 78daf289c3 shortcut_catcher: A few 80 char limit fixes 2014-06-13 00:17:13 -04:00
Jessica Hamilton d2da54dee2 Shortcuts: use BPathFinder instead of find_directory. Fixes #9958.
* Previously, BPath::Append() would return an empty path if the
  path didn't exist (and an error); in a nightly image, the
  B_USER_ADDONS_DIRECTORY didn't exist, triggering the bug.
* Replaced the code with calls to BPathFinder instead, which takes
  care of the empty path automatically.
2014-06-13 15:46:37 +12:00
John Scipione abca6dabb6 Revert "shortcut_catcher: Fix KeyCommandMap::_DeleteHKSList()"
This reverts commit cb3243fbbd.

Sorry, this might do bad things.
2014-06-12 19:36:56 -04:00
John Scipione 1ecf19b82f shortcut_catcher: style overhaul 2014-06-12 19:25:03 -04:00
John Scipione cb3243fbbd shortcut_catcher: Fix KeyCommandMap::_DeleteHKSList()
You can't increment the list item counter as you delete because the count
decreases as you go. Instead delete the first item until there are no more
items, then delete the list.
2014-06-12 18:45:36 -04:00
John Scipione 2776568d27 Fix BHandler::GetSupportedSuites()
The logic was reversed accidentally in hrev47355

Rewrite the method to make more sense. If data is NULL return
B_BAD_VALUE right away. Otherwise set the status based on the first
operation, if that succeeds perform a second one, and return the
result.

Fixes CID 1222666
2014-06-12 13:57:05 -04:00
John Scipione edc845a323 Update Locale Kit docs.
Add \since to each method. This was pretty easy to figure out since
the whole kit exists only in Haiku.
2014-06-11 16:48:17 -04:00
John Scipione 219bf21ef6 Style fixes to Locale Kit, focus on docs. 2014-06-11 16:48:02 -04:00
John Scipione dd3b190b55 Update Game Kit docs.
Add \since to each method.
2014-06-11 16:45:07 -04:00
John Scipione 37fedaf849 Style fixes to the Game Kit, focus on docs 2014-06-11 16:44:48 -04:00
John Scipione ac9714d8a4 Update App Kit Documentation.
The biggest change is the addition of \since to each method. I've gone
through old versions of the BeBook and documented what version of BeOS
each method was introduced in. I'm only counting production releases
so I'm starting with BeOS R3 ignoring all DR and PR releases. Likewise,
all methods new to Haiku are listed as being introduced \since Haiku R1
ignoring alpha releases.
2014-06-11 16:25:57 -04:00
John Scipione 1c52b28f3e Add styling for \since command 2014-06-11 16:25:32 -04:00
John Scipione be902ac4db App Kit: style changes.
No functional change intended.

Focused on documented classes only.

* Update copyright information.
* whitespace fixes.
* pointer style
* Rename some variables, msg => message, form => what
* Need consistent variable names to make documentation easier,
  allows us to use \copydoc or \copydetails instead of repeating
  ourselves over and over again.
2014-06-11 16:24:02 -04:00
Adrien Destugues 151ef32f45 Fix more of the cookie test following API changes. 2014-06-11 21:59:04 +02:00
Adrien Destugues 6765a83b15 Fix cookie tests for API changes. 2014-06-11 19:27:33 +02:00
Adrien Destugues def1a05788 Made the wrong constructor private. 2014-06-11 19:27:03 +02:00
Adrien Destugues bec7cb1006 Also move the build version of BReferenceable.
* Should fix the build, but results in an internal compiler error here
(with a gcc2 haiku host). Let's see what the buildbots think...
2014-06-11 17:53:41 +02:00
Adrien Destugues b92e7f1512 Make BReferenceable public.
* The Network Kit now makes use of it for BUrlContext, so we need this
in the public headers.
* Problem caught by the new build bot by compiling the unit tests.
2014-06-11 17:08:05 +02:00
Adrien Destugues 895fa41e0b Make handling of Http Authentication thread safe
* Each BHttpAuthentication object is locked on all field accesses,
* They are owned by the BUrlContext and never deleted, so there is no
need for reference-counting them,
* The BUrlContext itself is now reference counted, and all BUrlRequests
hold a reference to it.

This makes sure using the BHttpAuthentication objects from requests is
thread-safe.
2014-06-11 14:11:01 +02:00
Adrien Destugues 463ffbfde4 First steps towards cookie jar thread-safety
* Change the semantics of the iterators copy constructor and assignment
operator: they now return a new iterator for the same cookie jar (and
same url for the UrlIterator). They don't try to point to the same
position as the copied iterator. The only purpose of these is to write
code such as:

Iterator it = jar.GetIterator();

so having a full copy isn't that useful.

* The per-domain cookie lists are now protected with a read-write lock.
The iterators retain a read lock while they are handling cookies from
that list. They get a write lock when doing Remove. Adding a cookie to
the jar also gets the write lock for the matching list

* Fix a memory leak when adding a new domain-list to the jar failed

* Simplify the declaration of the PrivateHashMap type (it would be
even simpler if HashMap was a public API)

* The domain hashmap is now a SynchronizedHashMap. It is locked as long
as an Iterator or UrlIterator exists, which may be a problem as these
are public APIs. Writing safe iterators for an hashmap with concurrent
accesses is not easy, so the API could be modified to return a list of
domains and a list of cookies for a given domain or URL instead. This
would suit the intended uses just as well.

* The jar now store const cookies, so there is no need to lock them for
access/modification. Updating a cookie is done by replacing it with
another one in the jar (with the same domain and value). There is still
the problem of deleting a cookie while other threads may still access
it, this will be fixed by making cookies BReferenceable.
2014-06-11 12:59:33 +02:00
Oliver Tappe 9aec6561a8 More build fixes of unittests, this time for x86_64. 2014-06-11 12:44:39 +02:00
Oliver Tappe 77aa0e2a5e Fix build of unit-tests with gcc4. 2014-06-11 11:43:12 +02:00
Oliver Tappe bab4c96c5c Fix build problems of makeudfimage with gcc4.
* _ALLOCATOR_H clashes with a std-include provided by gcc.
* add using declaration for std::list.
2014-06-11 11:42:41 +02:00
Oliver Tappe 006637a9b6 Revert "Increase HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET for debug builds."
* That change did not make any sense, as the floppy-boot images
  can't be built in debug mode anyway (the result is much too large).

This reverts commit 911821275a.
2014-06-11 09:43:42 +02:00
Axel Dörfler bc4db40c40 AHCI: use a minimum of 1 block for trim ranges.
* Word 105 of ATA IDENTIFY should contain the maximum number of block
  ranges the device supports, but it always supports at least a single
  one.
* This change lets the trim command do something on Virtual Box.
2014-06-11 00:56:09 +02:00
Fredrik Holmqvist c57c62505e It's -fno-pic not -no-fpic. 2014-06-10 23:09:04 +02:00
Fredrik Holmqvist ded5af13dc Fix spelling error. 2014-06-10 23:09:03 +02:00
Adrien Destugues 0256e7a458 Disable the MIME type test.
* This tests requires some private APIs which have been changed, it
needs to be rewritten.
* I'm also not sure if it's still possible to work on a copy of the MIME
* database to avoid messing with the system one.
2014-06-10 10:10:30 +02:00
Adrien Destugues 182a5f8e53 Disable test for TranslatorResoter::Version
* The method was made private and deprecated, so there is no way to
compile code calling it directly.
2014-06-10 10:09:13 +02:00
Adrien Destugues 64e8975369 ResourcesTest: fix build.
* There are several SetTo methods, specify the one we want to test.
2014-06-10 10:08:34 +02:00
John Scipione 888f72ca9a Tracker: close Desktop window on switch to spatial mode
If you have the Desktop window open when you switch to spatial
mode this will now close the window. You aren't allowed to have
the Desktop open in 2 places symultaneously in spatial mode.
2014-06-10 00:59:50 -04:00
John Scipione 646b1fe1e8 Tracker: Open Desktop folder in own window in browser mode.
... in a few more cases.

If you are in spatial mode and you double-click on the Desktop folder
it activates the Desktop putting all other Tracker windows in the
background.

If you are in browser mode and you double-click on the Desktop folder
it opens the Desktop folder in the current window.

If you issue 'open ~/Desktop' from Terminal or if you have Expander set
to open the expanded folder and you expand something on the Desktop
it won't open the Desktop folder in its own window in either spatial or
browser mode.

This patch alters Trackers behavior to  open the Desktop folder in its own
window in these cases when you are in browser mode.

One might argue (as a few have on IRC) that this behavior should also
happen in spatial mode, but, this patch does not alter the behavior of
spatial mode. In spatial mode opening the Desktop folder with
'open ~/Desktop' or extracting a zip file with Expander on the Desktop
simply activates the Desktop pushing all other Tracker windows into the
background state.

Fixes #10929
2014-06-10 00:57:33 -04:00
John Scipione 157e4b428a Tracker: Replace max_c() with std::max() 2014-06-10 00:36:11 -04:00
John Scipione 9437e677ba Tracker: Style fixes 2014-06-10 00:36:10 -04:00
John Scipione 12bd3f0452 Expander: Replace min_c() and max_c()
...with std::min() and std::max()
2014-06-09 15:56:39 -04:00
John Scipione be931d0706 Expander: Check asprintf() return value 2014-06-09 15:56:27 -04:00
John Scipione 122abe4315 Expander: Check Window()->Lock() return value 2014-06-09 15:56:26 -04:00
John Scipione 1e35cfaea2 Expander: replace string manip with asprintf() 2014-06-09 15:56:26 -04:00
John Scipione e326cef620 Expander: style fixes, no functional change intended 2014-06-09 15:56:25 -04:00
Jérôme Duval d64267ffb2 vfs: checks whether the mount's unmounting flag is already set.
* thanks to Ingo for suggesting the idea, quoting him:
"by holding sVnodeLock read-locked, get_mount() ensures that fs_unmount() can't
process the nodes. If it is already past that point, the root node check
(not NULL, not busy, ref count > 0) is supposed to detect that. But it doesn't
look like this can work. fs_unmount() doesn't set the root node to NULL (the
root node field is NULL only during a short period in fs_mount()), but it just
frees the nodes after releasing sVnodeLock. So the not busy and ref count > 0
checks could already access freed memory".
* tested OK, this fixes #10522.
* replaced mount->root_vnode by the local variable with the same value.
2014-06-09 21:45:28 +02:00
Fredrik Holmqvist ec10d307d0 Really fix gcc4 build.
Here I come to save the day!!
2014-06-09 21:07:29 +02:00