Commit Graph

4795 Commits

Author SHA1 Message Date
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