Commit Graph

7869 Commits

Author SHA1 Message Date
Ithamar R. Adema 8f4db360bc arm/atomic: round of atomic function changes
* change vint{32,64} to int{32,64} in:
  * kernel implementation
  * syscall definitions
  * libroot prototypes
* update syscall functions with new atomic prototypes.
2014-02-15 11:46:12 +01:00
Ithamar R. Adema 4b47d96a77 arm: fix compiler ARM architecture detection
For determining if to define ATOMIC{,64}_FUNCS_ARE_SYSCALLS, use
the proper macro.
2014-02-15 11:46:11 +01:00
Ithamar R. Adema 5cef6be21f arm/atomic: fixup arch_atomic.h
* Remove _inline functions, since we're not using inlines
* Use compiler barrier instead of GCC builtin
2014-02-15 11:46:11 +01:00
Alexander von Gluck IV 35171b073d arm: Miscellaneous build fixes
* Use atomic_get_and_set for return value
* Atomics are no longer volatile
* Add missing arch_cpu_pause stub
* Move arch_cpu_idle to arch_cpu header to match
  other architectures
2014-02-12 23:37:15 -06:00
Alexander von Gluck IV 8018e8fa91 arm: Rework hrev46863 to use gcc built-in
* Those calls were indeed v7+ only, and our toolchain
  is v6.
2014-02-12 23:34:08 -06:00
Alexander von Gluck IV 92b2e03d0d arm: Add initial memory barrier functions
* These likely need reviewed by someone better
  at arm assembly. (#10537)
2014-02-12 23:11:11 -06:00
Jérôme Duval 7202cfb455 build fix follow up on status_t/ssize_t changes.
* added a TODO in packagefs.
2014-02-11 18:26:41 +01:00
Adrien Destugues 19f3bae071 Fix more issues detected by gcc4 compiler:
More ssize_t/status_t mixup.
2014-02-11 17:51:22 +01:00
Adrien Destugues 6555120f3b ...and also fix a mismatched prototype
gcc2 doesn't seem to notice.
2014-02-11 13:26:32 +01:00
Adrien Destugues 00dfae0bce Fix build.
Sorry, renaming headers isn't detected by Jam and not everything was
rebuilt.
2014-02-11 12:50:27 +01:00
Adrien Destugues 36b1f55a18 DynamicBuffer: implement BDataIO
This makes it possible to use it with the ZlibDecompressor.
2014-02-11 12:06:41 +01:00
Adrien Destugues 9af2105d36 Move ZlibDecompressor to libshared
* This will be used to implement compressed http streams
* Remove the custom BDataOutput class, and use BDataIO instead, for
easier integration with existing code.
2014-02-11 12:06:38 +01:00
Adrien Destugues b8c44b4c3f BAffineTransform: C++11 compatibility fix
inline const floats are a gcc extension. It is possible to do it in a
standard way in C++11 using constexpr, but then gcc will reject the
previously accepted nonstandard syntax.
2014-02-07 14:42:51 +01:00
Ingo Weinhold 32cae72412 package daemon: Handle location info request in app thread
* ... instead of queuing it for the job thread. The advantage is that
the request will be handled immediately and clients won't have to wait
for transactions (which may even require user feedback) to finish. It
complicates Volume a bit, since there are now two threads that may
access it. The shared data have been moved to a State object which is
protected by a lock.
* For commit transaction requests check whether another package request
is already pending/in progress before queuing a job. Fail immediately,
if there is.

Fixes bug #10039.
2014-02-07 01:21:57 +01:00
Pawel Dziepak a96e17ba9d kernel: Adjust load tracking interval 2014-02-06 03:23:28 +01:00
Stephan Aßmus 2e7da8455a Fixed execute bits of AGG headers. 2014-02-04 23:51:49 +01:00
Stephan Aßmus a6db6bd40f Added WIP support for affine transformations to BViews.
Everything untested, but compiles, so it must work. The idea is to introduce
BAffineTransform additionally to the existing Origin and Scale properties of
BViews. One may use it in parallel or as an alternative. Painter in app_server
is not yet aware of the additional transformation. It is however already used
to transform drawing coordinates. It probably needs to work differently,
perhaps only in Painter and AGGTextRenderer.
2014-02-04 22:53:06 +01:00
Alexander von Gluck IV 339a018112 radeon_hd: Rework dp aux functions to take connector index
* This is less pretty, but we need access to the connector
  to find the HPD gpio pin mask on the card.
* dp_aux communications seem to work again.
* If you have a DisplayPort item attached to your card you
  may want to just unplug it at this point. We attempt DP
  link training and it fails. This failure will also cause
  other monitors to not function as app_server still isn't
  multi-head aware (#10486)
2014-02-03 20:20:13 -06:00
Jonathan Schleifer b55c918f57 Import gnuregex 0.12 and remove hardcoded paths
This is required on OS X and other systems which do not have the glibc
extensions for regular expressions (FreeBSD is not one of them as it
already includes gnuregex in /usr). With this there are no hardcoded
non-standard paths for OS X anymore.

regex.c and regex.h are from the official gnuregex 0.12 distribution,
the only modification is that I added __BEGIN_DECLS and __END_DECLS to
regex.h.
2014-02-03 18:27:35 +01:00
Alexander von Gluck IV 8ebdc440de radeon_hd: Better tracing. Fix DP ack bitwise shift 2014-02-03 06:44:28 +00:00
John Scipione 77acb43273 TextView: Remove Cmd+Up and Cmd+Down Shortcuts
to go to the beginning and end of the document.
2014-02-01 11:04:34 -05:00
John Scipione 0875173246 TextView: Update nav shortcuts again
Make Cmd+Left and Cmd+Right work the same as Option+Left and
Option+Right, that is, they do word-wise navigation.

Make Option+Up go to beginning of paragraph and Option+Down go to end
of paragraph like Cmd+Left and Cmd+Right used to.

Unfortunately option shortcuts are currently eaten by S&T until #9431
gets fixed.
2014-01-31 18:30:07 -05:00
John Scipione eb774c2948 TextView: Update navigation shortcuts
* Command+Left goes to beginning of line, ignoring softwrap
* Command+Right goes to the end of line, ignoring softwrap
* Home goes to beginning of line, accounting for softwrap
* End goes to end of line, accounting for softwrap
* Option+Left goes to previous word
* Option+Right goes to next word
* Command+Home and Command+Up go to beginning of document
* Command+End and Command+Down go to end of document

Shift with any of the above also selects the text.

This is similar to how the text editor Eddie works.
2014-01-30 19:48:31 -05:00
Pawel Dziepak 527da4ca8a x86[_64]: Separate bootloader and kernel GDT and IDT logic
From now on bootloader sets up its own minimal valid GDT and IDT. Then
the kernel replaces them with its own tables.
2014-01-28 00:44:02 +01:00
Adrien Destugues 50df6e9824 Add missing pipe character in KDL keymap.
For non-US keyboards, the extra 102th/105th key is used to reach \. But,
we also need it to report | when shifted (this is the key left to
"enter").

This affects only USB keyboards. Thanks to gordoncjp for reporting!
2014-01-27 10:57:11 +01:00
Ingo Weinhold c41356fab5 BAppFileInfo: Add method versions that don't touch the MIME DB
Add SetSupportedTypes() and SetIcon[ForType]() versions with an
additional bool updateMimeDB parameter. If false, the method doesn't
update the MIME DB entries for the type.
2014-01-26 13:43:04 +01:00
Ingo Weinhold 3b07762c54 BAppFileInfo: Coding style update
Also remove doxygen comments.
2014-01-26 13:43:04 +01:00
Ingo Weinhold ee2974dadb mime/Database: Add SetIcon[ForType]() BBitmap* version
When switching AppMetaMimeCreator from BMimeType to Database the
SetIcon[ForType]() calls with a BBitmap* ended up calling the vector
icon version with the icon_size as the data size argument, thus not only
not writing the bitmap icon attributes, but also clobbering the vector
icon attribute.
2014-01-25 11:53:47 +01:00
Ingo Weinhold 6ef57ae2a9 pkgman: Add full-sync command
* BSolver/LibsolvSolver: Add FullSync() method. It uses libsolv's
SOLVER_DISTUPGRADE mode.
* BPackageManager: Add FullSync() using the new solver mode.
* pkgman: Add full-sync command.

The new command is similar to the update command without arguments, just
more aggressive, allowing downgrading or even removal of packages, to
match the state of the repositories. Just like "update" it doesn't work
properly yet.
2014-01-25 10:47:35 +01:00
Pawel Dziepak 82bcd89b92 kernel: Add CPUSet::{Clear, Set}BitAtomic() functions 2014-01-24 13:59:58 +01:00
Pawel Dziepak 03451e4cc1 kernel: Fix deadlock with thread sending signal to itself
UserEvent can be fired from scheduler_reschedule() i.e. while holding current
thread scheduler_lock. If the current thread goes sleep and during reschedule
one of its timers sends a signel to it, then scheduler_enqueue_in_run_queue()
attempts to acquire again its scheduler_lock resulting in a deadlock.

There was also a minor issue with both scheduler_reschedule() and
scheduler_enqueue_in_run_queue() acquiring current CPU scheduler mode lock.
2014-01-24 13:59:58 +01:00
Adrien Destugues d417133ed2 Fix cookies with far expiration date.
Some websites set cookies expiring in the (not so) far future, after year 2038.
So, using time_t to store the cookie expiration date won't do. Use the
BDateTime class instead.

This makes goodsearch.com login work again (#10460).
2014-01-23 17:22:46 +01:00
Stephan Aßmus 14652ec4bb trim support code: The passed in MemoryDeleter was never used.
When a buffer has to be allocated, I guess the intention was to
assign the MemoryDeleter to it, so that it would later be freed.
CID 1130505
2014-01-22 22:23:31 +01:00
Rene Gollent 701a5d6b79 Resolve #10435.
Adjust Database{Location} to only attempt to create a mimetype when
actually necessary, and fail otherwise if a writable version doesn't yet
exist. Correspondingly, adjust callers such as
DatabaseLocation::DeleteAttribute(). Fixes a problem where a caller asking
to perform a mimeset could fail early due to SetSupportedTypes() attempting
to update the read-only mime database entry supplied by a package, and
consequently most of the mimeset operations would be skipped.
2014-01-20 20:52:32 -05:00
Alexander von Gluck IV 14919567d1 kernel: Add more architecture code post-scheduler
* Fix incorrect cpu vendor name mapping
* Add additional CPU architectures
* Add additional CPU vendors
* Rework PowerPC arch_system_info passing
  PVR back for cpu model
2014-01-19 21:53:56 -06:00
Pawel Dziepak e1720098c6 kernel: No need for arch specific ifdefs in arch/atomic.h 2014-01-20 04:09:17 +01:00
Alexander von Gluck IV c9e66bfc9b kernel: Add missing smp memory barrier calls. Set max cpu to 1
* Set max cpu to 1 for PPC until atomic functions are finished
* We have atomic functions inline in the kernel and assembly
  code in libroot post-scheduler merge... isn't that a lot of
  duplication?
2014-01-19 19:33:21 -06:00
Pawel Dziepak 32d1afe024 Remove B_CPU_x86_VENDOR_MASK 2014-01-20 00:31:38 +01:00
Alexander von Gluck IV fb8026e82b kernel: Add missing PPC CPU functions for idle / pause 2014-01-19 14:38:01 -06:00
Alexander von Gluck IV 524bea3553 kernel: fix missing cpu cache defines non-x86
* Regression introduced due to scheduler change
* Other other non-x86, non-ppc, and non-arm platforms
  need evalulated for this metric
2014-01-19 14:27:09 -06:00
Alexander von Gluck IV 6647d2c95a kernel: fix missing SMP_MAX_CPUS on non-x86
* Regression introduced due to scheduler change
* Drop MAX_BOOT_CPUS as it is no longer used
2014-01-19 14:09:51 -06:00
Adrien Destugues fed5e6126b LocaleRoster: race condition on catalog loading.
Using a vint32 isn't enough to safely decide if the catalog is
initialized or not. Use init_once features instead.
2014-01-19 12:12:57 +01:00
Ingo Weinhold 8540ec2446 Save previous session's debug syslog during boot
Add boot loader debug menu option "Save syslog from previous session
during boot". If enabled (defaults to true), the previous session's
debug syslog data is copy to a separate buffer and passed to the
kernel, which writes it back to the file /var/log/previous_syslog.
As long as Haiku still boots, this should now be the most convenient way
to retrieve the output from a kernel crash.
2014-01-19 10:46:00 +01:00
Adrien Destugues ef726c687a Intel_extreme: improve i855 support.
https://github.com/druga/haiku-stuff/tree/master/intel_extreme
Rebased against current sources.

* The BIOS video mode sometimes reports a scaled mode instead of the
physical panel dimensions. Get the data from the VBT table as well, and
use it if the reported resolution is bigger.
* On first boot, force the panel native mode so the user doesn't have to
set it manually.
* Only allow a single head at a time on i855gm, as the card can't drive
both heads at the same time.
* Detect when a new requested mode is the same as the current one, and
skip modesetting in that case. Avoids screen flickering when changing
workspaces.
* Fix some cases of misdetecting which pipes to enable
2014-01-17 12:42:20 +01:00
Adrien Destugues e1caa56b1e Add another mssing string::compare prototype.
Matches buildtools change 8b70c20ed25f905e7e217376c9e2f65a8dee6729.
2014-01-17 10:00:32 +01:00
Pawel Dziepak d0f2d8282f Merge branch 'scheduler'
Conflicts:
	build/jam/packages/Haiku
	headers/os/kernel/OS.h
	headers/os/opengl/GLRenderer.h
	headers/private/shared/cpu_type.h
	src/add-ons/kernel/drivers/power/acpi_battery/acpi_battery.h
	src/bin/sysinfo.cpp
	src/bin/top.c
	src/system/kernel/arch/x86/arch_system_info.cpp
	src/system/kernel/port.cpp
2014-01-17 04:06:15 +01:00
Pawel Dziepak 79c9b824e4 libroot: sync() should not return any value 2014-01-16 20:18:22 +01:00
Adrien Destugues 67af469ef0 Fix time_t/bigtime_t mixup.
Thanks stippi for noticing!
2014-01-16 09:41:01 +01:00
Adrien Destugues 5ebdc79955 SecureSocket: add some certificate support
* Instead of creating an OpenSSL context ofor each socket, use a global
one and initialize it lazily when the first SecureSocket is created
* Load the certificates from our certificate list so SSL certificates
sent by servers can be validated.
* Add a callback for signalling that certificate validation failed, the
default implementation proceeds with the connection anyway (to keep the
old behavior).
* Introduce BCertificate class, that provides some information about a
certificate. Currently it's only used by the callback mentionned above,
but it will be possible to get the leaf certificate for the connection
after it's established.

Review of the API and implementation is welcome, before I start making
use of this in HttpRequest and WebKit to allow the user to accept new
certificates.
2014-01-15 17:45:21 +01:00
Alexander von Gluck IV 7c28f77332 system: Improve AMD CPU detection
* Several CPUID's were thrown into the Athlon 64
  catch all.  Add Sempron 64 and correct CPUIDs
  solves #9553
* Add better AMD A-Series detection
2014-01-14 20:24:02 -06:00