Commit Graph

8878 Commits

Author SHA1 Message Date
Brian Hill b8a6139981 Fix glitch in Screen prefs when changing background color.
When both Backgrounds and Screen are open, if the workspace color is changed
in Backgrounds the monitor preview in Screen will now refresh to the new color.

Also added a BAlert in BackgroundsView.cpp when failing to change the
background image.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes #13286.
2017-04-30 10:29:39 +02:00
Axel Dörfler 3582d4fe85 Minor style cleanup. 2017-04-29 14:37:56 +02:00
Dario Casalinuovo a33c8f4c2a MediaClient: Some more consistency in args order 2017-04-28 02:13:51 +02:00
Jérôme Duval 43542cabdd runtime_loader: increase max length for image names.
* was previously 32, which would truncate longer shared object names.
* fixed #13436.
2017-04-20 18:23:36 +02:00
Jérôme Duval 41458d977a limits.h: define PIPE_BUF. 2017-04-19 17:52:28 +02:00
Jérôme Duval 00796434c6 limits.h: bump _POSIX_SEM_NSEMS_MAX to 256.
128 was too low for Python3.
2017-04-16 13:49:41 +02:00
Dario Casalinuovo 0cc5ecb8ca MediaClient: IDs should be signed integers
* It's very important to use a negative value to identify
non valid or uninitialized connections. Additionally, it's preferred
to don't interfere with media_kit types as long as the framework use
it in the backend.
2017-04-14 17:28:35 +02:00
Adrien Destugues 56403b6373 limits.h: define PAGE_SIZE only if XSI is requested
limits.h is part of the C standard, but POSIX and XSI extend it with
various defines. We should not add these unless the application requests
support for them.

In this case, PAGE_SIZE should only be defined if XSI support is
requested by defining _XOPEN_SOURCE. Note that PAGESIZE (plain POSIX for
the same thing) and B_PAGE_SIZE are alternatives that remain available.
2017-04-13 21:14:41 +02:00
Adrien Destugues b68cf9d6f6 elf.h: add more architectures.
Mostly I need EM_AVR to build avrdude on Haiku.
2017-04-11 18:59:06 +02:00
Alexander von Gluck IV 6516aed58b network preflet: Make InterfaceListItem dumber
* Allows us to use InterfaceListItem for non-physical
  interface things (like a VPN connection)
2017-04-05 18:46:10 +00:00
Fredrik Holmqvist e5c95a01ff Use 64 bit addressing for ACPI on 32 bit builds.
32 bit builds with PAE are so much fun. It's like
64 bit without all the extra registers...
2017-03-28 21:34:42 +02:00
Alexander von Gluck IV 8cc5325ad5 agg: Pull in updated scanline + basics header from 2.4
* Resolves #13382
2017-03-18 18:59:30 -05:00
Augustin Cavalier ad05d1f087 libs/agg: Remove GPC.
It was licensed with a "no commercial usage allowed" license, which if
we were using it would be a gray area at best. We weren't using it at all,
and AGG seems to have disabled building it by default, so just remove it
from the tree entirely.

Briefly discussed on IRC.
2017-03-18 19:27:45 -04:00
Alexander von Gluck IV 63863c9849 cpu_type.h: Fix missing ;, sorry for spam 2017-03-12 15:11:02 -05:00
Alexander von Gluck IV 54066ddbb7 OS.h: Add AMD Ryzen CPU name identification.
* Update cpuidtool.c to new post-smp rework name
  calculation
2017-03-12 14:46:02 -05:00
Dario Casalinuovo 5854fc4a7a MediaClient: Add remaining wiring for input/output functionality
* BufferReceived is renamed HandleBuffer.
* Update doc.
* Implement buffer production private methods.
2017-03-10 01:02:15 +01:00
Jim Barry d47434c2ec Added "explicit" specifier to constructors that would otherwise allow undesirable implicit conversion from integer types.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-03-08 15:59:46 -05:00
John Horigan 3c69a2e24d Add agg_renderer_base::fill(color&) method for blending a color. Complements the clear(color&) method, which copies the color.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-03-08 14:59:40 -05:00
John Horigan cb743deb19 Add const qualifier to multiply and divide operators for agg_trans_affine/perspective
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-03-08 14:52:10 -05:00
Murai Takashi 58916d4a36 agg_scanline_u.h: fix wrong base_type
As pointed out at https://sourceforge.net/p/agg/svn/37

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-03-08 13:26:56 -05:00
Julian Harnath 6ced92452c FUSE compat: add MIME type faking
* Add special handling for reading the BEOS:TYPE attribute to supply
  on-the-fly fake MIME types for FUSE module filesystems, the same
  way it's done in our FAT and NTFS FS modules

* Reuse the mime_ext_table which we already have and put it into a
  shared location so we don't get further extra copies of it
2017-02-27 19:58:22 +00:00
Julian Harnath 1263be8fc4 FUSE compat: add Haiku extension
* Add a way for a FUSE module to supply Haiku-specific extensions.
  This allows it to integrate better with Haiku while only requiring
  minimal changes on the FUSE module itself.

* For now, there is only one extension: another function pointer for
  "get_fs_info", which lets the FUSE module fill in an fs_info struct.
  FUSE provides no good way to otherwise communicate extra information,
  such as the volume flags (e.g. B_FS_IS_SHARED).

* A FUSE module can signal that it supports the Haiku extensions by
    a) defining HAS_HAIKU_FUSE_EXTENSIONS before including the fuse
       headers
    b) setting the global variable gHasHaikuFuseExtensions to 1 in
       its initialization
  Otherwise, the Haiku extensions are completely invisible to the
  FUSE module.
2017-02-27 19:58:13 +00:00
John Scipione 388ac82baa BString: Add IStartsWith() and IEndsWith() methods
Case-insensitive version of StartsWith() and EndsWith()
2017-02-21 18:03:03 -08:00
Jérôme Duval 85566e032d posix: add _POSIX_SEM_NSEMS_MAX.
* have _SC__SEM_NSEMS_MAX return _POSIX_SEM_NSEMS_MAX, a per team limit
instead of the global limit.
2017-02-21 20:17:16 +01:00
Jérôme Duval 0bec83a85a pthread: add const for pthread_mutex*_get*()
according to the spec. Fixes #13324.
* code style clean up.
2017-02-21 20:05:02 +01:00
PulkoMandy 100775b790 Fix build on Linux
Stub out some translation macros for host build, so the now localized
package solver can be built there.
2017-02-11 14:15:38 +01:00
Augustin Cavalier b6f76ebe71 s/OpenBeOS License/MIT License/ universally, as they're the same thing.
Fixes #8681.
2017-02-09 22:09:56 -05:00
Augustin Cavalier 6c9415e3ca BJson: Use the normal "input, output" argument ordering instead of the reverse.
Update all in-tree consumers of the BJson API to match. Also added
const-qualifiers to the BString versions of the API, and added the leading
"_" to the header guards.
2017-02-09 13:43:26 -05:00
Jérôme Duval d0a92cb653 x86: added a MSR definition. 2017-02-01 16:57:03 +01:00
Adrien Destugues f9e1854f19 libbnetapi: fix access to HTTP headers
The asynchronous listener had no reliable way to access HTTP result and
headers from the callbacks. As the callbacks are triggered
asynchronously, they can be run after the request has carried on and,
for example, followed an HTTP redirect, clearing its internal state.

The HeadersReceived callback now passes a reference to BUrlResult for
the request. There are two cases:
- Synchronous listener: passes a reference to the request's results
directly
- Asynchronous listener: archives a copy of the result into the
notification message, and passes a reference to the unarchived copy.

Unfortunately this comes with several ABI and API breakages:
- Change to the prototype of HeadersReceived()
- Change to the class hierarchy of BUrlResult (implements BArchivable)

All users of HTTP requests will need to be updated if they implemented
in HeadersReceived or used BUrlResult.
2017-01-30 20:27:52 +01:00
Kacper Kasper 2332ebfd52 ControlLook: Add side parameter to tab drawing functions.
* This allows drawing tabs on any side of the view.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2017-01-22 09:36:38 +01:00
Andrew Aldridge a735975461 Sync atheros813x with FreeBSD
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes #12328.
Fixed a style error (2 lines between functions).
2017-01-22 09:20:01 +01:00
Dario Casalinuovo 991d9dbf6d MediaConnection: Implement auto release 2017-01-18 20:19:02 +01:00
Dario Casalinuovo 0844ddf4d9 MediaClient: Polish destructors
* Make Release() the only public way to destroy a connection.
2017-01-18 20:19:02 +01:00
Dario Casalinuovo d64dd7beea MediaClient: Fix style for private methods and other cleanup
* Cleaned up some unneeded callbacks.
2017-01-18 20:19:02 +01:00
Dario Casalinuovo 7561d9ac5d Populate media/experimental with future media_kit classes
* Node implementations headers are move into src/kits/media.
2017-01-16 23:04:14 +01:00
Dario Casalinuovo 41acdd1d90 media_kit: Move some files and headers under docs/develop/media 2017-01-16 22:53:44 +01:00
Dario Casalinuovo 550e05af20 MediaClient: Start/Stop force argument doesn't make sense 2017-01-15 19:28:14 +01:00
Dario Casalinuovo 2c9fa0f278 MediaClientNode: Schedule outgoing connections on start
* Add preliminary binding support.
2017-01-15 14:45:24 +01:00
John Scipione 3705d40cd9 BSpinner: Set min value then max value
... reverse this to avoid confusion, you'll see why in next commit.

No functional change intended in this commit, functional change is in the
next commit.
2017-01-12 14:15:44 -08:00
Adrien Destugues bdd02e0d9d BString: rename SetCharAt to SetByteAt
Makes it clear that it operates on bytes, not unicode codepoints.
Thanks to mmlr for remembering me of this subtlety.
2017-01-12 22:03:51 +01:00
Jérôme Duval 0c5219a1d6 Restore missing symbol _ZN7BStringixEi on x86 and x86_64.
* Vision and others were broken after 3eac8208df.
* this adds BStringRef in the backward compatibility section.
* fixes #13199.
2017-01-12 21:23:50 +01:00
Adrien Destugues 3eac8208df Remove BStringRef and users.
As discussed in 2008
(http://www.freelists.org/post/haiku-development/BString-on-GCC4,1),
this class was not efficient because of lack of inlining. Implement the
suggested solution of a SetCharAt method instead. Also add a CompareAt
which covers a specific use case in KeyboardLayout.cpp.

Adjust all places which were using this feature to safer APIs.

Also fixes a copypaste error in FormattingConventions.cpp.
2017-01-11 20:50:41 +01:00
Dario Casalinuovo e6004b7729 MediaClient: Move WIP min/max functions into BMediaConnection 2017-01-10 22:54:53 +01:00
Dario Casalinuovo 3ef4b20086 Make BMediaRecorder public
* Fills a functionality lack of the classic media_kit.
2017-01-10 21:34:20 +01:00
John Scipione e1304871bb Revert "BWindow: CenterOnScreen a bit above center"
This reverts commit a5be1832cc.
2017-01-01 12:25:05 -08:00
John Scipione a5be1832cc BWindow: CenterOnScreen a bit above center
BWindow docs: Document changes to CenterOnScreen()

https://68.media.tumblr.com/d8dff7a17b9d90b41e32c5a2a0312513/tumblr_oj2wg1tmKs1r0f0hfo1_1280.png

Will revert if not appreciated.
2016-12-31 18:06:55 -08:00
Dmytro Shynkevych 0e0f49e799 libroot: Implemented pthread barriers
This is an implementation of pthread barriers pursuant to the relevant specification.

Barriers are essentially a special case of conditional variables,
such that all threads waiting on one are woken up when the number of
waiters reaches a number provided at the initialization of the barrier.
In view of that, this implementation mimics the implementation of pthread_cond,
except it is more specialized and self-contained.

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2016-12-30 11:32:04 +01:00
PulkoMandy 7056e542b7 Add forwarding header for BUrl. 2016-12-29 18:18:21 +01:00
Adrien Destugues 2c26ad4b39 move BUrl to the support kit
It is used by the media kit, which created a dependency from libmedia to
libbnetapi to openssl.
It is not entirely specific to the network kit, there are some use cases
that don't involve network at all.
2016-12-29 16:38:53 +01:00
Rene Gollent 4ee47fe9e8 BListView: Cleanup, no functional change.
- Rename _FontChanged() to _UpdateItems() to more accurately reflect its
  purpose, as discussed on commits list. Adjust callers accordingly.
2016-12-25 16:16:43 -05:00
Jessica Hamilton 4419d699ec partitioning: pass along reference to parent when uninitializing.
* Fixes problems with setting the partition name after uninitializing
  a partition in DriveSetup. Previously, UninitializeJob() was
  followed by SetStringJob(), but the kernel was updating the
  change counter for the parent partition when uninitializing a
  partition, leading to SetStringJob() having an incorrect change
  counter for the parent partition. Now the parent change counter
  will be correct when SetStringJob() runs.
2016-12-23 18:53:15 +13:00
Dario Casalinuovo 51844723d3 MediaConnection: Remove redundant IsInput/IsOutput 2016-12-18 15:15:30 +01:00
Jérôme Duval 17b2a3cfcb fork(): Defer signals and lock the heaps while _kern_fork().
* Also defer signals while registering fork hooks.
* While malloc provides fork heap hooks which lock the heaps and unlock/reinit,
  malloc_debug provides empty hooks.
* Ideas suggested by Ingo, patch reviewed by him. Thanks a lot!
* Also call fork parent hooks on failure.
* Solve locks-up when combining multithreading and process forking, should help
  with #13111.
2016-12-17 21:11:15 +01:00
Jérôme Duval 194afffd85 user_thread.h: use struct keyword to be usable in C. 2016-12-17 20:17:38 +01:00
Dario Casalinuovo 75b90c42e5 MediaConnection: Fix buffer size and duration redudancy
* There's no need to supply ways to mismatch the buffer duration
and size. Anything should reflect the media_format, this is at least
fixed on API level.
2016-12-17 19:10:50 +01:00
Dario Casalinuovo 2fdc256d60 BMediaOutput: API cleanup 2016-12-17 19:10:50 +01:00
Dario Casalinuovo 63cb26c536 MediaClient: Hide timesource related API
* There's no point actually in providing BTimeSource dependant
functionality. If and when there will be need for something like
that, possibly never, an higher level solution will be integrated.
2016-12-17 19:10:50 +01:00
Dario Casalinuovo 83cd87d033 SimpleMediaClient: Use virtual inheritance to reduce duplication 2016-12-11 19:16:19 +01:00
Dario Casalinuovo d1742cc336 MediaInput/Output: Inherit base virtually 2016-12-11 19:16:18 +01:00
Adrien Destugues fda0bf77fb Revert "repo rework: Re-add compatibility url field"
Revert "repo rework: Remove stubs; Breaks repo compat."
Revert "repo rework: Remove need for repos to be self-aware"

This reverts commit a2b2f4d642.
This reverts commit 602076ef82.
This reverts commit 5ffaf72c8a.

These changes break the build on Haiku and the ability to create repo
mirrors, for the lack of a replacement for the URL (an UUID was evoked
on the mailing lists, but not implemented).

We are due for a release soon, please don't break the build.
2016-12-10 12:55:56 +01:00
Rene Gollent 7bdeef54a2 Debugger: Rework parts of report generation.
Team:
- Adjust report generation event to include a final status code for listeners.

CliContext,TeamWindow,ReportUserinterface:
- Use aforementioned status code to indicate whether report generation
  succeeded or failed.

DebugReportGenerator:
- Notify listeners if report generation fails. This may have previously
  been responsible for some bug reports where it was indicated that the
  debugger hung without exiting after being asked to save a report from
  a crashed app.
- When dumping disassembly, retrieve it directly if necessary rather than
  requesting it via the user interface listener. This also fixes the quirk
  that requesting to save a crash report while looking at the source code
  of a function would trigger switching it to disassembly visually.
- When walking the list of threads to dump, acquire references to all of
  them before starting. Otherwise, it was potentially possible for a running
  but not crashed thread to exit while we were generating the report, leaving
  us with a pointer to a deleted thread. This was most likely the cause of one
  of the crashes reported in #13082.
- When receiving the notification that source code state has changed, clear
  the waiting function. Otherwise, it was potentially possible for us to get
  other state change notifications, leading to the data semaphore being
  released too often. This would then cause later potential waits such as
  the stack frame memory dump to not actually wait when they should,
  potentially leading them to dereference objects that weren't yet ready.
  This fixes another of the crashes in #13802.
2016-12-09 23:11:23 -05:00
Alexander von Gluck IV 602076ef82 repo rework: Remove stubs; Breaks repo compat.
* These stubbs satisfied older Haiku releases that
  required the URL
* Users running nightly images will need to upgrade
  to hrev50723 - hrev50744 before upgrading further
* Getting this out of the way now before the beta
  comes out.
* New installations shouldn't suffer any problems.
2016-12-07 21:27:56 -06:00
Dario Casalinuovo f1f0956504 MediaClient: Just some interface review 2016-12-06 21:16:36 +01:00
Dario Casalinuovo c1137899c5 MediaClient: Update comments to last changes
* The interface is being refined and various comments were inconsistent
at this point.
* AddInput/AddOutput is private now.
2016-12-06 16:47:16 +01:00
Rene Gollent 10ba334855 Debugger: Cleanup.
- Split MessageCodes.h into a second file that separates out the
  application-specific message codes from those used by the core.
  Adjust includes accordingly. No functional change.
2016-12-05 18:17:58 -05:00
Rene Gollent 25ec63dbf5 libdebugger: Add string setting type.
- Needed in order to properly implement a settings description for
  a remote interface.
2016-12-05 18:17:48 -05:00
John Scipione 129626b593 Fix warnings building on newer OS X
Apple has gotten around to updating their POSIX support so these
constants are now defined. Add some #ifndef guards to prevent warnings
during compile.
2016-12-03 00:01:51 -08:00
Alexander von Gluck IV 5ffaf72c8a repo rework: Remove need for repos to be self-aware
* See #12917 for details.
* Squashed to one commit to make revert easy if we
  run into any issues.
* pkgman is now pre-attached to the 'current' repo
  version within nightly images so they can be updated
  by default.
* This shouldn't impact us keeping older sets of package
  versions by commit hash for building older hrevs.
* There are XXX stubs with "Kill me". These will need
  to be dropped after users are given sufficent time to
  upgrade. We're dropping a previously required field (url)
  so making this a slowish roll out.
* Makes the repos a lot less restrictive which should
  help PM package building automation be a bit easier.
* Once this stuff smooths out, we'll add UUID's to the
  repo definitions for duplicate repo detection.
2016-12-02 00:41:06 -06:00
Axel Dörfler 852e09d61f launch_daemon: Added stop target ability.
* Before, you had to stop each job by itself.
2016-11-29 23:14:36 +01:00
Dario Casalinuovo ecb395852e Introduce BSimpleMediaClient
* The idea is to move the callback based mechanism into a derived
class. The objects can be composed to create working systems.
* The BMediaClient class supply RegisterInput/RegisterOutput
and BeginInput/BeginOutput is moved to BSimpleMediaClient.
* Various minor fixes.
2016-11-29 01:22:35 +01:00
Dario Casalinuovo 209b520fa0 MediaClient: Add some padding and reserved functions 2016-11-26 17:30:49 +01:00
Dario Casalinuovo 05e29ea1ad MediaConnection: Remove Reset() 2016-11-26 17:24:10 +01:00
Dario Casalinuovo 9ee6577e2d MediaClient: Distribute callbacks across derived classes 2016-11-26 17:13:02 +01:00
Dario Casalinuovo 9e9655ed55 MediaClient: Use CurrentTime for both offline and performance time 2016-11-25 17:38:44 +01:00
Dario Casalinuovo 6d0255216e MediaClient: Introduce BMediaInput and BMediaOutput 2016-11-25 17:38:44 +01:00
Dario Casalinuovo eebedf8f1a MediaClient: Use unique id for both inputs and outputs 2016-11-25 17:38:44 +01:00
Dario Casalinuovo 30f9eb3f90 MediaClient: Use kind/kinds pair for media_connection_kind
* Use const reference for media_connection::kind.
2016-11-25 00:05:06 +01:00
Dario Casalinuovo 902701e6bf MediaClient: Use higher level structs for the remaining methods 2016-11-24 21:37:14 +01:00
Dario Casalinuovo 3c1e013390 MediaClient: Fix build 2016-11-24 01:22:27 +01:00
Dario Casalinuovo f506f3056f MediaClient: Improve internals and API
* Capabilities() become Kind()
* Use media_client and media_connection to better model
the different situations of the API. Reduce code duplication
and move media_kit structs/methods into private.
* Various API and beauty improvements.
* Introduce id management for media_connections.
* Fix different issues preventing to correctly begin a connection.
2016-11-24 00:27:58 +01:00
Dario Casalinuovo 23d5326e2b MediaClient: Introduce media_client and media_connection
* Those structs are provided as replacement for the classic
media_kit ones. They provide better encapsulation of the data
and the resulting code is heavily simplified. It's planned to
introduce BMediaRoster functions to provide conversion from
media_node and media_input/media_output to media_client
and media_connection.
2016-11-24 00:27:58 +01:00
Rene Gollent a9d53d9e7e Debugger: Fix regression introduced in hrev50534.
FunctionInstance:
- Add new state FUNCTION_SOURCE_SUPPRESSED. This signals that the user
  explicitly forced disassembly to be loaded despite source code being
  available.

LoadSourceCodeJob:
- When forced to disassembly, use the above suppressed state accordingly.

SourceView/TeamWindow/TeamDebugger:
- Adjust to take new state into account as needed.

TeamDebugInfo::GetActiveSourceCode:
- When looking at a function to decide whether to return line information
  based on source or disassembly, first examine the source code state. If
  the source has never been loaded for that function, but we have it available,
  set it on the function at that point. This lazily addresses the fact that
  LoadSourceCodeJob is called on behalf of a specific function, and
  consequently only sets the source code onto that function, and not all others
  present in the same file. This allows us to differentiate between the case
  where a function doesn't have source code available at all, versus a function
  that has simply been forced to disassembly view at this point in time.

The primary symptom of the above issue was that attempting to set a breakpoint
outside of the currently active function, but within the same file would result
in the breakpoints view indicating that the breakpoint was at line 0 rather
than the appropriate line, and breakpoints would also not be drawn in the
source view for such locations.

Thanks to Humdinger for the heads up!
2016-11-22 23:06:09 -05:00
Dario Casalinuovo 2082b5d25f MediaClient: Use media_client_kind for client capabilities 2016-11-18 17:56:51 +01:00
Dario Casalinuovo 5ec9bd1eff MediaClient: general cleanup 2016-11-18 17:46:19 +01:00
Dario Casalinuovo 0253ecbd9e MediaClient: Remove BeginConnection for external connections
* While it looked like a good formalism, there's no need to add
unneeded complex steps to the user of the API.
2016-11-17 02:43:40 +01:00
Janus 586734d609 Fixes Success/Failure colors in Appearance
* Fixes the mapping function index_to_color_which
* Fixes #13073
2016-11-14 19:47:29 +01:00
Jessica Hamilton f4ff9cb02c Merge branch 'uefi-support' 2016-11-14 03:21:59 +13:00
Jessica Hamilton 6e6efaecdc EFI: add ACPI support
Also add support in the kernel to get the ACPI RSDP from the
bootloader, and pass onto the ACPI driver using get_boot_item.
2016-11-14 03:21:36 +13:00
Henry Harrington 82dcc31606 bootloader: Translate kernel args before adding them to kernel_args_range.
Chunks may be physically contiguous, but virtually disjoint. Adding
physical addresses may cause ranges to be merged incorrectly.

Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2016-11-14 01:00:00 +13:00
Dario Casalinuovo 9b410c41e8 Initial merge of the BMediaClient branch
* The BMediaClient is an higher level API to the media_kit. It
corresponds to what the layout API was for the interface_kit.
The main idea is to allow the developer concentrate only on
higher level details and avoiding handle with the tricky parts
of the media_kit. At the same time the general purpose node that
is implemented inside would allow implementing the best techniques
around thus at the same time reducing code duplication and increasing
efficiency.
* BMediaClient is WIP, this is the initial merge of the branch.
The initial development stone was set long time ago and walked
through various design/implementation phases.
2016-11-11 13:47:56 +01:00
Adrien Destugues 12431ebff4 listusb: dump video streams from UVC devices. 2016-11-02 15:26:04 +01:00
Adrien Destugues e64640878a listusb: parse UVC devices
- Various cleanups to the USB-audio side, which is similar
- Add in the UVC (USB Video) specific info with parsing of some of the
  descriptors (most of the "control" part).
2016-11-02 15:26:04 +01:00
Adrien Destugues b32f51ce49 elf.h: add ELFMAG* constants
Needed by libelf, when elf.h exists.
2016-11-01 10:30:54 +01:00
Dario Casalinuovo 8023d6bafd PluginManager: Move reference counting in the MediaPlugin
* Ideally we should support this feature by default to allow
future improvements to the plugins management.
* Fixes the major memory corruption that lead to various
crashes on exit in MediaPlayer.
2016-10-31 23:39:32 +01:00
Dario Casalinuovo 42a3f9477d PluginManger: Remove BReferenceable and add locking 2016-10-31 23:39:32 +01:00
Adrien Destugues ed31589c37 URL Disaptching/Async listeners: forward debug messages
This makes it possible for the Asynchronous listener to get the
messages. It can then process them in a more fancy way.

The default implementation will still log the messages to the console
(if debug is enabled), but it will do so from the Async listener for
asynchronous requests now. This means they will probably be logged from
the same thread, and show up in a more readable way.

This also makes it possible to listen to several requests and log them
in a nice way (in a status window or whatever).
2016-10-31 22:14:39 +01:00
Andrew Lindesay cf65729463 Url: implement same URL parsing logic in C/C++ code
- Remove uses of group matching regular expression, not available on all
  build hosts,
- Parsing is faster than our old regexp engine.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

- Fixes #13002
- Fixed some indentation (tabs vs space), please configure your editor
  properly.
2016-10-31 09:14:44 +01:00
Mark Hellegers 65f5e1e1b2 Fix #12799: Enable elf symbol patching for Haiku
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2016-10-30 10:42:24 +01:00
Alexander von Gluck IV b2bdabc797 arm: Add beaglebone target, rename beagle
* beaglebone vs beagleboard
* While the boards are almost the same, they have
  diff. FDT's now (more memory, different layout etc)
* Make u-boot script more rpi-like
  (depend on u-boot for initial addresses)
* Wasn't working, still doesn't.
2016-10-20 11:05:46 -05:00
Dario Casalinuovo 3588e74aef BMediaEventLooper: Return to simple lateness computation
* Remove enqueue_time again.
* Lateness seems generally useless. No way to get something useful
experimentally. The commit noise however was useful, the port wait is
behaving more in accordance with the lateness calculus.
* Fixes #12817 and possibly #12594.
2016-10-20 03:11:01 +02:00
Dario Casalinuovo 0c98ab27d3 BMediaFile: Add BUrl SetTo
* Also fix the server version of BUrl constructor
to use a const reference.
2016-10-20 02:26:25 +02:00
Jérôme Duval e340f717a4 runtime_loader: add support for ELF init/term routine arrays.
* binutils 2.27 defaults to DT_INIT_ARRAY instead of DT_INIT.
2016-10-11 22:26:06 +02:00
Adrien Destugues af0282f91f Make US-english the default KDL keymap again. 2016-10-10 07:18:12 +02:00
S K fe2557b6eb PS/2: fix warnings, enable -Werror
- elantech: Remove unused variables and functions.
- "movement maker": float/int confusions
- debugger keymap: don't use multi-byte chars in preprocessor to avoid
  warnings with gcc2 (even with -Wno-multichar)

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes #12658
2016-10-09 21:11:55 +02:00
Alexander von Gluck IV 25a087bc7c radeon_hd: AtomBIOS version bump. Encoder work.
* Now pulling in latest amdgpu atombios.h headers
* Lots of DisplayPort cleanup and removal of legacy stuff
* Add obsolete atombios header for things that disappear
  (amdgpu doesn't support older cards like we do)
* Introduce new code to support later encoder tables
* Drop radeon-specific encoder service from common dp_info
* Tested on HD 5450 hdmi
2016-10-05 13:54:24 -05:00
Jérôme Duval e25f993385 complex.h: add a C++ guard. 2016-10-05 09:18:42 +02:00
Kacper Kasper dd074cc7dc Style fixes for Errors.h.
No functional change intended.
2016-10-04 18:44:58 +02:00
Alexander von Gluck IV 38f17b01ce radeon_hd: Polaris10 power distribution fix
* Helps prevent mainboard explosions and other bad stuff.
* ...maybe not explosions, but bad things.
* The RX 480 reference design can pull as much as 90W
  from its PCIe slot at load. PCIe is rated for 75W.
* This change overloads the PCIe power cables vs the PCIe
  slot. The PCIe power cables can handle going over spec.
* Untested since we really can't come close to loading a
  RX 480 without hardware OpenGL ^_^
* Should be able to test on real hardware within a week.
2016-09-28 15:46:14 -05:00
Adrien Destugues c4da848565 BTextEncoding: even more style fixes. 2016-09-27 20:41:26 +02:00
Adrien Destugues a71b10d760 BTextEncoding: fix naming and move to BPrivate namespace. 2016-09-27 20:38:58 +02:00
Adrien Destugues 32afcc5cc5 Style fix in Locale Kit headers.
As pointed out by Axel, the wrong style was used in these headers we
inherited from OpenTracker days.
2016-09-27 19:34:52 +02:00
Adrien Destugues a95053ddb7 TextEncoding: Style fixes to header.
As pointed out by Axel.
2016-09-27 07:20:47 +02:00
Adrien Destugues 08e5249142 TextEncoding: add Encode/Decode methods.
This replaces convert_from/to_utf8 in a way that doesn't leak memory.

Use the new method in StyledEdit.

Fixes #6252, #3065.
2016-09-25 23:16:19 +02:00
Adrien Destugues fbb725bbdc Add text encoding detection to the Locale Kit.
As usual we ask ICU to do the actual work. The TextEncoding constructor
is fed with a sample of the text to identify (ICU docs recommend a few
hundred bytes). The text is analyzed in various ways (bytes patterns
such as UTF-8 escaping schemes, common letter sequences from known
languages, byte order marks) and an encoding is determined.

Replace code in StyledEdit by this new implementation.

Note that ICU seems to always return some valid encoding, even with fed
with obviously non-text data. This makes StyledEdit open the files no
matter what, where it would error out before.

Fixes #9395.
2016-09-25 18:50:29 +02:00
Rene Gollent b65adbdfbc Debugger: Fix #12940.
- Add new interface TeamFunctionSourceInformation. Currently this
  exposes a single function allowing one to query for the currently
  active source code given a FunctionDebugInfo instance.
- Implement TeamFunctionSourceInformation on TeamDebugInfo.
- Pass TeamFunctionSourceInformation to Dwarf{Team,Image}DebugInfo.
  In turn, make use of it in DwarfImageDebugInfo::GetStatement() in
  order to determine whether to return the corresponding assembly
  or source statement.

With this piece of information, the debugger is now correctly able to
determine that the user is currently looking at disassembly despite debug
info being available, and consequently adjust its stepping behavior based on
that. Previously, the source code statement was always used, leading to it
not being possible to single step assembly lines in such a circumstance
without manually using run to cursor.

Other related cleanups:
- TeamDebugInfo now inherits BReferenceable directly, rather than relying on
  indirectly inheriting it from TeamTypeInformation.
- Remove BReferenceable from TeamTypeInformation. The latter is only an
  interface anyways, and inheriting that base class from multiple locations
  was causing GCC5 trouble when resolving BReference<TeamDebugInfo>, even
  when virtual inheritance was used.
2016-09-13 22:14:10 -04:00
Dario Casalinuovo e3f2079964 AdapterIO: Remove unuseful Close() 2016-09-07 18:21:13 +02:00
Dario Casalinuovo 79bd3b4837 StreamerPlugin: Add reference count
* Keep the Streamer around until everyone released it.
2016-09-07 18:19:10 +02:00
François Revol 495efc382b loader: Drop the HashMap for partition lookup by id
The HashMap constructor was called before the heap is initialized,
ending up calling malloc from the OpenHashMap constructor.

Oddly it was still working on x86 but broke other platforms.

Instead we add a Lookup() static method to Partition,
which by default walks gPartitions for the id,
and recursively calls itself on the children lists.

This means we must add a partition even temporarily to gPartitions
before Scan()ing it though.

Signed-off-by: François Revol <revol@free.fr>
2016-09-02 19:02:33 +12:00
Fredrik Holmqvist 211483cb51 EFI: Initial test EFI application
* Only set HAIKU_BOOT_PLATFORM to bios_ia32 if not defined
* Add gnuefi build feature
* Introduce BOOT_LDFLAGS, and move options for passing to linker
  into ArchitectureSetup
* x86_64 compile fixes for warnings in boot loader
* loader/elf.cpp: don't include ELF32 support when targeting EFI
* relocation_func.cpp: copy of the relocation code from gnuefi
  to make _relocate extern "C", and avoid including <efilib.h>
* boot_loader_efi.ld: copy of gnuefi's elf_x86_64_efi.lds,
  modified to include support for C++ constructors, etc. Keep in
  sync with the gnuefi package

Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2016-09-02 19:02:29 +12:00
Adrien Destugues 96658eaed9 elf.h: add some defines from Linux version
For completeness and compatibility.
2016-08-27 09:10:01 +02:00
Adrien Destugues 6980817672 Remove pthread.h include from netdb.h
- It is not needed in the .h, and makes gawk build fail.
2016-08-27 09:04:22 +02:00
Adrien Destugues 187ad82a62 intel_extreme: fix wait_for_vblank on SandyBridge
There was some mixup with the interrupt registers, still:
- The driver uses 16-bit read/write, but on SandyBridge the register is
  32 bits
- There is a global interrupt enable bit, which must be set to unmask
  everything else
- The bits for vblank interrupt are not the same on SNB and later PCH
  based devices, and the code mixed the two.

Move the computation of the interrupt bits to an helper function, and
use it everywhere to make sure we always use the right bits.
2016-08-26 21:45:38 +02:00
Adrien Destugues adc0f76e64 More SandyBridge fixes and cleanups
Modesetting
===========

My previous hack was setting the transcoder registers, instead of the
display ones. Do that the way it is designed in the driver instead:

- If there is a transcoder, set its registers, but do not set the
display timings. The display will remain set at its native (and only)
resolution, and panel fitting will adjust the output of the transcoder
to match.
- If there is no transcoder, set the display registers directly to the
native resolution, as it was done on previous generation devices.
- fPipeOffset hacks no longer needed

DPMS
====

It seems the panel control register is not readable on PCH? Anyway, the
code would loop forever waiting for the bit to become unset when turning
the display off. Waiting seems to not be needed, so just remove it as
well as the "unlock" bit, which does not work for me and results in a
black screen.

Remaining hacks
===============

I still need to force HEAD_MODE_A_ANALOG to get output on pipe B (LVDS
display) working. I suspect something is common to the two pipes or not
allocated to the right one.

This version will have less side effects on other generations and help
with getting things to work on SandyBridge and possibly later devices.
Please test and report.
2016-08-25 23:17:12 +02:00
Adrien Destugues 9b1935445c CID 608995: buffer overflow.
This should not happen, so in case a file has an unexpectedly large
name, drop to debugger.
2016-08-21 17:49:52 +02:00
Adrien Destugues bb4190f050 Fix SandyBridge support.
This reverts commit 4f2b258c32.
This reverts commit c86f3dba23.
This reverts commit 61fbdb0667.
This reverts commit b3f14fb7c7.
2016-08-21 16:54:03 +02:00
John Scipione 2446f53bc8 BListView: Impliment autoscroll
BeOS had a feature where you could click on a list and while holding
down the mouse button scroll through the list items selecting them
as you went. I implemented the same feature on Haiku.

Did the work in separate thread which makes sure that the mouse
is held down the whole time even if you leave the view.

Thanks Diver for bringing this feature to my attention.
2016-08-18 16:36:46 -07:00
John Scipione 9dfd244e92 BListView: Style fixes
* Rename kDoubleClickTresh to kDoubleClickThreshold
  and use floating point in rval
* Pointer (*) goes with type for property var
* Use {}'s for multi-line if conditional
* rename point to where (consistent with header and rest of IK)
* Explicitly compare with 0 for bitwise operator statements
* Rename InitiateDrag() params
2016-08-18 16:36:28 -07:00
Adrien Destugues c2ddcb7957 elf.h: also define SELFMAG
- Used by distcc when it detects elf.h.
2016-08-07 13:39:27 +02:00
Adrien Destugues 8efb6db7b9 elf.h: rename ELF_MAGIC to ELFMAG
- This is how it is named in other versions of elf.h (Linux, glibc, possibly more)
- ELF_MAGIC is used by libelf for the same thing, and the defines conflicts,
  breaking libelf build on Haiku.
2016-08-06 20:32:47 +02:00
John Scipione 9d37e7411c Tracker FindPanel: Make a copy of fDeviceIcon
... so that it gets deleted by destructor and not the original
2016-07-31 19:42:39 -07:00
John Scipione d8c4f7b54a IconMenuItem: Make icon_size B_MINI_ICON by default 2016-07-31 19:42:39 -07:00
John Scipione caf0a129d6 Tracker: Draw IconMenuItem in closed state
Add an Icon() and SetIcon() method. Override SetMarked() to set the
parent menu field icon.

Don't move the label right if icon is NULL. Make the first menu item
an IconMenuItem with a NULL icon. This allows the icon to draw in the
closed menu state.

icon gets updated even if you select an item in a submenu
2016-07-31 19:42:39 -07:00
John Scipione 81364c9d82 BColorMenuItem: add custom color menufield
http://insightfactory.tumblr.com/image/142366356207

* Make the color box a rectangle with proportions of golden ratio.
* Override GetContentSize() to make menu item area larger.
* Label should never truncate since I make sure there is enough room.
* Draw the label using BMenuItem parent class
* Carefully adjust the spacing so that there is an attractive amount of
  padding between the checkmark and color box and the color box and label.

Add _AddMenu method to BMenuField that adds BColorMenuItem as its
base menu item. This shows the BColorMenuItem in the closed state.

Create BPrivate::MenuItemPrivate

Add a SetSubmenu() method to MenuItemPrivate that gives you
the ability to add a submenu after creating the object. This
method should be public

Skip disabled items

Color gets updated even if you select an item in a submenu
2016-07-31 19:42:39 -07:00
John Scipione e8d4db8e0b MenuPrivate: Add SetItemMargins() method 2016-07-31 19:42:39 -07:00
John Scipione dcecaf60ad BMenu: Remove _ from protected method _DrawItems 2016-07-31 19:42:39 -07:00
John Scipione 61dfdec415 BMenu and friends: style fixes
BMenuBar: style fix: msg => message

MenuPrivate: style fixes

MenuItem: 80 char limit style fix

MenuBar: tiny style fix

Menu: tiny style fix, indentation

Menu: Small refactor

Implement _SetIgnoreHidden() in header
Change on to ignoreHidden
Change on in _SetStickyMode to sticky

_BMCItem_: tiny whitespace style fix

Menu: style fixes, rename msgr => messenger

BMenu: style fix, pointer != NULL

BMenu::Archive rename ret to status

Also check pointer against NULL explicitly

BMenuItem style fixes: rename abbreviation, pointer style
2016-07-31 19:42:39 -07:00
Rene Gollent 9c9c24ce08 libdebugger: Add accessor for cpu state size.
Architecture:
- Store and provide accessor for the size in bytes of the low-level
  debug_cpu_state size of the respective target CPU. Adjust subclasses
  to pass in the appropriate size information.
2016-07-31 17:30:12 -04:00
Alexander von Gluck IV 95b6439eec intel_extreme: Implement Snb PCH FDI link training 2016-07-29 17:49:59 -05:00
Augustin Cavalier 48440e6945 headers/libs/mesa: Remove.
Unused, as far as I can tell, and not installed. (Grok returns 0 results
for "glcore.h" and 0 relevant results for "mesa".)
2016-07-29 18:41:30 -04:00
Augustin Cavalier 2381f8276a be_apps/ServicesDaemon: Remove.
The last reference to the Services Daemon, which was removed from the
tree a while back (the launch_daemon has supplanted it).
2016-07-29 18:41:30 -04:00
Augustin Cavalier a3e794ae45 be_apps/Deskbar: Remove.
The only file in here was Deskbar.h, which just included the "real"
Deskbar.h. Considering nothing in-tree cares about this, and only
a small number of applications at HaikuArchives do, and that Haiku already
broke BeOS source compatibility in lots of other ways, let's just remove
this deprecated cruft.
2016-07-29 18:41:30 -04:00
Alexander von Gluck IV c0d4def4e4 intel_extreme: Implement Ilk PCH FDI link training
* IronLake tested and FDI says it trains successfully
* Still no LVDS video on Ilk
2016-07-29 16:04:40 -05:00
François Revol 02283e080c M68K: drop the custom C arch_cpu_user_mem*() for the default impl
I didn't notice there was a C++ version that didn't require writing asm.

I'll have to write them anyway for speed someday.
2016-07-20 21:57:19 +02:00
François Revol d26fd5f68d M68K: drop the platform_type field, the enum is gone from OS.h 2016-07-20 20:31:14 +02:00
François Revol 990d34efdd M68K: add arch_cpu_idle and arch_cpu_pause inline stubs
Remove the stub from arch_cpu.cpp

We might want to implement a 040 CPU module providing idle using LPSTOP.
2016-07-20 20:26:29 +02:00
François Revol 7ab9993a18 M68K: Add missing defines
No idea for cache level.

On 030 and 040 a cache line is 16 bytes.
2016-07-20 20:26:29 +02:00
François Revol 3805f72225 M68K: add arch_atomic.h 2016-07-20 20:26:29 +02:00
François Revol 47a20cd6d1 M68K: turn #warnings into comments in public headers
The warnings made those headers and those including them not detectable
by libiberty's configure because of the way it checked for them.

This fixes the gcc build.
2016-07-20 20:26:29 +02:00
Alexander von Gluck IV f6c32ce310 intel_extreme: Set FDI PLL RX lane count when enabling 2016-07-20 00:25:38 -05:00
Alexander von Gluck IV a933bb4cbc intel_extreme: IronLake reference clock activation 2016-07-17 15:25:08 -05:00
Alexander von Gluck IV 92e254d047 intel_extreme: Improve PCH detection
* Detect PCH model based on ISA bridge and save
  into shared info for later use.
* On CougarPoint PCH systems, assign pipes via
  special CPT registers
* Drop HasPlatformControlHub as PCH should be
  based on more than just generation.
2016-07-10 21:02:01 -05:00
Murai Takashi 07d59ab7db PictureIterator.h: fix header guard spelling
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Fixes: #12839
2016-07-10 17:11:20 +02:00
Dario Casalinuovo 0474db50d0 AdapterIO: Add IsRunning method
* The backend need to know if we can really get data.
* Adapt WaitForData to be more reliable using this method.
2016-07-09 16:18:09 +02:00
Dario Casalinuovo 5c05bb48f4 AdapterIO: Remove default arguments in ctor 2016-07-09 02:14:37 +02:00
Rene Gollent 05fc1277c4 Debugger: Fix team restart request.
UserInterface:
- Add Clone() function to set of required virtuals. This asks the subclass
  to create a new instance of its respective type.

{CommandLine,Graphical,Report}UserInterface:
- Implement the above function.

TeamDebugger:
- Add accessor for the currently active UI.

TargetHostInterface:
- Set correct request type when setting up the options for a team restart.
- Ask the TeamDebugger for its user interface and clone it in order to fill
  in that aspect of the debug options. This fixes a regression introduced in
  commit 880a64, which inadvertently resulted in team restarts no longer
  working.
2016-07-03 13:53:51 -04:00
Dario Casalinuovo 9f2deec26f AdapterIO: Seeking and flags access improvements
* Backend seeking is done only if explictly requested in
BAdapterIO Seek.
2016-07-03 15:28:06 +02:00
Dario Casalinuovo 3ad928de3f BAdapterIO: Refine size inheritance
* Wait evaluation is done considering both position
and buffer size.
* Set back position to 0 after seeking.
* Simplify EvaluatePosition to take advantage of inheritance.
* Use back position to determine the current size of the buffer.
* Add more debug tracing.
* Other minor fixes.
2016-07-02 21:19:27 +02:00
Alexander von Gluck IV 30d631c821 radeon_hd: Add new Polaris GPU, untested 2016-06-30 15:09:59 -05:00
Dario Casalinuovo 345dba5416 AdapterIO: Further development of the interface
* Implement Open/Close mechanism.
* Implement SetBuffer.
* Implement timeout handling.
* Improve Seek mechanism, this is now working by locking the
thread until the backend call SeekCompleted.
2016-06-30 16:54:40 +02:00
Dario Casalinuovo 4dd09daff7 Streaming: Use const reference in place of copying
* Thanks to Markus for reporting.
2016-06-25 01:13:10 +02:00
Dario Casalinuovo 0ba82236bd Streaming: Remove any pointer BUrl argument
* There's no need to pass BUrl by pointer, this is
potentially dangerous and leaky without any advantage,
copying is definitely safer.
2016-06-24 19:00:38 +02:00
Dario Casalinuovo 6903cf9bda AdapterIO: Increase consistency
* Moved data locking in the internal buffer class, includes handling
of backend writes.
* Takes advantage of inheritance for getting the size. The choice is
made depending on the flags. This allow the implementer to easily
return a custom size by reimplementing GetSize. At the same time
a plain BAdapterIO can still have it's total size set, but the behavior
will change depending it's mutable or not.
* Some decisions are now made by considering everything in absolute
values.
* Other minor fixes.
2016-06-23 00:38:33 +02:00
Mark Hellegers e1c98ceaf7 Add support for TLS SNI
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2016-06-20 19:42:24 -04:00
Augustin Cavalier 73e180c9b9 Revert "cppunit: Enable elf symbol patching for Haiku."
This reverts commit 56430ad800.

It builds on my machine, but apparently the buildbots choke on it...
2016-06-18 18:57:48 -04:00
Andrew Lindesay fa2dd9c45f BPackageInfo::Parser: Validate URL strings.
Fixes #12710.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
I fixed the modifications to the Jamfiles in src/bin, they were all wrong
in the patch.
2016-06-18 18:40:07 -04:00
Mark Hellegers 56430ad800 cppunit: Enable elf symbol patching for Haiku.
Fixes #12799.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2016-06-18 18:11:47 -04:00
Mark Hellegers ac315db012 locale: Fix 24 hour format for DateTimeFormats.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Fixes #12575. I checked with PulkoMandy on IRC before merging this,
and fixed some whitespace violations of the coding style.
2016-06-18 18:09:56 -04:00
Dario Casalinuovo 3faf39eb5d BAdapterIO: Add initial seeking support
* This is by default provided using a relative buffer. When the
client request a seek over the range we currently have, we will
ask the backend with a SeekRequested. When the backend operation
ended successfully, the client is required to call SeekCompleted
before to return. This will cause the offset to change and the
buffer is cleaned as result. Next data received will be considered
to be at a position equal to the offset plus the relative position.
2016-06-07 16:12:39 +02:00
Jérôme Duval 2dc495dc53 bluetooth: remove DEBUG definition. 2016-06-05 18:55:44 +02:00
Rene Gollent fce4895d18 Debugger: Split into core library and application.
- Add subfolder src/kits/debugger which contains the debugger's core
  functionality and lower layers. Correspondingly add headers/private/debugger
  for shared headers to be used by clients such as the Debugger application
  and eventual remote_debug_server. Adjust various files to account for
  differences as a result of the split and moves.
- Add libdebugger.so to minimal Jamfile.
2016-06-04 13:18:39 -04:00
Dario Casalinuovo b660d95f88 Introduce BAdapterIO
* This class is provided as a safe multithreaded communication channel
between a BMediaIO-like interface and a Read/Write backend.
* Includes internal buffering and can be used to provide multithreaded
edit of the data.
* Current limitations include missing BOutputAdapter and
correct timeout handling.
* Future plans provide a BRemoteAdapterIO that using ports
and areas allow to easily send big data between processes.
2016-05-31 01:15:09 +02:00
Dario Casalinuovo 9217f5c5ed BMediaIO: Add GetFlags method to define properties 2016-05-31 01:15:09 +02:00
Ingo Weinhold c60453fd79 Core dump: Add symbols for commpage to core file 2016-05-22 22:10:48 +02:00
Ingo Weinhold 90f571868e kernel: Add elf_read_kernel_image_symbols()
Refactor new function out of _user_read_kernel_image_symbols(). Can be
used to get a kernel image's symbols from within the kernel as well.
2016-05-22 22:10:47 +02:00
Dario Casalinuovo 2583517316 MediaIO: Fix header typo 2016-05-16 19:57:07 +02:00
Rene Gollent b8a716965a BSocketMessenger: Further improvements.
- Messages that expect a reply are now tagged with a unique ID field to
  indicate that expectation to the receiving socket messenger.
- The messenger now maintains a map of received reply IDs and their
  corresponding messages, along with a message queue of other unsolicited
  replies.
- After successfully connecting, the messenger now spawns a thread
  whose sole responsibility is receiving and parsing all incoming messages,
  and consequently sorting them into the aforementioned data structures based
  on the presence of the reply ID. Callers who are awaiting either replies or
  other messages are signalled appropriately via a semaphore. This allows
  multiplexing of both types of messages on the same socket.
2016-05-14 21:31:24 -04:00
Augustin Cavalier f0a5e33a55 HttpAuthentication: Add explicit copy & assignment constructors.
So that we don't copy the BLocker. Fixes part of the build.
2016-05-13 16:49:52 -04:00
Augustin Cavalier 69b8f7f1f4 BLocker: Make copy constructor & assignment operator private.
On suggestion of Axel.
2016-05-13 16:23:08 -04:00
Alexander von Gluck IV 8fe5054828 intel_extreme: Extend DDI port probing to A-E
* The Linux code made this a bit hard to figure out via
  complex define functions, however there can be up to
  5 DDI ports (A-E)
2016-05-08 15:40:57 -05:00
Augustin Cavalier 5559d51db7 bluetooth_server: Nuke the weird logging system, just use macros...
... just like everything else on Haiku does. Permanently enabled for the
time being. At least I can tell what's going on now.
2016-05-07 21:10:34 -04:00
Dario Casalinuovo 6d63bc5e60 launch_media_server: Use BLaunchRoster::Start
* Remove SyncToServices and the related code from BMediaRoster.
2016-05-07 22:22:55 +02:00
Jérôme Duval c9dba74273 Added some support for GCC 7. 2016-05-05 18:20:26 +02:00
Rene Gollent 493cced1ef libbnetapi: Add socket messenger class.
- Introduces new network API class BSocketMessenger, allowing one to send
  and receive BMessages across a network socket in a BMessenger-like
  fashion. Still very much WIP, hence currently not exposed via public headers.
  Based partly on previous work by Axel.
2016-04-30 18:32:50 -04:00
John Scipione 3490eda827 ControlLook: Rename border param to borderStyle
border vs. borders is confusing.

BTabView: Rename border param to borderStyle

BTabView docs: rename border param to borderStyle

enumerate border styles in docs
2016-04-29 14:31:05 -07:00
Ingo Weinhold a0c364c70d Core file images note: Add text delta field 2016-04-29 22:32:15 +02:00
Ingo Weinhold 9266cd66c7 extended_image_info: Add text_delta field
Needed to offset a symbol address read from the symbol table to the
actual load address.
2016-04-29 22:32:14 +02:00
Rene Gollent c9dd7d0ddf libbnetapi: Extend socket classes.
B{Abstract,Datagram,Secure}Socket:
- Add functionality to listen for and accept new connections, thus allowing
  one to use the socket classes for server functionality as well.

BSecureSocket:
- Adjust to take into account differences between how SSL needs to be called
  when accepting an incoming connection vs initiating an outbound one.
  The handshake on the accepted connection stills fails for unknown reasons
  at the moment though.

Note that these changes break the ABI, and thus any packages making use of
them directly will need a rebuild.
2016-04-28 22:30:40 -04:00
John Scipione 22097d7aee Style fixes to BPeropertyInfo class 2016-04-27 11:10:34 -07:00
John Scipione 4c25397c41 AppMisc: correct param name in docs, silences warning 2016-04-27 11:10:33 -07:00
Ingo Weinhold 5cde7a856d Add symbol and string table addresses to core file 2016-04-27 02:16:54 +02:00
Ingo Weinhold 8c6cb8af01 runtime loader: Register extended image info with kernel
Add structure extended_image_info which extends image_info by the
fields symbol_table, symbol_hash, string_table.
2016-04-27 02:16:09 +02:00
Ingo Weinhold 82185a52e2 Future proofing core file format
* The Haiku specific notes contain a structure size field, now.
* Change the type of the count and size fields in the Haiku specific
  notes to uint32 also for 64 bit ELF. The size field for a note is a
  uint32 anyway.
2016-04-27 00:55:23 +02:00
Ingo Weinhold 467fe4ca0c kernel: Add core dump facility
* Add function core_dump_write_core_file(). It writes a core file for
  the current thread's team. The file format is similar to that of
  other OSs (i.e. ELF with PT_LOAD segments and a PT_NOTE segment), but
  most of the notes are Haiku specific (infos for team, areas, images,
  threads). More data will probably need to be added.
* Add team flag TEAM_FLAG_DUMP_CORE, thread flag
  THREAD_FLAGS_TRAP_FOR_CORE_DUMP, and Team property coreDumpCondition,
  a condition variable available while a core dump is progress. A
  thread that finds its flag THREAD_FLAGS_TRAP_FOR_CORE_DUMP set before
  exiting the kernel to userland calls core_dump_trap_thread(), which
  blocks on the condition variable until the core dump has finished. We
  need the team's threads to stop so we can get their CPU state (and
  have a generally unchanging team state while writing the core file).
* Add user debugger message B_DEBUG_WRITE_CORE_FILE. It causes
  core_dump_write_core_file() to be called for the team.
* Dumping core as an immediate effect of a terminal signal has not been
  implemented yet, but that should be fairly straight forward.
2016-04-24 18:22:14 +02:00
Ingo Weinhold ac1f1a926e kernel: +image_iterate_through_team_images()
Like image_iterate_through_images(), but iterates though the images of
the given team only.
2016-04-24 17:30:52 +02:00
Ingo Weinhold 99f00556a4 kernel: +arch_get_thread_debug_cpu_state()
Similar to arch_get_debug_cpu_state(), but the thread whose CPU state
to retrieve is specified. Works only for threads that aren't running,
and on x86-64 we can get the FPU state only when the thread was
interrupted in userland.
Not implemented for the incomplete architecture ports.
2016-04-24 17:29:28 +02:00
Ingo Weinhold 7a187cd629 _user_debug_thread(): Use new signal SIGNAL_DEBUG_THREAD
This resolves a TODO: We used thread_interrupt() to wake up the thread
from an interruptable wait. However, if the thread was already in the
kernel and about to start waiting, that would have no effect and the
thread would wait anyway. Now there's the new non-blockable signal
SIGNAL_DEBUG_THREAD, which is sent to the thread instead, making sure
that thread doesn't start waiting.
2016-04-24 11:54:17 +02:00
Alexander von Gluck IV 8d1cb54aac intel_extreme: Add in some code for the lakes (unused) 2016-04-22 22:41:52 -05:00
Alexander von Gluck IV e54df51727 x86/kernel: Up kernel max page table to 16
* New Intel SkyLake seems to have 9 mapped ranges
  at boot.  It seems like this define has been creeping
  up for a while.
* Resolves the inital issue reported in #11377 on SkyLake
  as well. Bonefish mentioned it might need to be raised
  again... he had some good foresight there :-)
* I'm seeing the same no bootable partitions issue though
  via USB after this raise. (maybe a USB 3.1 thing?)
2016-04-22 19:05:19 -05:00
Dario Casalinuovo 76889670db shutdown_media_server: Finalize rework of synchronization
* When the user isn't requesting a custom notification, it will
be a BMediaRoster job to do it.
* Reintroduce BMediaRoster::SyncToServices, this time based on local
message passing rather than a global semaphore.
* SyncToServices is used in launch_media_server to make the process
more launch_daemon safe and faster in the average case.
* It was an error to add notifications in the media_server.
* Fixes #12717.
2016-04-21 19:02:27 +02:00