Commit Graph

2377 Commits

Author SHA1 Message Date
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
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
32d1afe024 Remove B_CPU_x86_VENDOR_MASK 2014-01-20 00:31:38 +01: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
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
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
Jonathan Schleifer
76b12d6056 StackOrHeapArray: Add missing include of cstddef.
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2014-01-13 19:14:49 +01:00
Adrien Destugues
3d864cd870 Remove B_PROT_* and related code
Use standard error codes instead.
This allows using error code returned by the underlying functions
directly, and makes it possible to use strerror for debugging. So, we
can also remove StatusString() from the various *Request classes.
2014-01-13 08:05:32 +01:00
François Revol
586d22c9ba Fix function prototype to be valid C 2014-01-11 17:53:00 +01:00
Jonathan Schleifer
4bda0212ce Add BStackOrHeapArray. 2014-01-10 22:31:46 +01:00
Alexander von Gluck IV
aa4b5749d6 runtime_loader: Detect and trigger on PE binaries
* Previously PE binaries would trigger the "incorrectly
  executable" dialog. Now we get a special message for
  B_LEGACY_EXECUTABLE and B_UNKNOWN_EXECUTABLE
* Legacy at the moment is a R3 x86 PE binary. This could
  be extended to gcc2 binaries someday far, far, down the
  road though
* The check for legacy is based on a PE flag I see
  set on every R3 binary (that isn't set on dos ones)
* Unknown is something we know *is* an executable, but
  can't do anything with (such as an MSDOS or Windows
  application)
* No performance drops as we do the PE scan last
* Tested on x86 and x86_gcc2
2014-01-07 19:38:07 -06:00
Pawel Dziepak
81e04d7b97 kernel: Remove cpu_info::load
This field forces kernel to track each CPU load all the time. It is not
a problem with the current scheduler on a multicore systems, but on
single core machnies or with any other future scheduler this field may
become just an unnecessary burden. It isn't difficult for an application
to compute CPU load by itself when it needs it.
2014-01-03 19:44:57 +01:00
Adrien Destugues
5b53e2e516 HttpRequest: close the connection on Stop()
When calling Stop(), we expect the request thread to exit as soon as
possible. Closing the connection unlocks it from any blocking read() or
write(), avoiding some lockup situations.
2014-01-02 08:38:03 +01:00
Alexander von Gluck IV
f8da8f3477 ARM: Be aware of ARMEL and ARMEL
* My BeagleBone gcc defines __ARMEL__ but not
  __ARM__ which breaks the native tool builds
* As ARM was originally Little Endian, we assume
  __ARM__ means as such.
* Look for Big Endian ARM and define the needed big
  endian preprocessors
2014-01-01 23:41:02 -07:00
Ingo Weinhold
a0848a1916 BButton: Add optional pop-up marker
* Add behavior constant B_POP_UP_BEHAVIOR which adds a pop-up marker
  to the button (similar to that of BMenuField).
* Add methods [Set]PopUpMessage(). To set/get the the message that is
  sent to the button's target when the pop-up marker is clicked.
2013-12-30 04:42:52 +01:00
Ingo Weinhold
813c5772c9 BButton: Removed dead code
Remove methods _DrawDefault() and _DrawFocusLine() which were used for
the non-BControlLook drawing.
2013-12-30 04:18:33 +01:00
Ingo Weinhold
b998f9f02f BButton: Add support for toggle button behavior
Add methods SetBehavior(), Behavior(). Supported behavior constants are
B_BUTTON_BEHAVIOR -- normal button behavior -- and B_TOGGLE_BEHAVIOR
-- toggle button behavior.
2013-12-29 01:21:45 +01:00
Ingo Weinhold
b181fabe57 BButton: Remove left over attributes 2013-12-29 00:43:25 +01:00
Ingo Weinhold
a249edfbfc BButton: Add flat property
* Add methods SetFlat()/IsFlat(). A flat button doesn't draw its frame,
  unless the mouse is hovering over it or it is otherwise activated.
* As a side effect this change also activates the hover glow that was
  already implemented in BControlLook, but not activated in BButton.
2013-12-29 00:13:49 +01:00
Alexander von Gluck IV
eb45d168e1 GL: Remove OpenGL kit, x86 Mesa
* Depend on Mesa packages to provide functionality
2013-12-22 23:36:02 -06:00
Ingo Weinhold
97bf0ce362 BControl: Move icon code to separate class BIcon 2013-12-22 14:45:34 +01:00
Ingo Weinhold
5414b3c445 Move icon related constants to InterfaceDefs.h
There will be non-BControl views to use those as well.
2013-12-22 14:45:33 +01:00
Ingo Weinhold
f829889455 BCheckBox: Add icon support
* Draw(): Remove the non-BControlLook code.
* GetPreferredSize(): Implement based on _ValidatePreferredSize() to
  avoid code duplication.
* Draw(): Fix off-by-one error. The label was too close to the box.
* Draw(), _ValidatePreferredSize(): Add icon support.
  _ValidatePreferredSize() is now actually aligned with what Draw()
  expects. The preferred width is now a tight fit; there were three or
  four pixels of empty space before.
  Due to the fixed check box position the layout isn't that nice in
  some situations (particularly with an icon larger than the text),
  IMHO.
2013-12-22 04:48:21 +01:00
Ingo Weinhold
be4367428b BControl subclasses: Override SetIcon()
... and implement Perform() action for potential later use.
2013-12-22 02:48:27 +01:00
Ingo Weinhold
be260374d5 BControl: Add icon support
The icon is meant as an addition to or replacement of the label. Icon
bitmaps for various states of the control (off, on, partially on, each
enabled or disabled, plus up to 125 custom states) can be set
individually via SetIconBitmap() (getter IconBitmap()).
The convenience method SetIcon() can be used to set the bitmaps for the
standard states from a single bitmap; it also supports cropping the
icon to its non-transparent area. Code borrowed from BIconButton.
2013-12-22 02:48:25 +01:00
Ingo Weinhold
1b848ee7f2 BControlLook: Add DrawLabel() variants with icon
A label, a bitmap, or both can be specified.
2013-12-22 02:48:24 +01:00
Ingo Weinhold
8719e0dc4b BControlLook: Add methods for getting insets
* Update the previously unused frame_type and background_type enums.
* Add methods GetFrameInsets(), GetBackgroundInsets(), GetInsets() to
  get the insets for a given frame type, background type, or both
  respectively.
2013-12-22 02:48:23 +01:00
Ingo Weinhold
df37cd4edd BCheckBox: Add tri-state support
* Add possible control state B_CONTROL_PARTIALLY_ON and support it in
  BCheckBox and BControlLook.
* BCheckBox: Add partialStateToOff property defining whether the
  partial state should transition to off. Defaults to false (i.e.
  partial to on).
2013-12-21 02:12:04 +01:00
Ingo Weinhold
5d7f782d4e BLooper: Add DispatchExternalMessage()
* This is primarily a service method for ports of widget tool kits
  that require single-threaded GUI. DispatchExternalMessage() calls
  DispatchMessage(), but also sets fLastMessage, so that
  [Detach]CurrentMessage() work correctly. This allows to detach a
  message in DispatchMessage() when called from the window thread,
  add it to a global queue, and later process the queued messages in
  a different thread that calls DispatchExternalMessage().
* BLooper/BWindow: Make sure fLastMessage is accessed only when locked.
2013-12-20 15:47:23 +01:00
Pawel Dziepak
ad6b9a1df8 scheduler: Use sequential locks instead of atomic 64 bit access 2013-12-20 02:18:44 +01:00
Pawel Dziepak
1b06228f13 kernel: Propagate scheduler modes to cpu{freq, idle} modules 2013-12-17 23:26:37 +01:00
Pawel Dziepak
d02aaee17e kernel, libroot: Add more memory info in system_info
system_info now contains all information previously available only
through __get_system_info_etc(B_MEMORY_INFO, ...).
2013-12-16 04:53:46 +01:00
Pawel Dziepak
1bc7045fdf kernel, libroot: Introduce new API for obtaining system info 2013-12-16 03:58:43 +01:00
John Scipione
1e1afb3939 Updates to BOutlineListView for docs
mostly param naming.

No functional change intended.
2013-12-11 16:13:52 -05:00
Adrien Destugues
824dd0a834 Reintroduce BUrlResult and add BDataRequest
* BUrlResult is back, with ContentType and Length methods.
* BHttpResult subclasses it and use HTTP header fields to implement
those
* Introduce BDataRequest for "data" URIs. These embed the data inside
the URI, either as plaintext or base64 encoded.
2013-12-11 17:29:25 +01:00
Pawel Dziepak
bcfdf88186 apps, kernel: Remove B_MAX_CPU_COUNT 2013-12-06 21:57:58 +01:00
Pawel Dziepak
e736a456ba kernel: Forbid implicit casts between spinlock and int32 2013-11-29 03:36:31 +01:00
Jérôme Duval
e4e1cf9aff PCI: moved IDE api flags to PCI.h 2013-11-28 18:38:45 +01:00
Ingo Weinhold
01adde8502 BPackageInfo: Add ArchitectureName() 2013-11-27 15:38:42 +01:00
Ingo Weinhold
f96ed66270 BPackageVersion: Add comparison operators 2013-11-27 15:38:41 +01:00
Ingo Weinhold
ecd7a82e0d BSolverPackage: Add Version() 2013-11-27 15:38:41 +01:00
Adrien Destugues
509755e136 HttpRequest: remove fOutputBuffer
We can send the data directly to the output socket instead of copying it
into a BString first, at the cost of very slightly less information in
debug output.
2013-11-26 10:21:57 +01:00
Pawel Dziepak
7db89e8dc3 kernel: Rework cpuidle module
* Create new interface for cpuidle modules (similar to the cpufreq
   interface)
 * Generic cpuidle module is no longer needed
 * Fix and update Intel C-State module
2013-11-25 23:50:27 +01:00
Pawel Dziepak
1e8ed5558d cpufreq: Rank modules and choose the best one 2013-11-25 00:08:13 +01:00
Michael Lotz
dcc56bf748 BNetEndpoint: Fix socket leak and reduce Accept() overhead.
When using the copy constructor of BNetEndpoint the socket of the
original endpoint gets dup'ed. The Accept() method later directly reset
the fSocket member of the newly created BNetEndpoint to the socket
returned by accept(). The socket dup'ed by the copy constructor was
therefore leaked.

Of course dup'ing the socket and copying the local and remote addresses
is superfluous in the accept case, as these members all get set to new
values. To reduce that overhead there is now a new private constructor
that directly gets the final socket and remote and local address.
2013-11-24 22:36:29 +01:00
Ingo Weinhold
62b164bd71 BPathFinder: Add BPackageResolvableExpression initialization
Add a constructor and a SetTo() method with a
BPackageResolvableExpression parameter instead of a path. The path of
the package satisfying the expression is used.

The new functionality lives in libpackage as it uses the package kit.
2013-11-21 13:29:21 +01:00
Ingo Weinhold
88706cfaa5 package kit: Add API for parsing resolvable expression strings
* Add BPackageInfo::ParseResolvableExpressionString().
* Add BPackageResolvableExpression constructor and SetTo() taking an
  expression string.
2013-11-21 13:29:20 +01:00
Pawel Dziepak
308f594e2a kernel, libroot: Make scheduler modes interface public 2013-11-20 23:32:40 +01:00