Commit Graph

33325 Commits

Author SHA1 Message Date
Stephan Aßmus
6e95b86e15 Patch by Andreas Faerber:
* Fix compilation when commented out.

Thanks! Fixes ticket #5192.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34861 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 18:31:24 +00:00
Stephan Aßmus
e355ce92a4 Patch by Andreas Faerber:
* Fix compilation with tracing enabled.

Thanks! Fixes ticket #5188.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34860 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 18:26:43 +00:00
Adrien Destugues
6fc52a0c08 Updated lithuanian translations, done by Algirdas Buckus. Thanks !
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34859 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 17:11:30 +00:00
Fredrik Holmqvist
723fbad583 Substituted 'magic' subclass value (0x0) with it's definition PCI_vga for readability.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 10:33:44 +00:00
Stephan Aßmus
5d80127809 Patch by Andreas Faerber:
* Fix a typo in the comments: unintialized -> uninitialized.

Thanks a lot!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34857 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 10:21:09 +00:00
Stephan Aßmus
745b2d9db7 Patch by Andreas Faerber:
* Fix duplicate assignment which is probably a merging artifact.

This patch was also a requirement for a working PPC KDL prompt. I didn't
apply the patches in order... Thanks a lot!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34856 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 10:19:05 +00:00
Stephan Aßmus
16f50e3394 Patch by Andreas Faerber:
* Fix a warning in VM tracing output, which prevented the compilation since
   warnings are treated as errors.

Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34855 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 10:13:21 +00:00
Stephan Aßmus
352455f269 Patch by Andreas Faerber:
* The kernel's _start entry function expects now a second argument, the
   current CPU index. The PPC boot loader didn't initialize GPR4, passing
   its second argument, the kernel entry address, as CPU index, causing
   smp_cpu_rendezvous() to loop forever. This fix gets the PPC boot to a
   kernel debug prompt. The CPU index is currently fixed to 0.

Thanks a lot!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34854 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 10:09:09 +00:00
Adrien Destugues
2fdf91fe74 Esperanto localization by Travis D. Reed. Thanks !
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34853 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 10:08:52 +00:00
Stephan Aßmus
50028fc7aa Patch by Andreas Faerber:
* Choosing Reboot from the menu will now reboot the system instead of
   returning to the OpenFirmware prompt. Places, where returning to the
   prompt was desirable have been adapted to maintain their current behavior.

Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34852 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 10:04:37 +00:00
Stephan Aßmus
9592b510c5 Patch by Andreas Faerber:
* Fixed typo in panic() message.

Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 10:00:53 +00:00
Stephan Aßmus
431b9a3183 Patch by Andreas Faerber: (OpenFirmware network boot)
* If retrieving an IP address from the non-standard /chosen/dhcp-response
   fails, try to parse it from /options/default-client-ip instead.

Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34850 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 09:38:53 +00:00
Stephan Aßmus
f5088d8f82 Patch by Andreas Faerber:
* Define __BYTE_ORDER for Solaris host.

Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34849 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 09:24:57 +00:00
Stephan Aßmus
532a044c3c Adopt the text we check on when switching focus after applying or reverting
the value, otherwise it would not work correctly in some tricky conditions,
inserting unnecessary undo steps or none at all for example when changing a
value, applying and then changing it back manually and switching focus.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34848 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 00:06:01 +00:00
Stephan Aßmus
28051eb04d Always apply the changes to a property in the text editor when changing focus.
Fixes #2749.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34847 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-01 23:57:27 +00:00
Stephan Aßmus
3d9449fe75 Fixed complete mixup of order of arguments passed to remap_frame_buffer().
Should fix #5186.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34846 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-01 23:25:47 +00:00
Ingo Weinhold
fb5c39cb6d Removed TODO again. I tried a similar event mechanism as used for busy pages
in VMCache, but, if anything, that makes a -j8 build marginally slower. I
guess busy vnodes are encountered so rarely that the additional overhead for
a more intelligent algorithm isn't really worth it. Reduced the wait time,
though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34845 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-01 22:13:13 +00:00
Colin Günther
ac20a24e6f Adding strndup.cpp to kernel_lib_posix. Introduced for having a safe way
duplicating firmware names in firmware_get() of the freebsd compat layer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34844 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-01 22:05:45 +00:00
Ingo Weinhold
f42efbcd26 Moved the entry cache implementation into its own file.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34843 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-01 20:51:30 +00:00
Ingo Weinhold
7a9b8baa54 Made vnode::type private, renamed it to fType, and added accessor methods. It
stores the value right-shifted by 12 bits, now, since those bits are not
relevant. This saves some bits and also resolves a TODO.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34842 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-01 20:43:20 +00:00
Ingo Weinhold
3caec2871a * Resolved TODO in free_vnode(): There was a race condition between vnode
destruction and VMVnodeCache::AcquireUnreferencedStoreRef(). Solved by
  adding a flag to VMVnodeCache and letting AcquireUnreferencedStoreRef()
  fail, if set.
* Added TODO regarding replacing the snooze() waiting for busy vnodes.
* get_vnode(): Unlock sVnodeMutex while calling the put_vnode() hook on
  error.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34841 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-01 20:20:11 +00:00
Axel Dörfler
a7cc5352d8 * Our userland build obviously adds some default headers with GCC2 - why would
it do that? This fixes the kernel build, and probably GCC4, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34840 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-01 19:36:01 +00:00
Axel Dörfler
4e8123ba98 * Accidently moved the fdopendir() prototype around.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34839 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-01 18:52:09 +00:00
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