Commit Graph

24256 Commits

Author SHA1 Message Date
Ingo Weinhold
370602bff6 Added pthread rwlock support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25470 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 13:56:11 +00:00
Ingo Weinhold
b5e3c0a1ea Added new syscalls _kern_block_thread()/_kern_unblock_thread[s]().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25469 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 13:53:56 +00:00
Stefano Ceccherini
e2fe7e2fe0 Removed PortQueue since it's not used. Small style (old) changes here
and there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25468 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 13:27:56 +00:00
Jérôme Duval
036cf4dd20 block_cache_delete(): only lock the cache mutex and avoid MutexLocker. the mutex is destroyed in the destructor.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25467 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 12:56:59 +00:00
Jérôme Duval
739dbdfae4 * Patch from Christian Fasshauer: provides a cancel button
* fixed a few things: one couldn't restart the install process when cancelled, use B_QUIT_REQUESTED instead of QuitRequested().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25466 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 11:38:10 +00:00
Michael Lotz
e5812e917b Fix typo that caused a too small buffer to be allocated for device names.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25465 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 11:22:53 +00:00
Michael Lotz
f97c4f2fdc * Implemented transparent device replugs. If the same device (by MAC address)
is plugged in after having been unplugged the device will now reuse a still
  existing ECMDevice object. This allows for the link simply going down when a
  device is unplugged and going up again when the device is replugged. The
  nice thing is that due to the way our usb drivers work it doesn't matter
  where you replug the device, so you can switch it from one port to another
  or even from a highspeed to a fullspeed bus transparently.
* Fix a race condition between the notify hook and the device removed hook.
* Added some comments and extended some debug output to be more useful.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25464 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 11:22:36 +00:00
Jérôme Duval
c1d860fb1f block_cache_delete(): unlock the cache mutex before deleting the cache
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25463 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 10:54:14 +00:00
Jérôme Duval
31ae3d0741 Patch from Kaoutsis (I change a few things, like method names, introduced a private method for alerting, and the about menu item label).
* the usual find_directory() fix
* added a 'About...' menu item to the pop up menu. It uses the asynchronous Go() version (with the NULL argument); The synchronous version ate all the cpu, and don't know 
if that's a bug, since the alert was inside the MessageReceived() loop.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25462 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 10:32:59 +00:00
Jérôme Duval
f61b0e49e0 Patch from Kaoutsis: replace hard coded path with find_directory(B_BEOS_ETC_DIRECTORY, ...)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25461 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 10:02:48 +00:00
Jérôme Duval
b2208589c9 Patch from Kaoutsis to enable mutex and pthread_create tests.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25460 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 09:58:31 +00:00
Michael Lotz
6ba2a6764d * Reset the connection state and speed when the underlaying device is removed.
* Notify the stack of this by releasing the link state change sem (if present).
* Also check for a removed device in the notify callback to prevent accessing
  a device that is going down.

Removing the device under Haiku with an active link will now report the loss of
connection. Still left to implement is to reuse a still existing device if the
same device (based on its MAC) is replugged.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25459 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-11 20:07:11 +00:00
Michael Lotz
b995c2834c * Added support for device state change notifications and implemented the
ETHER_GET_LINK_STATE and ETHER_SET_LINK_STATE_SEM to provide this
  information and notification.
* Don't try to clear an endpoint halt in case of a B_CANCELED status in the
  callbacks as this is triggered by explicitly canceling transfers when the
  device is closed/removed.
* Renamed the semaphore members to *Sem to distinguish them better.
* Some minor other cleanup and some added comments.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25458 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-11 18:55:12 +00:00
Stefano Ceccherini
976203c80a typo which broke the build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25457 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-11 18:34:29 +00:00
Stefano Ceccherini
66b7ce851c We shoulnd't mess with the pulse rate of the window, since if we are a
replicant, the window is not ours. Blinking the cursor is now done with 
a BMessageRunner.
Removed the dragger for the time being, since Terminal as a replicant 
has some issues.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25456 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-11 18:23:12 +00:00
François Revol
36a11cceed Automatically add subfolders with a Jamfile in 3rdparty.
This allows hooking your own projects locally without having to touch this file, and have to resolve conflicts on svn up.
One still must configure --enable-3rdparty of course or add this to UserBuildConfig:
HAIKU_INCLUDE_3RDPARTY = 1 ;


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25455 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-11 18:07:30 +00:00
Rene Gollent
79e1e772ac Build fix for gcc4.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25454 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-11 17:04:25 +00:00
Axel Dörfler
548c508ff7 More work-in-progress:
* Added a generic (for all devices) and specific (for a specific device) video
  driver to be able to play with the replace mechanism (which is not yet done,
  but works well for the one usage case tested).
* Added reference counting and initialize counting: now, each node owns a
  reference of its parent, and each initialized node owns an initialization
  reference of its parent.
* Added locking.
* Moved dump functionality into a member function.
* The same node can now only added once - ie. if a bus tries to register the
  same device twice, it will fail.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25453 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-11 17:00:07 +00:00
Ingo Weinhold
dd6eebabfe Use the [un]defer_signals() functions to prevent signal delivery while
being in the allocator. Fixed bug #1965.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25452 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-11 16:30:22 +00:00
Ingo Weinhold
d648afb8d7 * For each userland team the kernel creates an area in the userland
address space that is fully locked and marked B_KERNEL_AREA. It can
  thus be accessed by the kernel without additional checks.
* For each userland thread we do create a user_thread structure in that
  area. The structure is accessible from userland via TLS, using the
  private get_user_thread() function.
* Introduced private userland functions [un]defer_signals(). They can be
  used to cheaply disable/re-enable signal delivery. They use the
  user_thread::defer_signals/pending_signals fields which are
  checked/updated by the kernel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25451 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-11 16:25:35 +00:00
Ingo Weinhold
58148e2e02 Added new private area protection flag B_KERNEL_AREA, which prevents all
changes to the area (delete, resize, clone) from userland.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25450 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-11 16:02:13 +00:00
Ingo Weinhold
2873ace1f1 Small test program triggering a self-deadlock in the memory allocator
when a signal handler that itself uses the allocator is invoked while
the thread originally was in the allocator.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25449 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-11 15:56:42 +00:00
David McPaul
ab38d6b5ee Hardcode IMA4 sound description
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25448 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-11 13:09:54 +00:00
Axel Dörfler
2f00291de2 * The EXIF parser now keeps a set of visited offsets to avoid entering endless
loops with corrupted data.
* This fixes bug #2206.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25447 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-11 12:28:01 +00:00
Axel Dörfler
fdeee1a708 Wrote a small test program that can reproduce the problem in bug #2206.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25446 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-11 12:08:15 +00:00
David McPaul
7eabc31ec7 change printf to TRACE. Turn off TRACEing
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25445 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-11 02:44:39 +00:00
David McPaul
4a3e5e36ca fix issue 1779 - crash on mov with audio
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25444 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-11 02:07:01 +00:00
François Revol
29ede77343 - add jamfile & rdef
- remove makefile & rsrc
- hook to the build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25443 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-11 01:02:34 +00:00
François Revol
fe8567ec1c The code for my (very useful if you ask me) AutoRaise deskbar addon that brings the focussed window to front after a timeout.
MIT of course.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25442 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-11 00:40:56 +00:00
François Revol
a4a6c26a2a - add a jamfile and rdef
- remove makefile and rsrc as it builds fine from jam
- add to the build


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25441 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-11 00:32:02 +00:00
François Revol
1d7c2d4adc Sources for Matthijs Hollemans' WebWatch app, I don't use it (anyone actually using @beats ?) but it's quite cute and could serve as nice sample code. And it's under MIT licence.
Oddly this is version 1.5 while bebits still has 1.4 :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25440 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-11 00:02:26 +00:00
Michael Lotz
745c6cce89 Adding USB ECM (Ethernet Control Model) driver. This driver should support
devices of the CDC class (2 - communication) with ECM subclass (6) interfaces.
This type of device can be for example a USB to ethernet adapter or current
UMTS cell phones that support the Wireless Mobile Communications Devices (WMC)
standard.
Note that there is also another, similar, thing called EEM (Ethernet Emulation
Model) which we want to support too and is why I called this driver "usb_ecm"
instead of just "usb_network".
This driver was written in less than half a day and while it works nicely with
my Sony Ericsson K850i (comitting over this very device/driver), it does not
yet contain features like link state reporting and multicast and may obviously
contain a few bugs.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25439 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 23:50:41 +00:00
Ingo Weinhold
3560b757c2 Fixed warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25438 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 22:22:08 +00:00
Ingo Weinhold
5d0638bf88 Changed FATAL macro to always dprintf() the error. Additionally it still
prints to stdout, but only until the program and its dependencies are
loaded. Failed attempts to load add-ons and the like doesn't pollute
stdout anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25437 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 22:21:52 +00:00
Ingo Weinhold
7b54413e91 Typo, spotted by Andreas Faerber.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25436 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 21:52:44 +00:00
Ingo Weinhold
a636a33926 Use the new B_ABSOLUTE_REAL_TIME_TIMEOUT. Fixes pthread_cond_timedwait()
and pthread_mutex_timedlock() which were waiting system time relative
although their timeout parameter is Epoch relative.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25435 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 21:44:03 +00:00
Ingo Weinhold
4d3680aaef Added timeout constant B_ABSOLUTE_REAL_TIME_TIMEOUT which specifies a
timeout relative to the Epoch.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25434 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 21:34:51 +00:00
Ingo Weinhold
b932012815 Patch by Andreas Faerber:
Replaced single-line comments by multi-line comments for ANSI C
compliance.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 21:30:34 +00:00
Michael Lotz
bb90c2a603 * Clear the endpoints of an alternate interface that is going away before
updating the active pointer as otherwise the endpoints of the new alternate
  would have been cleared instead of the old one (leaking endpoints).
* Only clear and re-initialize the endpoints of the interface we are setting
  an alterntate. Otherwise we tear down all the device endpoints which would
  result in a bad situation for composite devices where multiple drivers may
  use different functions (through different interfaces) of a device side by
  side.
* Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25432 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 21:09:44 +00:00
Ingo Weinhold
899aa8e1f6 Moved setjmp() to sigsetjmp.S for ppc and m68k, too. Should fix the
kernel build. Haven't tested it though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25431 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 18:10:15 +00:00
Ingo Weinhold
eb1a8c446e siglongjmp() calls __longjmp_return() also on x86, now. This resets the
signal mask as required. and also makes my recent return value fix
unnecessary, since __longjmp_return() already does that.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25430 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 18:05:41 +00:00
Ingo Weinhold
8bba1c2637 Forgot to check this one in. setjmp.S is no more.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25429 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 17:39:29 +00:00
Ingo Weinhold
ad7ff929dd Reimplemented setjmp(). It no longer offsets the caller's esp.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25428 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 17:16:09 +00:00
Ingo Weinhold
c306892e40 Fixed my fix. It would always return 1 now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25427 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 17:10:15 +00:00
Ingo Weinhold
d5becaf83b Test for setjmp() that demonstrates why it isn't a good idea to
manipulate the stack pointer as we do.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25426 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 16:26:05 +00:00
Ingo Weinhold
378a1cbb0c Added poll() kernel tracing.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25425 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 16:23:48 +00:00
François Revol
8e3b6823f2 Don't ue ioctl('ichr') for Haiku, we support select().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25424 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 14:53:02 +00:00
Jérôme Duval
1439f59995 update pci ids
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25423 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 14:13:35 +00:00
Jérôme Duval
bf8dccad97 added a few more models for reversed enable amp
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25422 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 14:09:06 +00:00
Jérôme Duval
07a6286989 B_ZENKAKU_HANKAKU doesn't need B_COMMAND_KEY (I misunderstood the patch).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25421 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 13:52:53 +00:00