Commit Graph

33102 Commits

Author SHA1 Message Date
Axel Dörfler 31e49a2f1d * Implemented missing alphasort(), and scandir() POSIX functions. Completely
untested yet, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34838 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-01 18:49:55 +00:00
Ingo Weinhold 355dc6bef4 Inlined several VMCache methods.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34837 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-01 17:09:23 +00:00
Ingo Weinhold 1021fd2826 * agp_gart(): Use vm_page_[un]reserve_pages().
* Removed unused vm_page_allocate_pages().
* Removed now unused (always true) "reserved" parameter from
  vm_page_allocate_page().
* Removed unused (always false) "stealActive" parameter from steal_page().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34836 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-01 16:37:14 +00:00
Axel Dörfler e30dd2c076 * If the VESA driver remaps the frame buffer on init, it will now also make
sure that the kernel's frame buffer console points to the right data.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34835 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-01 14:54:41 +00:00
Colin Günther 1e84402302 * Adjusting firmware path of Haiku's native Intel PRO/Wireless 2100 driver,
so that it can make use of the firmware installed by the OptionalPackage
  Wifi-ipw2100+fw.
* Updating OptionalPackages to use the latest Wifi-ipw2100+fw package.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34833 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-31 20:39:27 +00:00
Ingo Weinhold 4502d80d7e capture_tracing_stack_trace():
* When interrupts are disabled, it is still safe to capture the kernel stack
  trace. The respective TODO preceded the introduction of the "kernelOnly"
  flag.
* Actually made "kernelOnly" work. The wrong flag was passed to
  arch_debug_get_stack_trace() in case it was false, so we never captured
  user stack traces.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34832 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-31 17:21:17 +00:00
Ingo Weinhold 91bd177eb1 Replaced the rootfs mutex by an rw_lock. To avoid race conditions in the
directory iteration code, a mutex to protect the iteration cookie and one
to protect the cookie list have been introduced.
Overall this reduces the contention of the rootfs lock significantly. The
Haiku image -j8 build gets only marginally faster though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34831 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-31 17:11:52 +00:00
Ingo Weinhold 2ea2527fe4 R/W lock implementation:
* Changed the rw_lock_{read,write}_unlock() return values to void. They
  returned a value != B_OK only in case of user error and no-one checked them
  anyway.
* Optimized rw_lock_read_[un]lock(). They are inline now and as long as
  there's no contending write locker, they will only perform an atomic_add().
* Changed the semantics of nested locking after acquiring a write lock: Read
  and write locks are counted separately, so read locks no longer implicitly
  become write locks. This does e.g. make degrading a write lock to a read
  lock by way of read_lock + write_unlock (as used in the VM) actually work.

These changes speed up the -j8 Haiku image build on my machine by a few
percent, but more interestingly they reduce the total kernel time by 25 %.
Apparently we get more contention on other locks, now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34830 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-31 17:03:41 +00:00
Ingo Weinhold 4ccd636dcb * Removed return value checks for rw_lock_{read,write}_unlock(). The return
values are not really useful, since they should only be != B_OK in case of
  user error, and will be changed to void.
* Added tests for write lock to read lock degrading.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34829 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-31 16:42:30 +00:00
Stefano Ceccherini 5f4632cf32 I decided to trust (and mimic) Tracker and added a check in
TermView::MessageReceived for B_SIMPLE_DATA, so that a drop with the
right mouse button is handled correctly. Fixes ticket #5172.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34828 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-30 20:54:00 +00:00
Ingo Weinhold 933764d70e * Added a framework for unit tests in the kernel. The beast is implemented as
a driver which publishes a device as "/dev/kernel_unit_tests". Commands
  can be issued by writing to the device (e.g.
  "echo help > /dev/kernel_unit_tests"), output is written to serial port/
  syslog.
* Added a few tests for rw_lock.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34827 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-30 19:38:41 +00:00
Ingo Weinhold 3ce2634533 * Fixed the semantics of [v]snprintf(): If the buffer is not large enough,
the function shall nevertheless return the length of the string that would
  be written, if the buffer were large enough.
  Added a touch of C++ while doing that. :-)
* Fixed the instances in boot loader, kernel, and kernel modules where the
  wrong semantics were expected. The majority of uses actually.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34826 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-30 15:17:09 +00:00
Ingo Weinhold 3069ca963e Enable loading debug symbols again. The approach to use the driver settings
is broken.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34825 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-30 14:55:07 +00:00
Colin Günther 8d84a92032 Coding style cleanup. No functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34824 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-30 09:04:01 +00:00
Colin Günther 485da29cbc Found a better solution for implementing ieee80211_node_dectestref().
Now the reference count get accessed only once, leading to true atomarity.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34823 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-30 01:00:51 +00:00
Colin Günther 210124c810 Switching from atomic_{and|or} or to atomic_{set|get} as this reads more
natural and spares even one atomic call in syskonnect.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34822 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-30 00:45:16 +00:00
Colin Günther 5ce504e289 * Reworked scanner registration. Scanners are getting cleanly unregistered
on wlan stack shutdown, now.
* Added patch by mmlr to support IBSS (aka Ad-hoc) mode. To activate IBSS mode
  one would need recompile the wlan stack, though, once the constant in
  start_wlan() is switched from IEEE80211_M_STA to IEEE80211_M_IBSS. There is
  no runtime configuration, yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34821 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-30 00:37:23 +00:00
Colin Günther bfaa8fac89 Fixed typo. This will make iprowifi2200 compile again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34820 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-30 00:30:56 +00:00
Colin Günther c006bb2735 * Using conditional compilation instead of simply deleting source code, to
ensure interrupts are disabled only once per interrupt event.
* Coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34819 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 23:46:42 +00:00
Colin Günther 75b892d51f * Ensuring that interrupts are disabled only once per interrupt.
* Coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34818 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 23:00:42 +00:00
Colin Günther f8762ee71c Cody style cleanup. Thanx Axel for the headup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 22:56:24 +00:00
Colin Günther f9ee2947df * Using atomic_{get|set} instead of HAIKU_INTR* macros.
* Using conditional compiliation instead of just deleting original code
  to easen future driver updates.
* Coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34816 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 22:48:07 +00:00
Colin Günther 8645a5715e * Ensuring reading of interrupt status is done only once.
* Code style cleanup.
* Automatic white space cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34815 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 22:31:43 +00:00
Colin Günther 2d939304db * Ensuring that reading interrupt status register and disabling interrupts
is done only once.
* Coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34814 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 22:20:54 +00:00
Colin Günther 0e39b0b7ce Using atomic_{set|get} as proposed by Axel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34813 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 22:10:04 +00:00
Colin Günther b69688c36e * Reworked interrupt handlink so that the interrupt status is read only once
per interrupt. Moreover the interrupt is disabled only once now too.
* Using atomic_{set|get} operations for synchronizing the interrupt status
  as proposed by Axel.
* Coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34812 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 22:00:28 +00:00
Colin Günther 168aaf2f9d * Using atomic operations to synchronize the interrupt status between glue code
and ath_intr function. Those are faster than the HAIKU_INTR* macros.
* Some variable renaming to stick with common naming conventions of the other
  wlan drivers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 18:24:35 +00:00
Colin Günther 097be0a818 Codestyle cleanup. No functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34810 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 18:15:39 +00:00
Colin Günther 6e12370632 * Disable interrupts only once, to prevent misbehaviour of hardware. Though
I don't know about such hardware, it is better to be cautious here.
* Code style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34809 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 18:12:17 +00:00
Colin Günther ed36d5dfa2 Using the same pointer orientation as the rest of the code. No functional
change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34808 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 18:01:33 +00:00
Colin Günther 296653ac73 * Coding style cleanup. No functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34807 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 17:58:17 +00:00
Colin Günther b72a17e3a2 * No need for a special interrupt reenabling routine, as this is done by
the FreeBSD driver already.
* Some coding style cleanups.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34806 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 17:57:24 +00:00
Colin Günther 49fbc5438e Read the interrupt status only once, to prevent wrong status reads in the
wpi_intr function. This should fix firmware timeouts, which occure due to the
second read just returns wrong values.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34805 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 17:50:44 +00:00
Colin Günther 92ba12f110 Read the interrupt status only once, to prevent wrong status reads in the
iwn_intr function. This should fix firmware timeouts, which occure due to
the second read just returns wrong values.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34804 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 17:40:59 +00:00
Rene Gollent ca833f9f1b HandleAddSystemBeepEvent was checking for a specific error code which changed during some recent media_server reworking. As a consequence, adding new system beep events no longer worked.
Fixes ticket #5176.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34803 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 16:57:44 +00:00
Colin Günther f0f0db8b2a Enabling FreeBSD based WLAN ioctls, as those will become the future Haiku
WLAN ioctls anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34802 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 03:54:55 +00:00
Colin Günther e31bb3f634 Removing superflous files.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34801 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 03:26:10 +00:00
Colin Günther e14aa471c2 Adding crypto support for ccmp (aka WPA2) to the wlan stack.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34800 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 03:21:16 +00:00
Colin Günther 9f6777c625 Copying the rijndael (aka AES) cryptographic algorithm into the freebsd_wlan
folder, as it is used by the crypto_ccmp module, only. Though there would be
no sense in making AES available to the FreeBSD compat layer in general.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34799 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 03:15:29 +00:00
Colin Günther f5c86019c4 Adding crypto support for tkip (aka WPA) to the wlan stack.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34796 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 02:40:21 +00:00
Colin Günther f1c8646374 Adding crypto support for wep to the wlan stack.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34795 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 02:35:59 +00:00
Colin Günther ca16bde32b Enhancing the freebsd compat layer in preparation of including crypto support
for the wlan stack.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34794 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 02:34:47 +00:00
David McPaul 6768fe0d89 Improve IO performance for all media files
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34793 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 00:41:08 +00:00
Ingo Weinhold d4e7d2de5c Don't delete IORequests that have not been finished. The objects nevertheless
belong to the respective Threads.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34792 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-28 14:23:23 +00:00
Colin Günther 25b7483716 * Removing comments, that were leftovers from FreeBSD. These comments lead to
wrong impression about innerworkings of Haiku's compat layer.
* Use C++ comment style where appropriate.
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34791 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-28 04:53:18 +00:00
Colin Günther 041865ac2b Adding a constant, to allow compiling of the iprowifi5xxx driver based on
the r27 source from http://svn.techwires.net/svn/projects/freebsd/sys/.
Actually this driver works now, but as it is developed outside of the FreeBSD
repo, I will not include it into Haiku's repository.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34790 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-28 04:48:17 +00:00
Colin Günther 430eb68718 * Removing debugging flag to lower the debug output. Moreover the removed DEBUG_ELEMID flag proved unuseful anyway.
* Whitespace cleanup.
* Uniform usage of pointer char.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34789 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-28 04:39:15 +00:00
Ingo Weinhold 448671a39c * Build library libroot_debug.so, which is the standard libroot.so with the
debug heap implementation.
* Added libroot_debug.so to the DevelopmentMin optional package. Since it has
  the same soname as the standard libroot, it can simply be specified in
  LD_PRELOAD to run a program with that version.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34788 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-28 00:13:17 +00:00
Ingo Weinhold c682a1937e SharedLibrary: The soname of the library can now be set explicitly by setting
the HAIKU_SONAME variable on the target.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34787 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-28 00:06:11 +00:00
Ingo Weinhold 765a039de2 Pre-load shared objects as libraries, so their symbols will be used
automatically and a pre-loaded library will not be loaded again, when it's
also a dependency.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34786 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-28 00:05:10 +00:00