Commit Graph

8899 Commits

Author SHA1 Message Date
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
John Scipione e9208b6876 ScreenSaver: Rename BuildScreenSaverDefaultSettingsView
...to just DefaultSettingsView

It is just as obvious what it does in context, but shorter.

Rename the function it contains from
BuildDefaultScreenSaverSettingsView to
BuildDefaultSettingsView
2016-04-13 15:50:30 -07:00
John Scipione 3801c37b90 Screensaver: Update Default Settings View to use Layout
and standard insets so that they match other screen savers
2016-04-13 15:50:30 -07:00
Alexander von Gluck IV c58e1d7feb l2cap: Fix x86_64 build and refactor trace 2016-04-10 00:49:32 -05:00
Alexander von Gluck IV 1f2fa6cd09 bluetooth: Refactor debugging and trace calls
* The old debug system was too complex and made
  troubleshooring difficult. (it also was unique
  like a snowflake... which we don't want)
* Move to the classic TRACE / ERROR a large majority
  of the code has changed to.
* I like trace statements, but drop some obvious ones
* Fix style issues along the way
2016-04-09 23:40:54 -05:00
Alexander von Gluck IV 03b9db1a1a Merge branch 'intel-extreme'
Rework of the intel-extreme driver. Don't expect anything special yet.
2016-04-09 14:12:52 -05:00
Dario Casalinuovo 11c7bd86e2 Replace synchronization semaphore with async messages
* Remove SyncToServices, I will probably readd it in future
but this time using a local synchronization service more than
relying on the media_server to release the semaphore.
* Due to some discussions today in mailing list I decided
to step back and retry the initial way to notify media rosters
about media services status. It is woking by using two different
notifications for reconnecting to the media_server and notifying
the local subscribers.
* This speed up the media services restart.
* Sorry for the noise and very thanks for reviewing my code to
everyone.
2016-04-05 00:41:20 +02:00
Dario Casalinuovo c131229f08 media_server: Add notifications 2016-04-04 01:27:12 +02:00
Dario Casalinuovo 53c3fa5137 Introduce functionality for syncing with the media services
* The global synchro semaphore is provided with the purpose of
being used to avoid threads lock up when the media_server is in
an undefined state. There's still room for improvements.
* BMediaRoster::SyncToServices lock up on a semaphore until
the multi_audio correctly connected to the mixer.
2016-04-04 01:27:09 +02:00
John Scipione c4ec640b46 WindowInfo: spaces => tabs 2016-03-31 14:39:49 -07:00
Dario Casalinuovo 7eaa054b87 StreamerPlugin: Use BDataIO as base interface
* There's no need to force the streamer plugin to use a
BMediaIO. This class is supplied to accomodate more smart uses,
but in certain cases it makes just things more complex. If a
plugin doesn't need to have an internal caching method, then it
will be simpler to implement a block-consuming BDataIO and let
the internal BMediaIOWrapper to deal with caching.
2016-03-31 18:06:19 +02:00
Axel Dörfler 67988f501a NodeMonitor: Resolve mount points for B_WATCH_CHILDREN.
* When a watched directory contains a mount point, we need to resolve
  the actual parent directory of the mount point in the file system to
  serve the monitor.
2016-03-28 14:31:27 +02:00
Axel Dörfler 6f7fc2204b NodeMonitor: Added B_WATCH_CHILDREN flag.
* Added a directory argument for notify_{stat/attribute}_changed().
* This allows to watch only a directory, and get the notifications for
  all of its files, not just add/remove entry notifications.
2016-03-28 14:31:27 +02:00
Adrien Destugues 97dfeb9670 Make some headers C89 safe again
- Allows to use FindDirectory.h in C89 sourcecode (no C++ style comments
  allowed)
2016-03-27 16:58:38 +02:00
Dario Casalinuovo 8c7679851f Move MediaIO in it's own header 2016-03-25 22:44:56 +01:00
Dario Casalinuovo 3733e4b2ab PluginManager/AddOnManager: Add streamers support code 2016-03-25 22:20:03 +01:00
Dario Casalinuovo b777602827 MediaFile: Rework to support BUrl sources 2016-03-25 22:19:47 +01:00
Dario Casalinuovo 20ae088fa5 MediaWriter: Add new BUrl functionality 2016-03-25 22:19:03 +01:00
Dario Casalinuovo a2b3f12698 MediaExtractor: Adapt to new BUrl functionality 2016-03-25 22:18:15 +01:00
Dario Casalinuovo 63e1708eee Finalize StreamerPlugin
* Add cpp file.
* Make Sniff virtual.
2016-03-25 22:16:36 +01:00
Dario Casalinuovo 3d8e0d38e1 Add initial design of StreamerPlugin 2016-03-25 22:09:03 +01:00
Dario Casalinuovo 7b79e0694e Add prototype BMediaIO interface 2016-03-25 21:54:24 +01:00
John Scipione 8be1a5f082 Slider: Style fixes
Pointer style
Newlines
Indentation
Compare against NULL or 0 explicitly
use single floating point precision for float literals (i.e. use 0.0f)
2016-03-22 12:00:36 -07:00
Alexander von Gluck IV ca95e9dad9 intel_extreme: Add initial work for DDI ports 2016-03-15 18:12:28 -05:00
Julian Harnath 310238937c Network Kit: add BNetworkDevice::Control
* Allows to do an arbitrary ioctl on the network device

* For ifreq and ieee80211req requests
2016-03-15 21:59:03 +01:00
John Scipione 53f75ce5d6 BColorControl: Remove fOffscreenView pointer
...and rename fBitmap to fOffscreenBitmap to make it more clear what it is.

We don't need to save a pointer to both the offscreen bitmap and
the offscreen view, just the bitmap. We can access the view by calling
fOffscreenBitmap->ChildAt((int32)0). This gives us back a _reserved private
variable slot.

In the (unlikely) case that _InitData() is called with offscreen = false but
the fOffscreenBitmap is not NULL, delete fOffscreenBitmap before
setting it to NULL so that memory is not leaked.
2016-03-12 19:14:26 -08:00
Alexander von Gluck IV 3d1bd895ad intel_extreme: Properly use VBIOS panel mode
* Move current_mode into the accelerant as the
  driver doesn't care.
* Record panel_mode in driver and present to accelerant
* eDP, if no EDID and mobile, leave edid incomplete.
  Mode set should notice that and fall back to panel_mode
2016-03-11 18:20:28 -06:00
Alexander von Gluck IV a81f65eae5 Merge branch 'master' into intel-extreme 2016-03-09 17:11:08 -06:00
Augustin Cavalier 80bc632afd BStatusBar: Restore the old blue-ish color from before the Set*Color changes. 2016-03-07 16:08:00 -05:00
Adrien Destugues 93ea83e53d Allow custom baud rates for FTDI serial ports
- Termios: cf{get,set}{i,o}speed can handle arbitrary speed values.
- The value is stored in the appropriate fields of the termios structure
  in this case. The old constants (stored in the flags) are preserved
  for BeOS binary compatibility.
- Adjust the FTDI FT232* driver to accept custom rates, by replacing the
  hardcoded regster values with a function that will compute it
  according to FTDI documentation (confirmed giving the same values for
  the existing baudrates).
2016-02-27 19:08:53 +01:00
François Revol 14cfccd011 U-Boot: add a 'physical' arg to fdt_get_device_reg()
If false, try to use the virtual-reg property first.
2016-02-26 22:58:17 +01:00
Alexander von Gluck IV 721ba9af43 intel_extreme: Clean up DisplayPort Port class
* DisplayPort != DigitalPort
* i2c needs wrapped in DP AUX transaction code
* Mode-setting comes with DP link training as well
* We need to try and share DP code with radeon_hd
2016-02-23 14:10:14 -06:00
Alexander von Gluck IV 9975620612 intel_extreme: Prepare for DisplayPort AUX comms 2016-02-23 13:39:10 -06:00
Jérôme Duval f369957d03 via.accelerant: move enums out of the struct. 2016-02-19 22:33:41 +01:00
Alexander von Gluck IV bab64f65bb Merge remote-tracking branch 'upstream/master' into intel-extreme 2016-02-19 10:17:42 -06:00
Alexander von Gluck IV c9c61669ea intel_extreme: Add general pipe configuration and adjust color space 2016-02-19 00:09:43 -06:00
Adrien Destugues a5a3b2d9a3 Bluetooth: fix thread safety issue.
Fixes #11428.
2016-02-14 14:07:21 +01:00
Dario Casalinuovo c1ad6121ca BMediaRecorder: Solve possible problem with node references
* Since the BMediaRecorder have an it's own estabilished policy
relating releasing the producer node we will not interfere with
it except when we are controlled from Cortex.
2016-02-09 20:24:58 +01:00
Dario Casalinuovo cc0d365ef7 BMediaRecorder: Fix unneeded argument and error check 2016-02-09 14:11:40 +01:00
Dario Casalinuovo 2a2e352a4a BMediaRecorder: Rework to allow external connections
* This required to review various parts of the code, and
isn't probably still perfect. The main problem was an attributes
hell where redondance created a lot of problems, all this data
is now controlled mostly by the node.
* Header indentation changes needed too.
2016-02-09 13:33:09 +01:00
Dario Casalinuovo 138a802617 BMediaEventLooper: Use enqueue_time in a different shape
* This is the only solution that allowed to use the best
of both ways to do this calculus. I've also tested it
with a modified sound player that snoozed every time
the buffer should be handled, and found that neither
of the lateness calculus I tested (including enqueue_time)
really solve all problems. That's why I've tried to find
an average solution. There's still room for improvements
eventually.
2016-02-03 13:25:13 +01:00
Axel Dörfler de4b1dede1 BMailProtocol: Removed delete/append methods.
* The mail system is file based which makes these methods pretty much
  superfluous.
2016-01-26 16:01:03 +01:00
Rudolf Cornelissen 0fa7d5c4df VIA gfx driver: overlay engine on K8M800 responds now, wip. 2016-01-23 23:46:22 +01:00
Axel Dörfler 618cc43b64 IMAP: New folders will now adopt default mail attributes.
* Added a function CopyMailFolderAttributes() that copies the attribute
  layout from the text/x-email default query folder.
* This using the new CopyAttributes() method in libshared that is pretty
  much a copy of a similar method from copyattr. However, I did not
  replace the latter, as that one allows for more fine grained error
  reporting (and attribute filtering).
* Closes ticket #3498.
2016-01-14 21:00:38 +01:00
Rudolf Cornelissen 14de50bad7 VIA gfx driver:K8M800 now works (fixed PLL), fixed info in GetDeviceInfo 2016-01-13 01:01:32 +01:00
Axel Dörfler 90fd6af0b6 launch_daemon: Added ability to enable/disable a job.
* Instead of just starting/stopping it.
* Also available via the launch_roster command.
2016-01-12 16:22:47 +01:00
looncraz f9f16ddb2c BAbstractSpinner Colors
Adopted parent colors for the text view - should not have done so.
Disabled colors were incorrect, so I also corrected those in this patch.

Fixes #12574.

Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2016-01-10 18:51:04 +13:00
Augustin Cavalier 1d11475790 BAboutWindow: Put the AboutView and StripeView into BPrivate.
To avoid name clashes. Possibly fixes the HaikuDepot crashes.
2016-01-06 15:08:34 -05:00
Rudolf Cornelissen b0c69e8490 nVidia driver: added option to block EDID resolution restrictions (check_edid) 2016-01-05 23:49:00 +01:00
Axel Dörfler 8180539313 IMAP: setting flags, and body fetching works now.
* The direct methods in BMailProtocol now forward the request to the
  looper; it's no longer the mail_daemon's responsibility to know
  anything about that protocol.
* It's in desperate need of refactoring, but it doesn't hurt to add
  it to the repository as is.
2016-01-05 20:12:26 +01:00
RudolfC 063436816d nVidia driver: Added basic dualhead support for native Haiku ScreenPrefs app 2016-01-04 22:17:48 +00:00
looncraz 7f9368cae5 Set*UIColor, etc.
The inseparable changes necessary to support live color updating across the
system in a sane, safe, and performant manner.

BView gains:

HasSystemColors()
HasDefaultColors()
AdoptSystemColors()
AdoptParentColors()
AdoptViewColor(BView*)
SetViewUIColor(color_which, float tint)
SetHighUIColor(...
SetLowUIColor(...
ViewUIColor(float* tint)
HighUIColor(...
LowUIColor(...
DelayedInvalidate()

BWindow gains a simple helper method:
IsOffscreenWindow()

BMessage gains:

AddColor()
FindColor()
GetColor()
HasColor()            * allegedly this API is deprecated, but I implemented it anyway
ReplaceColor()
SetColor()

Previous private ColorTools methods are made public and moved into GraphicsDefs:

mix_color, blend_color, disable_color

These are fully compatible with BeOS dan0 R5.1 methods and are just code cleanup
of BeOS example code under the OpenTracker license.

In addition, four new colors are created:
B_LINK_TEXT_COLOR
B_LINK_HOVER_COLOR
B_LINK_ACTIVE_COLOR
B_LINK_VISITED_COLOR

These changes are documented in their proper user documentation files.

In addition, due to a history rewrite, B_FOLLOW_LEFT_TOP has been defined and
used in lieu of B_FOLLOW_TOP | B_FOLLOW_LEFT and is included in this commit.

On the app_server side, the following has changed:

Add DelayedMessage - a system by which messages can be sent at a scheduled time,
and can also be merged according to set rules.  A single thread is used to service the
message queue and multiple recipients can be set for each message.
Desktop gains the ability to add message ports to a DelayedMessage so that
said messages can target either all applications or all windows, as needed.

Desktop maintains a BMessage which is used to queue up all pending color changes
and the delayed messaging system is used to enact these changes after a short
period of time has passed.  This prevents abuse and allows the system to merge
repeated set_ui_color events into one event for client applications, improving
performance drastically.

In addition, B_COLORS_UPDATED is sent to the BApplication, which forwards the message
to each BWindow.  This is done to improve performance over having the app_server
independently informing each window.

Decorator changes are live now, which required some reworking.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2016-01-04 06:48:22 -05:00
Alexander von Gluck IV d35a52e8e2 intel_extreme: Fix i965 LVDS panel programming
* polarity regs move on LVDS vs analog
* add knowledge or transcoder registers, they
  exist seperately on PCH-split
* Native resolutions now work on LVDS under i965
2016-01-03 10:46:13 -06:00
Markus Himmel 52c0749723 BLayoutBuilder: Add support for BCardLayout
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2015-12-26 20:13:25 -05:00
Markus Himmel 5f2db70ffb Interface Kit: Add BCardView
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2015-12-26 20:13:22 -05:00
Alexander von Gluck IV c302a243e1 Merge remote-tracking branch 'upstream/master' into intel-extreme 2015-12-23 16:41:23 -06:00
Augustin Cavalier 6984b8554c Revert "libroot: Undefine constants for unsupported POSIX features"
This reverts commit 7aebec8db1.
As per the discussion on the mailing list.
2015-12-21 12:16:33 -05:00
Simon South 7aebec8db1 libroot: Undefine constants for unsupported POSIX features
Haiku does not yet support certain features related to POSIX threads.
Constants used to test for the presence of these features should
therefore be left undefined, according to the POSIX spec, but are
currently set to -1. This can cause software built on Haiku to
incorrectly detect the presence of these features.

* unistd.h: Undefine _POSIX_THREAD_ATTR_STACKADDR,
  _POSIX_THREAD_PRIORITY_SCHEDULING feature constants.
* conf.cpp: __sysconf: Return -1 for unsupported features.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2015-12-21 11:09:34 -05:00
Augustin Cavalier 485f533935 RWLocker: Move to kits/shared.
As requested by looncraz. A lot of stuff in IOM/MediaPlayer's
'support' directories probably should be moved to 'shared' anyway.
2015-12-15 21:15:06 -05:00
Alexander von Gluck IV 0ea662e5e9 intel_extreme: Correct panel control register on non-pch 2015-12-15 07:23:21 -06:00
Alexander von Gluck IV 3cfe299798 intel_extreme: Rework PLL and id PineView as PIN 2015-12-04 13:34:33 -06:00
Alexander von Gluck IV e6fefa6cbf intel_extreme: More FDI training work
* IvyBridge or higher can auto-train.
* Linux doesn't use this feature, however
  manual FDI link training is *really*
  complex... lets try auto-training first.
2015-11-19 17:49:51 -06:00
Alexander von Gluck IV aa06863ccd intel_extreme: Enable / Disable FDI TX/RX 2015-11-19 13:26:55 -06:00
Alexander von Gluck IV 00e0982f68 intel_extreme: First work at programming FDI 2015-11-17 23:28:09 -06:00
Alexander von Gluck IV e5494f1bb2 intel_extreme: Fix DP / HDMI gpu register location mixup on die 2015-11-16 20:41:14 -06:00
Alexander von Gluck IV 202ffc8cca intel_extreme: Bump the VLV offset back a bit and fix port defines 2015-11-16 19:58:51 -06:00
Alexander von Gluck IV f979e62e54 intel_extreme: Program more LVDS regs. Set +/- @ lvds port 2015-11-12 18:30:21 -06:00
Alexander von Gluck IV 92bcdd7935 intel_extreme: Add initial TMDS modesetting code 2015-11-09 09:26:07 -06:00
Alexander von Gluck IV d442692fab intel_extreme: Correct DP port registers 2015-11-09 09:15:16 -06:00
Alexander von Gluck IV 61fbdb0667 intel_extreme: Set mode and pll via pipe-aware class functions 2015-11-08 23:14:46 -06:00
Alexander von Gluck IV 37b903fbc8 intel_extreme: Add pipe selection for ports 2015-11-08 10:39:07 -06:00
Alexander von Gluck IV b809fb52ed intel_extreme: Add some missing panel registers, masks, shifts 2015-11-04 17:48:06 -06:00
Alexander von Gluck IV 9cd46c7372 intel_extreme: Fix PCH_PANEL STS/CTL register location and define more 2015-11-04 17:29:06 -06:00
Alexander von Gluck IV fb255821eb intel_extreme: Correct generations based on some Intel help 2015-11-04 16:11:22 -06:00
Alexander von Gluck IV fa1d593323 intel_gart: Clean up trace code, break apart gtt probe functions 2015-11-03 17:18:58 -06:00
Alexander von Gluck IV 47fba246cc intel_extreme: Fix IsMobile. That's not how masks work 2015-11-02 20:14:00 -06:00
Alexander von Gluck IV c86f3dba23 intel_extreme: LVDS cleanup and fixes for later gens 2015-11-02 18:01:18 -06:00
Alexander von Gluck IV e2e5daf25b intel_extreme: Add generation index + begin to use in gart 2015-11-02 15:55:05 -06:00
Alexander von Gluck IV 53f5bffe84 intel_gart: Fix gart detection and begin using DeviceType
* Correctly identify newly re-assigned cards families
* Begin using new DeviceType class in intel gart code
2015-11-01 20:17:20 -06:00
Alexander von Gluck IV 84b7116da8 intel_extreme: Rework card identification defines
* Be more verbose on flag type
* Add additional groups
* Add additional families
* Correctly assign later models
2015-11-01 12:20:10 -06:00