Commit Graph

3375 Commits

Author SHA1 Message Date
Axel Dörfler
f75b8de3fc * Discarded the "parametersSize" parameter from various disk device manager
functions.
* Since we now use UserStringParameter, this fixes the missing null termination
  of the parameter string, and thus bug #4045.
* Removed UserMemoryParameter, as it's no longer in use.
* Adjusted syscalls accordingly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31779 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-26 17:27:27 +00:00
Axel Dörfler
6ef35ef770 * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31778 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-26 17:23:59 +00:00
Axel Dörfler
63c07622f6 * Some style cleanups, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31759 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-26 11:25:14 +00:00
Stefano Ceccherini
ab53bb2086 Export get_bytes_per_row() from InterfacePrivate.h, and use it in ServerBitmap
in place of the own rolled implementation. Comment typo fix.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31757 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-26 07:59:16 +00:00
Ingo Weinhold
d8c41ef38f Added support for containing BReferenceables of arbitrary actual type.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31744 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-25 00:20:53 +00:00
Ingo Weinhold
6feb776265 Alias Referenceable as BReferenceable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31743 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-25 00:20:06 +00:00
Axel Dörfler
bdee97bc3a * Applied slightly changed patch by Alexander von Gluck.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31708 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-23 08:22:01 +00:00
François Revol
ff84453736 [GSoC] [ARM] Patch by Johannes Wischert.
Add dummy args structs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31700 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-22 18:10:06 +00:00
Ingo Weinhold
0b11ecb18c * Always include the public arch_debugger.h headers. The structures defined
there are prefixed with the respective architecture name. Useful for remote
  debugging a different architecture.
* <x86/arch_debugger.h>: Introduced a structure for the FPU state, so that it
  isn't left to the debugger.
* Removed the _kern_get_thread_cpu_state() syscall. Was originally intended for
  bdb compatiblity, but isn't really needed.
* Kernel x86 arch_get_debug_cpu_state(): The use of fnsave was broken, since
  it reinits the FPU after saving the state. This resulted in weird results
  when debugging functions using the FPU. We now use fxsave, if available.
  Otherwise fnsave + frstor should be used -- not fully implemented yet.
  Same for arch_set_debug_cpu_state().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31682 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-21 22:18:39 +00:00
Axel Dörfler
13aa1795dd * It seems we always have to specify all flags to make it work; removed "flags"
parameter from start_system_profiler().
* Added stack depth, and interval parameters to it, though.
* Profiling the boot process is now possible.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31671 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-21 12:09:15 +00:00
Axel Dörfler
c755ecfe96 * Added an emergency key mechanism to the kernel, inspired by Jan Klötzke's
patch from about a year ago (I couldn't use any code of his yet, though,
  but there are a few things left). The emergency keys are triggered by
  pressing Alt-SysReq + key.
* By default, only Alt-SysReq+'d' is used as a means to deliberately enter
  the kernel debugger. F12 belongs to userland again, now :-)
* Debugger add-ons now have another optional method to implement their own
  emergency keys - 'd' for the debugger cannot be overridden, though.
* The mechanism can be turned off via a new kernel setting, so it's not that
  easy anymore to "crash" Haiku if you don't want to.
* Right now, the PS/2 driver, and the pre-input_server in-kernel debugger
  keyboard mini-driver support this, USB not yet.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31660 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-20 20:39:37 +00:00
Ingo Weinhold
7f96148cac Patch by Bryce Groff with changes by myself:
* Added missing name parameter to the partitioning system module child creation
  and child creation validation hooks. Pass the name to them.
* Added BPartitionParameterEditor interface, which is/will be used for editing
  disk system specific parameters.
* Implemented partition parameter editors for BFS initialization and Intel
  partition map child creation.
* Fixed the incorrect supported child partition type iteration in the Intel
  partition map add-on. It does now return actual types.
* Handle the "active" flag parameter in the Intel partitioning system module.
* DriveSetup:
  - Replaced the "Create" submenu by a simple menu item. The type can now by
    chosen in the dialog.
  - Make use of initialization and child creation parameter editors. Some
    non-generic code has been moved to the respective editor implementations
    (BFS, intel partitioning system).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31658 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-20 20:29:16 +00:00
Axel Dörfler
c7544c1390 * Enabled default time for shutting off the monitor (after 20 minutes).
* Removed BeOS R5 network password retrieval code.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31652 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-20 14:03:30 +00:00
Ingo Weinhold
b5d6fc7173 * Added missing bool type support.
* Added Bytes(), returning a pointer to the "raw" data, and Size(), returning
  the data size.
* Added SetToTypedData(), which initializes the object from a data buffer and a
  type code.
* Added SwapEndianess() to swap the endianess of the contained data (if
  possible).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31627 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-18 23:01:48 +00:00
Axel Dörfler
5fbad060b3 * Work-in-progress on a kernel profile service that can be evaluated from
userland afterwards.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31621 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-17 16:21:06 +00:00
Michael Lotz
b78c74fdc4 Fix GCC4 build. Duplicate parameter names generate a warning there.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31599 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-15 23:38:15 +00:00
Axel Dörfler
78888c44da Applied patch by Ma Jie adding functionality needed by mDNSResponder:
* added new protocol method process_ancillary_data_no_container() that does not
  need a container to fill the cmsghdr data.
* Added support for the IP_RECVDSTADDR option using this call.
* Implemented support for IP_MULTICAST_IF.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31585 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-15 11:53:29 +00:00
Ingo Weinhold
3b859de22e Added handy static method SizeOfType().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31538 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-13 18:33:06 +00:00
Ingo Weinhold
a365e1cfbb Patch by Bryce Groff, some changes by myself:
* devfs:
  - devfs_[un]publish_partition(): They no longer get the partition path as
    parameter, but rather the device path and the partition name.
  - Added devfs_rename_partition(), which renames an already published
    partition node.
* KPartition/KDiskDevice:
  - Replaced the fPublished flag by fPublishedName, the name under which the
    partition is published. This simplifies UnpublishDevice() and makes it
    practically infallible.
  - Added GetFileName(), which only returns the partition's file name.
    Simplified GetPath() by using it.
  - When a partition is added/removed the subsequent sibling partitions get a
    new index. Now we also rename their published device nodes (and those of
    their descendents). When something goes wrong we unpublish the concerned
    partition's device to be on the safe side. Would be a shame to accidentally
    format the wrong partition, eh? :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-11 14:35:04 +00:00
Oliver Ruiz Dorantes
111d946099 - Patch by Michael Weirauch, Finally a deskbar addon for bluetooth
- Functionality to stop services, start preferences, and show debug console
- Cleanups in signatures

-This line, and those below, will be ignored--

M    headers/private/bluetooth/bluetoothserver_p.h
M    src/servers/bluetooth/BluetoothServer.h
A    src/servers/bluetooth/DeskbarReplicant.cpp
A    src/servers/bluetooth/DeskbarReplicant.h
M    src/servers/bluetooth/Jamfile
M    src/servers/bluetooth/BluetoothServer.cpp
M    src/preferences/bluetooth/BluetoothMain.cpp
M    src/preferences/bluetooth/Jamfile
M    src/preferences/bluetooth/defs.h
M    src/preferences/bluetooth/BluetoothWindow.cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31508 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-10 15:12:51 +00:00
Ingo Weinhold
3edae90975 Added BinarySearchIndexByKey().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31491 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-09 23:24:55 +00:00
Clemens Zeidler
ceaa15b6a7 Forgot this, thanks to Andrea Bernardi!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31488 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-09 18:24:27 +00:00
Clemens Zeidler
a635614420 Battery interface for the driver.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31485 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-09 17:53:09 +00:00
Ingo Weinhold
1cc5e46925 Added offset and size parameters to create_child_partition() and
KPartition::CreateChild(). CreateChild() calls AddChild(), which publishes
the new partition, though at that point offset and size were not set, so that
the published devices would not be usable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31463 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-08 20:26:43 +00:00
Ingo Weinhold
9774f385b5 Added debug_get_symbol(). It's not implemented particularly efficiently, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31392 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-03 14:20:27 +00:00
Axel Dörfler
4e23bc0383 * BMenu now scrolls when you press page up/down, if possible.
* BMenuWindow no longer uses a fixed scroll step - instead, the menu sets it
  to the height of its first item.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31389 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-03 12:09:16 +00:00
Oliver Ruiz Dorantes
ddac407426 - Add initial code to unregister devices from server
- Handle Hardware error event
- Add function to retrieve an string from a bluetooth error
- Styling



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31376 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-02 20:07:26 +00:00
Ingo Weinhold
7aa7cb4b54 * Renamed {Add,Remove}Reference() to {Acquire,Release}Reference(). Methods with
the old names still exist as deprecated aliases for the time being.
* Introduced hooks FirstReferenceAcquired() and LastReferenceReleased(). Besides
  added flexibility this also makes the deleteWhenUnreferenced constructor
  parameter and the fDeleteWhenUnreferenced attribute superfluous, since the
  "don't delete" behavior can be obtained by overriding LastReferenceReleased().
  Parameter and attribute will be removed eventually.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31367 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-01 21:59:27 +00:00
Ingo Weinhold
59d799dabc * Moved the mapm library from src/apps/deskcalc to src/libs and headers/libs.
* Moved the ExpressionParser class to shared. It's now built into its own
  static library.
* Added hexadecimal number support to the expression parser as well as
  Evaluation*() methods to get a number instead of a string.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31298 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-28 17:10:40 +00:00
Rudolf Cornelissen
c8453f43a4 driver now sets up internal EDID info related to CRTCs next to earlier introcuded code for EDID info related to connectors which makes it much more useable later on. This commit also hopefully fixes the problem introduced in R31183 shutting off some screens in 'invalid' connector setups that the driver tries to correct.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31291 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-28 14:53:07 +00:00
Axel Dörfler
65b5dd5064 * DatagramSocket::InitCheck() returned the sem_id instead of a status_t, causing
pings to fail (raw socket initialization) after r31079.
* Further cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31238 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-25 16:01:11 +00:00
Ingo Weinhold
fab1c05c05 Split the commpage initialization into two parts. The second part is executed
after all CPUs have been queried for their features. On SMP machines
sysenter/sysexit weren't used before due to the non-boot CPUs appearing not
to have the feature.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31226 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-24 13:53:58 +00:00
Ingo Weinhold
6a1f462e72 * arch_debug_get_interrupt_pc() does now optionally return whether the iframe
is a syscall iframe.
* User debugger support: Don't to call BreakpointManager::PrepareToContinue(),
  if the thread returns from a syscall. We don't want to skip breakpoints in
  that case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31223 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-24 11:49:35 +00:00
Ingo Weinhold
b0f12d64f4 Added transparent software breakpoint support for user debuggers:
* The bulk of the work -- i.e. juggling the software and hardware breakpoints,
  watchpoints, and memory reads/writes -- is done in the new class
  BreakpointManager.
* For the architectures a few capability macros have to be defined, one
  pointing to the software breakpoint instruction opcode. Done for x86.
* Some more simplifications in the user debugger code, made possible by the
  recently introduced debugger_changed_condition attribute.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-23 21:03:57 +00:00
Ingo Weinhold
ba391bcc56 Added team_debug_info::debugger_changed_condition to serialize changes to the
installed team debugger and adjusted the code accordingly. It's not needed yet,
but I intend to add support for software breakpoints and those require a bit of
uninitialization that needs to be synchronized with debugger changes and can't
be done with interrupts disabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31194 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-23 01:39:51 +00:00
Ingo Weinhold
91393e7810 InterruptsSpinLocking:
* Removed unused inner struct State.
* Added work-around for the extremely annoying "fState my be used
  uninitialized" warning gcc 4 produces. I'm not aware of any solution that
  doesn't generate unnecessary code. :-/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-23 01:32:46 +00:00
Ingo Weinhold
5ea5f51d84 Changed ConditionVariable from class to struct to make it more C-friendly.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31191 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-22 23:49:05 +00:00
Ingo Weinhold
6dcc2a7e00 Made destroy_team_debug_info() static, as it's not used outside the source
file.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31190 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-22 23:46:55 +00:00
Ingo Weinhold
6cd189c997 Added BinarySearchIndex().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-22 21:41:16 +00:00
Rudolf Cornelissen
8bdea4194a doing preparations for using analog widescreen detection. if all is right the driver's behaviour hasn't changed yet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31183 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-22 20:33:17 +00:00
Stephan Aßmus
19e179ca4f * Moved the implementation of SetViewCursor from the thread of the
window of the view into the application thread. This solves the
  race condition with asynchronous SetViewCursor and deleting the
  cursor immediately afterwards for real.
* The ServerApp now requires a reference to the current cursor,
  just in case...
* Added TODOs for caching the BView token, it's currently resolved
  for every single BView call that talks to the server... not good!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31133 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-20 12:11:49 +00:00
Stephan Aßmus
5d62f8e0e5 Make it possible to properly use operator= on BCursors by making sure the
reference counting is maintained correctly in the app_server. While reviewing
this code, I have my doubts that my previous solution for handling pending
SetViewCursor() calls is always working as it is intended.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31131 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-20 10:10:01 +00:00
Ingo Weinhold
b7c5bd634b Renamed Variant to BVariant and moved it to libshared.a.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31127 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-19 23:00:25 +00:00
Axel Dörfler
3609af391d * Renamed _kern_reserve_heap_address_range() to _kern_reserve_address_range(),
and added a _kern_unreserve_address_range() as well.
* The runtime loader now reserves the space needed for all its areas first
  to make sure there is enough space left for all areas of a single image.
* This also fixes the final part of bug #4008.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31115 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-19 11:09:21 +00:00
Axel Dörfler
82db8a9e15 * Added an "unmapAddressRange" argument to the file mapping syscall. This is
the first part of making the runtime loader behave itself; it should already
  make Clockwerk run okay with any number of translators (even if not all of
  them will work yet).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31113 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-19 08:23:11 +00:00
Axel Dörfler
160f2d1081 * Added private header defining __gUmask which is now used everywhere where
needed.
* Some cleanup in Directory.cpp, and File.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31086 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-17 14:09:40 +00:00
Ingo Weinhold
568ade58d0 User debugger support:
* Generalized address checks. The debugger can now also read the commpage.
* Added new syscall _kern_get_thread_cpu_state() to get the CPU state of a
  not running thread. Introduced arch_get_thread_debug_cpu_state() for that
  purpose, which is only implemented for x86 ATM (uses the new
  i386_get_thread_user_iframe()).
* Don't allow a debugger to change a thread's "esp" anymore. That's the esp
  register in the kernel. "user_esp" can still be changed.
* Generally set RF (resume flag) in eflags in interrupt handlers, not only
  after a instruction breakpoint debug exception. This should prevent
  breakpoints from being triggered more than once (e.g. when the breakpoint is
  on an instruction that can cause a page fault). I still saw those with bdb
  in VMware, but that might be a VMware bug.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31045 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-14 12:14:06 +00:00
Jérôme Duval
581708b997 * fix the build by moving a typedef to public scope, and avoid returning a value in the destructor
* some clean up


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31025 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-13 10:42:11 +00:00
Oliver Ruiz Dorantes
80ee40e10c License header & style
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31016 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-12 18:25:57 +00:00
Oliver Ruiz Dorantes
c6083519e7 Make a bit more elegant the processing of bluetooth events
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31015 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-12 18:14:51 +00:00