Commit Graph

4862 Commits

Author SHA1 Message Date
Axel Dörfler b4c1445fae * Fixed build when Debug.h had already been included.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-02 16:08:13 +00:00
Stephan Aßmus ac754ba0a2 Patch by Brecht Machiels: Add operator==() to BRegion. Thanks a lot!
Also fixed some coding style inconsistency.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29849 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-01 12:39:44 +00:00
Stephan Aßmus bfc1a92f88 Make BColumnListView layout-friendly.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29848 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-01 12:35:06 +00:00
Stephan Aßmus 827c6cd4d6 Sorry, should have been part of last commit. Fixes the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29842 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-31 21:35:59 +00:00
Stephan Aßmus 6104360c70 Header indentation and *-style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29835 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-31 19:02:04 +00:00
Stephan Aßmus f247113640 Added DecoratorFrame() method, which returns the outer frame of the window
on screen (ie including the decorator border and tab). Plus the necessary
refactoring as well as some TODO notes about windows with the tab on the left
side.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29820 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-31 13:34:16 +00:00
Axel Dörfler 8d8da849c8 * Added missing MaxSize() implementation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29819 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-31 13:01:42 +00:00
Ingo Weinhold 328029e178 Patch by Alexander von Gluck (kallisti5) to get the PPC build going again
(mostly at least). Also disables -Werror for the binutils, but those should
be fixed eventually.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29804 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-30 15:00:10 +00:00
Karsten Heimrich 420a34c45e * add documentation
* add some more operator
* adjust some functions to behave properly an invalid values



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29792 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-29 20:18:16 +00:00
Rene Gollent dc707c28aa Small cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29784 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-29 16:53:38 +00:00
Ingo Weinhold 002c9410ed Missing "struct thread" declaration, breaking the PPC build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-29 14:43:36 +00:00
Axel Dörfler aa87523e3c * This should have been part of r29776 and fixes the build. Thanks Alexandre!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29777 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-29 13:54:44 +00:00
Karsten Heimrich f7b619c91f * quick build fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29765 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-28 20:52:08 +00:00
Stephan Aßmus 4f57909806 Introduce the possiblity to draw certain frames with alpha blending on top of
an existing background. It's not supported by many frame types yet, but BButton
and TextControl frames work as well as the soft recessed frame which many
controls use.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29762 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-28 19:37:43 +00:00
Stephan Aßmus 53eaeede6f * Moved the bitmap filter options to InterfaceDefs.h.
* Moved the bit in order not to clash with the tile options.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29754 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-28 14:09:14 +00:00
Stephan Aßmus 1719f7a63e Patch by JiSheng Zhang: Update the FireWire stack and tools to the current
FreeBSD version (r188928). Note to JiSheng: I did have to fix fwcontrol.c line
111, looked like a last minute change to me.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29752 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-28 10:01:21 +00:00
Oliver Ruiz Dorantes d081e691a0 - Add Strings for bluetooth events
- Use then in bluetooth server output



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29750 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-28 01:03:05 +00:00
Rene Gollent 0296b82ae6 Add several extra scheduler hook functions to allow the scheduler(s) to maintain private housekeeping data on the thread structs. These hooks are called on thread creation/destruction and when prepping a thread for use. Review welcome.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29721 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-26 00:58:20 +00:00
Ingo Weinhold 3cf43c2651 Removed the fs_vnode_ops::create_dir() parameter for returning the ID of the
newly created dir. The VFS really doesn't need it and for some file systems
it might not be easy to get by. Several file systems (e.g. rootfs and fat)
were ignoring the parameter anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29719 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-26 00:16:34 +00:00
Stephan Aßmus 681c2e4425 The button and menu field draw routines take a background color into account,
which makes the resessed frame blend better with the surroundings. This can
be seen best in Keymap, where a different color is set on some buttons, but
the resessed frame should still be the same across all those buttons.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29716 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-25 23:34:19 +00:00
Karsten Heimrich c26731ec52 * add default constructor
* fix broken Time_t function
* take the missing days into account when adding months



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29713 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-25 22:31:11 +00:00
Karsten Heimrich 09fde55c7f * revert r29708, need to change some more stuff
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29709 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-25 21:03:21 +00:00
Karsten Heimrich 6d585c1cb0 * fixed broken Time_t since i changed BDate to be able to go back before 1970
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29708 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-25 20:49:46 +00:00
Stephan Aßmus 0699a8833e Sorry, this fixes the build. I accidentally commited headers/os/interface
instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-25 14:53:10 +00:00
Ingo Weinhold 474d27da32 Added RWLockable and RWLockManager classes. The former is basically a
light-weight read-write lock, that doesn't use a semaphore itself. Locking
and unlocking has to be done via methods of RWLockManager. This combo allows
lots of locks without risking to hit the semaphore limit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29686 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-24 23:13:56 +00:00
Ingo Weinhold a3ff5c0561 * Added missing inclusion of <stddef.h>.
* Added AutoLocker constructor with the locking strategy as parameter.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29685 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-24 23:09:49 +00:00
Stephan Aßmus 62b9a2ce0e * Header cleanup.
* Removed dead code which was for drawing a BButton like R5.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29677 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-24 13:26:56 +00:00
Oliver Ruiz Dorantes dd5df90570 - Remove size output parameter creating commands
- Add support for reading the size of internals buffers of the bt chips
- Add support for Resetting the Device
- Add broadcom vendor command fro writting the bdaddr
- clean up the debug output



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29669 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-23 23:07:07 +00:00
Stephan Aßmus 47e745c6db * Fixed the unified menu bar width calculations. SetDivider() got it wrong.
* _InitMenuBar() had the meaning of fixedSize reversed. The layout-mode
  constructors pass fixedSize = true accordingly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29664 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-23 12:16:10 +00:00
Stephan Aßmus 74bb70aef9 Moved the BScrollView frame drawing entirely into BControlLook.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29661 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-23 11:19:31 +00:00
Stephan Aßmus cda78e4f8e Fixed more inconsistencies in layouting the menu bar. These would mostly
result in the BMenuField not always drawing all of the frame around the
menu bar correctly, for example cutting off at left for divider = 0.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29660 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-23 11:18:26 +00:00
Jérôme Duval 89bbd37a10 updated freetype to 2.3.9
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29657 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-22 23:19:15 +00:00
Ingo Weinhold 39d58e2f49 Experimental approach to tackle the problem with Be's negative error codes and
ported software:
* If the macro B_USE_POSITIVE_POSIX_ERRORS is defined the POSIX error code
  constants (ENOMEM, EINTR,...) will have positive values.
* Introduced the macros B_TO_{POSITIVE,NEGATIVE}_ERROR() which do convert a
  given error code to a positive/negative value.
* Added static library libposix_error_mapper.a that overrides all POSIX
  functions (save the ones I forgot to add :-)) directly meddling with error
  codes (having them as parameter or returning them) dealing with the
  positive<->negative error code conversions. The functions have hidden
  visibility, so they affect only the shared object they are linked into.
* So ideally all one has to do is to build a ported software with
  -DB_USE_POSITIVE_POSIX_ERRORS and -lposix_error_mapper and be good with
  respect to error code problems.
* Potential issues:
  - When mixing ported and Haiku native code, i.e. using Haiku native code in
    a ported software or using a ported library in a Haiku native application
    care must be taken to convert error codes where the two interface. That's
    what the B_TO_{POSITIVE,NEGATIVE}_ERROR() macros are supposed to be used
    for.
  - A ported static library can obviously not be linked directly against
    -lposix_error_mapper. The shared object linking a against the ported static
    library has to do that. The previous point applies when that causes mixing
    with Haiku native code.
  - When dependent ported libraries are used probably all of them should use
    the error mapping.

Comments welcome.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29653 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-22 15:43:03 +00:00
Ingo Weinhold 89569e1852 * Include <Errors.h> -- we're checking for an error constant.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29644 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-22 01:33:47 +00:00
Oliver Ruiz Dorantes 3fdaa5bf72 - Drop R5 compatibility by removing first 4 bytes in the IOCTLs containing the size of the command.
- Implement mechanism GetProperty to retrieve detailed information about the LocalDevice
- Generic BluetoothDevice interface changed and adapted
- Implement ReadLocalVersion to be aware of the bluetooth specification supported by our localdevice



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29639 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-21 21:38:00 +00:00
Oliver Ruiz Dorantes bd88ac9707 - Move and implement some helper functions to a non private header(revision version etc)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29637 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-21 21:18:51 +00:00
Stephan Aßmus 22920adf3e Added a way to remove the application flags from the BAppFileInfo. The
flags would not tell anything, since B_SINGLE_LAUNCH equals 0.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29636 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-21 21:16:23 +00:00
Stephan Aßmus 40a10e1c52 Added method to draw an arrow shape like that of the BScrollBar.
TODO: Adjust BScrollBar to use it.
TODO: Make it virtual like the others, but I don't want to break Vision and
other native Haiku apps just now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29630 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-21 17:22:56 +00:00
Ingo Weinhold 08edcdfb61 Added interface constant for FUSE.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29617 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-20 01:15:26 +00:00
Ingo Weinhold 98092e9867 gcc 4 fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29602 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-18 22:43:47 +00:00
Stephan Aßmus 1a72cb4139 Make BMenuBar background drawing more flexible and also support an "activated"
state.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29597 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-18 17:18:06 +00:00
Ingo Weinhold 270ef7be8c Don't go for pre 2.5 compatibility.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29594 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-18 16:39:46 +00:00
Ingo Weinhold e72a9b541a Imported FUSE 2.7.4 includes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-18 16:24:08 +00:00
Axel Dörfler 3f78b216ad * Implemented a basic notification mechanism. Right now, only media changes and
device additions/removals can be monitored.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29582 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-18 08:55:49 +00:00
Ingo Weinhold 4649fe05ef * Haiku kernel interface emulation: Retrieve the capabilities for each vnode.
We do some caching using a hash table indexed by the operations vector.
* Pass the vnode capabilities to the kernel module.
* In the kernel tailor the operation vectors for volumes and vnodes passed to
  the VFS according to the respective capabilities. This way those vectors look
  pretty much like those from the client FS. This saves unnecessary calls when
  hooks are not implemented and should also fix compatibility problems in cases
  where not implementing a hook and returning an error don't mean the same to
  the VFS.
* Inlined some of the kernel module Volume class getters.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29572 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-17 18:51:43 +00:00
Ingo Weinhold fabcaf1c0a Added GetHashCode() method and == operator.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29571 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-17 18:30:33 +00:00
Ingo Weinhold b19ee1e164 * Port:
- Send() now also gets the message to send as parameter.
  - Added methods to reserve and unreserve space in the buffer.
* RequestAllocator: Uses the port buffer reservation methods now. This allows
  to let more than one RequestAllocator use a Port in a stack-like manner.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29565 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-17 01:24:31 +00:00
Ingo Weinhold c1f05b2803 Got rid of Port::GetMessage[Size]().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29564 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-17 00:46:40 +00:00
Ingo Weinhold 60f4376e26 * Removed the unused Port::SendAndReceive().
* Change Port::Receive() semantics. It does no longer use the buffer associated
  with the object. Instead it allocates heap memory for the caller. Since
  there's only one caller who clones the message anyway, we save one copy this
  way (though we have an additional syscall in userland) and don't overwrite
  a request being prepared for sending.
* Changed RequestAllocator::ReadRequest() to also read the request from the
  port.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29563 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-17 00:33:07 +00:00
Stephan Aßmus a6f9e71c98 This should fix ticket #3481 again. It keeps the same semantics as before when
the header is used for compiling with -std=c99 or -std=gnu99 and GCC4, which
has a reverted meaning of "extern inline" (now standard compliant).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-16 09:40:33 +00:00
Ingo Weinhold 3967230d7f Reverted r29471. It breaks building kernel code including this heaader in
debug mode with gcc 2.95.3.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-15 23:45:05 +00:00
Ingo Weinhold c76e8d36fb * Implemented forwarding the do_iterative_fd_io() callbacks to userland.
* Pass the request offset and length with the DoIORequest. This allows us to
  already get the first vecs for do_iterative_fd_io() in userland, saving a
  trip back and forth.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29546 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-15 18:24:14 +00:00
Axel Dörfler 51755cf832 * Added DefaultNotificationService and DefaultUserNotificationService
implementations that can be used by subsystems that want to have a pretty
  standard service. Only the latter is really complete, though.
* The notification manager is now available earlier in the boot process.
* Added notifications to teams/ports (only add/remove).
* The network notification implementation is now using the
  DefaultUserNotificationService.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29543 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-15 10:21:56 +00:00
Ingo Weinhold 687e02f945 * Forward the io() and cancel_io() hooks. Implemented the missing kernel
part.
* Implemented a good part of the kernel part for the support of
  do_iterative_fd_io(). The forwarding of the callbacks are missing yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29540 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-15 02:49:05 +00:00
Oliver Ruiz Dorantes a7c3c46562 - Created an experimental(more c++ & templatized) way to create bluetooth commands
- Add strings for all bluetooth manufacturers
- Add a bunch of strings for each command
- Add methods to get string given a manufacturer code or a command code



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29526 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-14 17:54:42 +00:00
Ingo Weinhold 7c1ffcb9ec * The nature of asynchronous I/O is to be asynchronous. So we can't store
an on-stack structure for the request in a hash table when forwarding the
  io() hook. Create a new object (HaikuKernelIORequest) instead and store it
  in a hash table in HaikuKernelFileSystem.
* Some work on the userland side of do_iterative_fd_io().
* Added some missing requests in UserlandFSUtil::is_{kernel,userland}_request().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29505 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-14 02:32:25 +00:00
Ingo Weinhold f451e14bc2 Added InitCheck() method.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29487 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-13 02:05:10 +00:00
Oliver Ruiz Dorantes b44ee58331 Add creation of local version infomation command
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29475 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-11 21:43:01 +00:00
Oliver Ruiz Dorantes d834120754 Show BluetoothAdress in correct order
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29474 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-11 21:26:21 +00:00
Michael Lotz 5b9d5a2ec9 * Add has_debugger_command() so whether or not a debugger command is available
can be checked.
* Make the usb_keyboard module check the presence of the needed debugger
  commands to avoid the error messages in case of them being unavailable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29472 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-11 12:17:23 +00:00
Stephan Aßmus 105c63e8cd To avoid problems of reversed meaning of "extern inline" in
GCC 4.3 and above (conforming to the standard when compiled with -std=c99
or -std=gnu99), define the inline functions as "static inline". I've had
another patch that maintains the previous behavior, but as titer pointed
out, we have no code in our repo that overrides the inlined functions
with their own version, and doing so for any other code would be
problematic, since for example Linux libio.h #defines these as macros.
In any case, I don't really know what I am doing, so please correct me
if I did something stupid! :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29471 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-11 11:21:52 +00:00
Ingo Weinhold b302c77c1b Missed that part. The request definitions for the io() and cancel_io() hooks.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29470 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-11 02:08:03 +00:00
Ingo Weinhold b538ceb816 Added dup_foreign_fd() to duplicate a FD from another team.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29468 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-11 00:57:17 +00:00
Ingo Weinhold aa4ba93e25 * Renamed src/system/kernel/device_manager/io_requests.{h,cpp} to
IORequest.{h,cpp}.
* Introduced public <io_requests.h> header. Currently it only declares the
  single function BFS uses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29446 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-08 17:30:37 +00:00
Alexandre Deckner 3fd2ea61ce * Update ref count later in _AddReplicant and add one check to be sure we checked all possible errors.
* Moved new statics to the cpp file as it seems we don't usually expose such internals in our public headers


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29443 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-08 16:08:03 +00:00
Alexandre Deckner 37a89eb4e9 * Use ref counting to determine when to unload a replicants add_on image, fixes #2712.
* Don't delete fStream if we don't own it, would crash ShelfTest on quit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29439 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-08 14:18:06 +00:00
Jérôme Duval 2c9d779293 * pthread.h should include sched.h (bug #3516)
* semaphore.h should include fcntl.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29438 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-08 13:56:15 +00:00
Ingo Weinhold 484708d5d6 Removed the OpenHashTable implementation the UserlandFS used. Adjusted the
HashMap and HashSet classes to use the kernel utils OpenHashTable instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29429 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-07 21:21:10 +00:00
Ingo Weinhold 2d4fb82c0f Added TableSize(), CountElements(), and Clear() methods.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29428 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-07 21:19:15 +00:00
Ingo Weinhold aa085ffef9 * Removed UserlandFS shared Locker class. Instead use BLocker in userland and
RecursiveLock in the kernel.
* Several adjustments according to UserlandFS header changes.
* Re-added reiserfs to image.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29410 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-05 23:27:35 +00:00
Ingo Weinhold 2b0eb640d4 Inline class with BLocker interface wrapping a recursive_lock. Could probably
moved to headers/private/kernel/util.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29409 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-05 23:23:01 +00:00
Ingo Weinhold 8dcef9a6ad * Made ASSERT definition conditional to avoid clashes.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29408 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-05 23:17:18 +00:00
Ingo Weinhold a7edf1f7c0 Moved RECURSIVE_LOCK_HOLDER() macro to the header and fixed it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29407 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-05 23:15:15 +00:00
Ingo Weinhold c0509ccc29 Removed several shared userlandfs classes that exist as Haiku shared or kernel
util classes as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29404 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-05 22:02:59 +00:00
Ingo Weinhold 97b7c9a091 Handle file cache related requests in the kernel. The actual calls to the
file cache are missing yet -- requires some refactoring in Volume.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29402 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-05 21:10:43 +00:00
Ingo Weinhold 0dcccb4986 Implemented the client side of the file cache operations.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29401 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-05 00:43:06 +00:00
Ingo Weinhold 497681ca81 Added requests for file cache operations. Not used yet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29394 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-04 01:27:32 +00:00
Ingo Weinhold 0234794770 Implemented acquire_vnode() forwarding.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29391 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-04 00:01:27 +00:00
Ingo Weinhold fac733d2f6 Removed the remnants of the dispatcher mechanism.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29390 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-03 23:42:20 +00:00
Rudolf Cornelissen 6042b7b665 added 'block_acc' option in nvidia.settings to completely disable the acceleration engine. This lets my G72 run (not crash) for the first time when enabled. Note: Haiku becomes very slow in drawing in 32bit mode when the driver is running this way compared to vesa mode. I am assuming this is because of (too) fine-grained calling of the engine management functions. Never saw this effect AFAIK in BeOS.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29381 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-02 19:55:03 +00:00
Ingo Weinhold 2f1f4f54d6 * Renamed UserlandFSServer to userlandfs_server. It is expected to live in
/system/servers, now.
* Got rid of the dispatcher application. It was the entity the kernel module
  talked to when mounting a yet unknown FS. It started the client FS server
  applications. Now the kernel module starts them directly. They use
  respectively named ports, so the kernel module can find them when already
  running.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29377 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-02 00:37:14 +00:00
Ingo Weinhold 5ecc4b3775 * Introduced ref-counting for the I/O contexts.
* The I/O context related vfs_*() functions have io_context* instead of void*
  parameters/return values, now.
* vfs_new_io_context(): Lock the parent I/O context before getting its table
  size. Otherwise the table size could change until we do.
* vfs_resize_fd_table(): Fixed use of MutexLocker. We created only a temporary
  object, not one with function scope.
* Renamed load_image_etc() to load_image_internal() and added a parameter for
  specifying the parent team of the one to create.
* Introduced a kernel private load_image_etc() with a few more arguments than
  load_image().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29375 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-02 00:26:22 +00:00
Michael Lotz 9b9aa75aac * Implement basic support for the BSound parts of BSoundPlayer. Only one sound
at a time is supported and volume as well as start time are not taken into
  account. For reasons I don't feel like investigating right now all the
  BMediaTrack calls in the BTrackReader end up as pure virtual function calls
  though, so it's unusable for now.
* Fix leaking the temporary buffer in BSound.
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29374 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-01 23:22:30 +00:00
Michael Lotz 1b921108a7 Rewrote Sound.h and implemented most of BSound. Completely untested yet as the
BSoundPlayer functionality is yet missing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29372 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-01 20:56:19 +00:00
Ingo Weinhold 4ffdedd0f0 Missed to check this in earlier.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29357 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-28 18:51:23 +00:00
Ingo Weinhold 80ece78534 Added private get_image_symbol_etc() that can recursively search for a symbol
(similar to how dlsym() works).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29356 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-28 18:50:40 +00:00
François Revol 595d8a3b9c Fix for gcc4 build. Thx Monni.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29340 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-27 22:44:05 +00:00
Ingo Weinhold 42ef52132a Made usable from userland.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29335 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-27 16:11:57 +00:00
Ingo Weinhold cdebdeb0aa Some more work towards adjusting the UserlandFS to the current FS interface:
* Split the FSCapabilities bit mask into three bit masks for the FS, the
  volume, and the vnodes, since we have three independent FS interface
  structures, now. The latter is not supported in the kernel add-on, yet.
* Server:
  - Temporarily removed some things from the build (the BeOS interface
    and the cache implementations).
  - Some WIP in HaikuKernelVolume and [haiku_]kernel_emu.{h,cpp}.
  - Added HaikuKernelNode, which wraps fs_vnode for the client FS.
  The server is still quite a bit away from being buildable again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29323 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-26 00:09:43 +00:00
Ingo Weinhold 2bcdce290b First work towards adjusting the UserlandFS to the changed FS API. The
kernel module compiles again, though newer features like VM file support,
asynchronous I/O, and FS layers aren't supported yet. The userland code is
still completely out of sync and won't even compile.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29318 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-24 21:07:40 +00:00
Stephan Aßmus 8ee9217eec Improved the look of the slider triangle thumb. Still missing is the vertical
version.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29311 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-24 11:09:27 +00:00
Ingo Weinhold e1975d3353 * When a team debugger is installed automatically, the thread causing that is
stored now.
* Extended the debugger message for B_DEBUGGER_MESSAGE_HANDED_OVER by the
  causing thread.
* Also send B_DEBUGGER_MESSAGE_HANDED_OVER to the debugger to which the team
  was handed over. The message will be the very first one the debugger gets
  from the team in question.
* Some harmless refactoring (added thread_hit_serious_debug_event()).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29302 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-23 22:59:45 +00:00
Michael Lotz 6eba063647 * Added simplified possibility to schedule UHCI transfers from within KDL.
* Added debugger commands to resolve usb_ids to pipes.
* Adjusted the physical memory allocator to be usable in a slimmed down mode
  when running inside the kernel debugger.
* Implemented USB keyboard support for KDL through a kernel debugger add-on.
* Added kgetc() and made use of it where previously individual methods were used
  to ensure that reading characters always goes through the kernel debugger
  add-ons and the other methods.

This has some preconditions to meet though:
1) The keyboard must be in the boot protocol (currently the case but needs to
   be revisited once we have a full usb_hid).
2) The keyboard must be attached to a UHCI root port (i.e. not use EHCI or OHCI,
   also not through hubs unless those are USB 1.1).
3) the usb_hid driver has to be opened for this to work. This means that for the
   time between initializing USB and when usb_hid is opened by the input_server
   there is no keyboard support.

Also note that this has no way of detecting hot-plug, meaning that you can't
re-attach your USB keyboard from the hub to the root port once in KDL.

On the bright side of things, since this is a non-destructive mechanism it is
possible to enter and leave KDL without loosing the USB state.

Tested OK in QEMU, not tested on real hardware yet, will see in a few minutes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29291 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-22 20:46:27 +00:00
Oliver Ruiz Dorantes fa262f2273 Add prototypes to keep/use global Inquiry time
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29264 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-20 18:25:41 +00:00
Michael Lotz 49004dc730 Remove the additional fs_vnode_ops arugment from get_vnode() again as it's not
needed at all when used as intended. Thanks Ingo for the explanation on how this
is intended to work. Adjusted the overlay fs accordingly and updated/reverted
the changes to the other filesystems.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29250 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-19 18:13:01 +00:00
Michael Lotz b1a58597b9 Add a new fs_volume op all_layers_mounted() that is called when all layers have
been mounted. This is to allow layered filesystems to setup internal data that
requires all the sub/super volumes to be available.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29248 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-19 01:16:07 +00:00
Michael Lotz 3684e40bb8 * Introduce a (private) flag B_NO_HANDLED_INFO for install_io_interrupt_handler.
It causes the interrupt handler to be inserted at the very end of the list
  instead of at the top. It is intended to be used as a workaround when a
  interrupt handler cannot know if it actually handled the interrupt. This
  should never be used by native drivers. Also if we know that the result is
  not valid because of this flag we won't disable the vector in case we count
  many unhandled interrupts as those numbers are then unreliable.
* Moved B_NO_LOCK_VECTOR to be a private flag as well.
* Made the interrupt handler list a simple manually maintaned singly linked list
  instead of the doubly linked one used with insque and remque as it greatly
  simplifies things for such an easy use case and is more compact.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29241 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-17 21:41:51 +00:00
Philippe Houdoin 83aff015eb Fixed BTabs focus underline offset.
Fixed a typo in method name.

Please forgive me Stephan if I just screw your next commit...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29240 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-17 10:36:58 +00:00
Stephan Aßmus 13cd46dfa3 * Stronger BMenuField popup indicator.
* Softer recessed frame for BMenuField to distinguish more from BButton
  and make it slightly more similar to BTextControl.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29235 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-16 13:57:31 +00:00
Stephan Aßmus 2f86ba4557 Implemented a new look for the Haiku interface controls. It was
overheard that they looked too ninety-ish.
TODO: The code behind this is work in progress. The basic idea
is to extract all drawing code into a new class BControlLook,
of which there is a global instance be_control_look, instantiated
in InterfaceDefs.cpp. At the moment, all the old drawing code is
still there, and the usage of be_control_look is inside if-bodies
checking the instance against NULL. In another words, by not
instanitating be_control_look, you can revert back to the old look.
BControlLook's job is to provide reusable methods for drawing
certain types of frames, backgrounds and labels, so that application
developers can make controls that re-use the same drawing code
as built-in controls and adopt to changes made there. I have added
the notion of "borders". Each of the frame drawing methods can be
made to draw certain borders only, which is supposed to help when
controls shall visually attach. This feature is not fully explored
at all ATM.
TODO: Update BColumnListView header view and BStringItem text
spacing. Update other apps where it makes sense to use BControlLook.
For the moment, only Tracker and LaunchBox are updated. More...
NOTE: The new look is not very radically different, so that existing
apps do not immediately look too ugly or out of place.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29221 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-15 18:23:19 +00:00