Commit Graph

5709 Commits

Author SHA1 Message Date
Ingo Weinhold 09418c869b Added DebugGet() method for use in the kernel debugger.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36227 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 17:16:42 +00:00
Michael Lotz 2548ea219a * Add the framework for adding an arch specific module to the PCI bus_manager.
* Implement such a module for x86 which currently exports only an MSI API.
* Implement the PCI part for configuring and enabling MSIs.
* Some automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36223 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 15:18:46 +00:00
Michael Lotz 33fbe25496 * Add code to allocate and free interrupt vectors for message signaled
interrupts (MSI).
* Add the remaining IDT entries and redirection functions in the interrupt code.
* Make the PIC end_of_interrupt() return a result to indicate whether the vector
  was handled by this PIC. If it isn't we now issue a apic_end_of_interrupt()
  in the assumption of apic local interrupt, MSI or IPI. This also removes
  the need for the gUsingIOAPIC global and doing manual apic_end_of_interrupt()
  calls in the SMP and timer code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36221 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 14:46:09 +00:00
Axel Dörfler ef9dbf80c1 * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36218 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 13:36:53 +00:00
Axel Dörfler 15c81466c4 * Reverted part of r34474 that broke binary compatibility.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36212 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 13:01:56 +00:00
Axel Dörfler f46308c92a * More header cleanup, continuing korli's work.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36206 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 09:48:02 +00:00
Jérôme Duval d25dd4b920 some copyright headers clean up
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36203 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-12 21:02:09 +00:00
Oliver Tappe ab1a4bef4f cleaning up after myself 4 years later:
* remove matches_broadcast_address slot in address module, as it
  doesn't exist anywhere
* automatic whitespace cleanup



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-12 19:06:46 +00:00
Oliver Tappe 56f097ebd9 Applying patch by Atis Elsts:
* fix connecting to INADDR_ANY work for tcp (effectively will
  connect to INADDR_LOOPBACK)
* add same behaviour to udp
* move some ipv4-specific code out of tcp into ipv4 address module
* bind() and connect() now reject addresses from non-matching 
  families
* myself: minor cleanup in udp.cpp with respect to 80 chars limit
Closes #5716 - many thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36192 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-12 18:39:34 +00:00
Adrien Destugues 4343960f55 olta+pulkomandy:
* Introduce an add-on system to allow libbe to call things living inside liblocale (as liblocale depends on libbe, it can't be linked the usual way)
 * This allows localizing the BColorControl class that had some text inside it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36190 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-12 18:07:09 +00:00
Michael Lotz 3d310bd5f4 * Fix build, the APIC definitions are used in the bootloader too.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36189 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-12 15:59:40 +00:00
Axel Dörfler b289aaf66b * A BBuffer does not know where it came from, so
BBufferConsumer::BufferReceived() cannot know whom to send the "buffer is
  late" notification (unless we only have a single input). To solve this, the
  media_header now contains extra fields that can be used to create a
  media_source object.
* Unfortunately, BBufferProducer::SendBuffer() cannot know the output either in
  case there is more than one. Hence, I deprecated the existing SendBuffer()
  call and moved it into "private" - IOW old sources using it won't compile
  anymore under Haiku.
* I introduced a new SendBuffer() variant that also gets the media_source as
  argument.
* Updated all sources (that are part of the image) to use the new variant.
* Removed some purposely commented out code in the audio mixer.
* Implemented late buffer notification, as well as late buffer handling in the
  audio mixer; this is a bit of work in progress, so the debug output is left
  in there.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36184 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-12 13:15:46 +00:00
Michael Lotz 5819c3f9ff Forgot to remove these in the previous commit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36183 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-12 13:07:21 +00:00
Michael Lotz 655f3b4161 Seperate the generic (local) APIC stuff into it's own file and use it from the
other places where previously the same functionality was duplicated. Also
seperated the header which was originally arch_smp.h into apic.h and arch_smp.h
again as some of it is MP and not actually APIC.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36182 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-12 12:56:13 +00:00
Adrien Destugues e9024a3be5 * Build tools : allow to run DoCatalogs with a custom regexp for special cases
* Introduce a system-wide localization catalog used for strings hidden deep in some libraries. Add special API to get it.
 * string_for_size is the first to make use of this system wide catalog. This allows to have a fully localized DriveSetup.
 * As a side effect, tracker also uses it. It now requires liblocale.so.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36175 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 23:00:25 +00:00
Ithamar R. Adema f7b0c08cae This modifies the Postscript printer to be able to insert a pipe in between the Postscript generation
and the transport addon. The actual command use as pipe is retrieved from the PPD that can be selected
at printer creation time.

Currently PPD selection is not shown (as the PPD directory is not available) and therefore the pipe
will not be inserted.

This still needs a bit of TLC, so hope to commit the last changes to fully support this later this week.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36173 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 22:01:13 +00:00
Axel Dörfler 7c86c0a813 * Corrected comment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36171 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 20:45:23 +00:00
Axel Dörfler ee0d2be9e4 bonefish+axeld:
* Implemented a tiny bit more sophisticated version of
  estimate_max_scheduling_latency() that uses a syscall that lets the scheduler
  decide.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36170 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 20:40:58 +00:00
Ingo Weinhold 813d4cbe94 * Moved created subdirectory src/system/kernel/lock.cpp to new subdirectory
locks.
* Added syscalls for a new kind of mutex. A mutex consists only of an int32 and
  doesn't require any kernel resources. So it's initialization cannot fail
  (it consists only of setting the mutex value to 0). An uncontended lock or
  unlock operation can basically consist of an atomic_*() in userland. The
  syscalls (when the mutex is contended) are a bit more expensive than semaphore
  operations, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36158 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 16:07:39 +00:00
Ingo Weinhold 349039ff2e Added vm_[un]wire_page(), which are essentially versions of
[un]lock_memory_etc() optimized for a single page.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36156 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 15:07:06 +00:00
Ithamar R. Adema b13b0b0f4e * Make sure LinkSender knows team ID of receiving team; this fixes the >64k ServerLink transfers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36154 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 14:26:19 +00:00
Oliver Tappe 575625f155 fix drawing artefacts when the caret is being clipped, which lead
to parts of the caret being inverted:
* instead of always inverting the caret rect, we now invalidate when the
  caret should be hidden



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36153 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 14:13:57 +00:00
Stephan Aßmus af6693471d Fixed build of the app_server test environment on Haiku.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36147 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 13:15:54 +00:00
Jérôme Duval 03e6434ec0 * fixes a BSlider issue noticed by Matt on the mailing list:
Invoke() wasn't called the first time you grab a slider and slide it all the way to the left.
Thanks for the test case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36145 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 12:57:58 +00:00
Jérôme Duval 1590c69933 * added forkpty() and login_tty() to bsd compatibility, a test for forkpty().
* added a TODO questioning the closing master and slave in openpty() when applying window size fails.
* added TIOCSCTTY as a TTY ioctl code, the caller become controlling TTY. Review comments are welcome.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36105 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-10 13:48:28 +00:00
Stephan Aßmus 6ed212bd43 Added TODO about possibly better way to name some constants.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36081 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-08 10:03:43 +00:00
Ingo Weinhold 078dbb2d0e Defined more sysconf() and _POSIX_* constants required by POSIX.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36074 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-07 18:52:25 +00:00
Ingo Weinhold 1f285441c3 Define B_GENERAL_ERROR_BASE to INT_MIN instead of LONG_MIN. On 32 bit
platforms it's the same value, but we actually want type int, not long.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36072 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-07 18:49:04 +00:00
Axel Dörfler 7f0bff63d0 * Fixed typo.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36058 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-07 07:05:20 +00:00
Ingo Weinhold 2be99447d8 * Added some comments to the thread flags.
* Added new thread flag THREAD_FLAGS_ALWAYS_RESTART_SYSCALL. If set, it forces
  syscall restart even when a signal handler without SA_RESTART was invoked.
* Fixed sigwait(): If one of requested signals wasn't already pending it would
  never wake up. Also, the syscall always needs to be restarted, if interrupted
  by another signal.
* Renamed a bunch of the POSIX signal function implementations which did return
  an error code directly (instead via errno). Added correct POSIX functions
  where needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36054 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-06 20:23:18 +00:00
Ingo Weinhold 02e6d76c9c Replaced enums by macros as required by POSIX.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36041 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-05 17:05:25 +00:00
Ingo Weinhold 4f774c503c * VMArea::Unwire(addr_t, size_t, bool): Don't delete the removed range, but
return it.
* lock_memory_etc(): On error the VMAreaWiredRange object could be leaked.
* [un]lock_memory_etc(): Call VMArea::Unwire() with the cache locked and
  explicitly delete the range object after unlocking the cache to avoid
  potential deadlocks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36035 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-05 12:12:36 +00:00
Ingo Weinhold 369111e741 * Removed the VMArea::Wire() version that has to allocate a VMAreaWiredRange.
Since the requirement is that the area's top cache is locked, allocating
  memory isn't allowed.
* lock_memory_etc(): Create the VMAreaWiredRange object explicitly before
  locking the area's top cache.

Fixes #5680 (deadlocks when using the slab as malloc() backend).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36033 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-05 11:08:01 +00:00
Ingo Weinhold 550376ffb8 * vm_delete_areas(): Changed return type to void (was status_t and not used).
* _user_map_file(), _user_unmap_memory(): Verify that the address (if given) is
  page aligned.
* Reworked memory locking (wiring):
  - VMArea does now have a list of wired memory ranges and supports waiting for
    a range to be removed.
  - vm_soft_fault():
    - Added "wirePage" parameter that, if given, makes the function wire the
      page and return it.
    - Added "wiredRange" parameter (for calls from lock_memory_etc()) and made
      sure we never unmap wired pages. This could e.g. happen when a page from a
      lower cache was read-mapped and a write fault occurred. Now in such a
      situation the function waits for the page to be unwired and restarts.
  - All functions that manipulate areas in a way that could affect wired ranges
    do now either require the caller to make sure there are no wired ranges in
    the way or do that themselves. Added a few wait_if_*_is_wired() helper
    functions for that purpose.
  - lock_memory_etc():
    - Does now also work correctly when the range spans more than one area.
    - Adds VMAreaWiredRanges to the affected VMAreas and retains an address
      space reference (so that the address space won't be deleted as long as a
      wired range exists).
    - Resolved TODO: The area's caches are now locked when
      increment_page_wired_count() is called.
    - Resolved TODO: The race condition due to missing locking after looking up
      the page mapping is now prevented. We hold the cache locks (in case the
      page is already mapped) and the new vm_soft_fault() parameter allows us
      to get the page wired.
  - unlock_memory_etc(): Changes symmetrical to those in lock_memory_etc() and
    resolved all TODOs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36030 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-03 18:01:29 +00:00
Oliver Ruiz Dorantes 4d291edb32 Â- Use given macro for system team, thanks Jerome
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36028 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-02 13:37:16 +00:00
Oliver Ruiz Dorantes 62f5ba006a - Read Local features al LocalDevice constructor
- keep record in UL and KL side



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36027 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-02 12:12:29 +00:00
Oliver Ruiz Dorantes 2e26da485a - In the case the port is created in Kernel context force it to stay in kernel team,
as the creation can be initated by a UL thread



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36025 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-02 11:31:39 +00:00
Siarzhuk Zharski 5fbfe93a98 - CPU identification for 'Core i5 CPU M 430 @ 2.27' added. Reported by Evgeny Abdraimov.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35987 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-28 16:17:23 +00:00
Ingo Weinhold 64d5a0a4b7 Added UnhandledDebugMessage() hook which is called by the base class
implementations of the other hooks. This way one can easily detect/handle
otherwise unhandled events.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35964 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-26 21:18:08 +00:00
Ingo Weinhold 1c421b8df4 Added optional "singleStep" parameter to ContinueThread().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35963 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-26 21:16:43 +00:00
Stefano Ceccherini bb2576f0c8 Removed some code which was added to fix a crash, which was obviously fixed
correctly later in another way.
Removing this code should also fix ticket #3103.
Use the width of the Bitmaps instead of fixed values.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35962 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-26 20:23:30 +00:00
Stephan Aßmus 2789b3911a Rewrote BAffineTransform to not be based on agg::trans_affine, which was pulling
in the AGG header. Reused the AGG code were applicable and implemented a lot
more features. The Multiply and PreMultiply meaning is reversed with respect to
AGG, but follows the mathematical meaning. Added type_code
B_AFFINE_TRANSFORM_TYPE to TypeConstants.h and let BAffineTransform derive from
BFlattenable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35958 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-26 17:20:11 +00:00
Stephan Aßmus abb02bc4a4 Moved BAffineTransform from shared kit into interface kit. Still in BPrivate
namespace. Applied 80 char/line limit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35955 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-26 11:20:53 +00:00
Ingo Weinhold 53446ebf80 Added a few classes to the debug kit:
* BDebugMessageHandler: Interface with hooks for handling of debug messages.
* BDebugContext: Essentially a C++ wrapper for struct debug_context, with
  handy methods for controlling a debugged team.
* BTeamDebugger: Proxy for a debugged team. Derived from BDebugContext.
* BDebugLooper: Wraps a main debug message loop. Any number of BTeamDebuggers
  can be added and associated with BDebugMessageHandlers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35953 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-26 00:15:59 +00:00
Ingo Weinhold feddedab0c x86:
Added fields for temporary storage of the debug registers dr6 and dr7 to the
arch_cpu_info structure. The actual registers are stored at the beginning of
x86_exit_user_debug_at_kernel_entry() and read in
x86_handle_debug_exception().
The problem was that x86_exit_user_debug_at_kernel_entry() itself overwrote
dr7 and, if kernel breakpoints were enabled, dr6 could be overwritten anytime
after. So x86_handle_debug_exception() would find incorrect values in the
registers (definitely in dr7) and thus interpret the detected debug condition
incorrectly. Usually watchpoints were recognized as breakpoints.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35951 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-26 00:03:53 +00:00
Stephan Aßmus 48d796576e * Moved the duplicate "string_for_size()" implementations into libshared.a.
* Adapted libtracker.so, DriveSetup and Installer to use the shared version.
 * The new version uses the correct units (KiB instead of KB and so on).
 * Use the correct units in a few other prominent places, where
   string_for_size() could not be used.

Should resolve a major part of #5378.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35935 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-23 16:49:49 +00:00
Axel Dörfler 3d019c5f63 * Added missing IPv6 defines based on a patch by Andreas Färber in bug #5608.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35934 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-22 23:25:29 +00:00
Stephan Aßmus b809ff1c59 * Tweaked the thumbsize of the pointing hand cursors.
* Repurposed the FollowLink cursor as CreateLink cursor.
 * Created a new FollowLink cursor based on a design by Justin Stressman, thanks!

It compiles and I proof-read the commit, otherwise I didn't test, yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35922 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-20 14:23:42 +00:00
Stefano Ceccherini f0330c4aff Removed AreaLink, not used
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35914 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-19 17:29:10 +00:00
Stephan Aßmus 00873f7818 Added BShape::CurrentPoint(), returning the current end point of the path.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35908 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-19 00:28:38 +00:00