Commit Graph

21238 Commits

Author SHA1 Message Date
Michael Lotz
a9d7e87d40 * Implement "tail switching" so that a new transfer descriptor chain can be
appended to an endpoint descriptor without locking/disabling the endpoint.
* Correct the direction of the data phase of a control transfer.
* Some minor cleanup.

Control requests without data phase (set address for example) might actually
work now, but this is still untested.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25541 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 12:16:34 +00:00
Michael Lotz
aeae544e7d * Complete the roothub get/set/clear port feature functions
* Reorder to match the usual order of the states/commands
* Fix some debug output and make it more informative

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25540 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 10:27:31 +00:00
Michael Lotz
812dd254dc Acknowledge OHCI interrupts.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25539 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 09:36:06 +00:00
Michael Lotz
20bbb1bf28 * Make the operational register memory a uint8 * instead of a uint32 * so the
driver has at least a chance of working (it previously always used wrong
  offsets for register access).
* Remove the hash approach for now (I'm going to explore a few other ways of
  doing that first).
* Reorder some stuff and check for errors in some more places.
* More cleanup (mostly whitespace again).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25538 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 09:23:29 +00:00
Ingo Weinhold
adfd232086 Allow building zip as build tool. Tested under Linux only.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25534 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-17 23:29:01 +00:00
Ingo Weinhold
1cc5173533 * Use 0 instead of the unportable EOK.
* If not built for BeOS or Haiku, we use _kern_open() instead of open(),
  so we get attribute emulation support.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25533 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-17 23:27:38 +00:00
Ingo Weinhold
61b37794a4 Added explicit support for loading executables compiled with the
respectively other gcc version on a Haiku compiled with gcc 2 or gcc 4.
The libraries for such an executable are first searched in "gcc4"
respectively "gcc2" subdirectories of the standard search path
directories. If not found there, we try again with the standard paths.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-17 23:25:17 +00:00
Ingo Weinhold
b3d6c12dbf * Fixed kernel tracing for gcc 4. The ABI changed in a way that isn't
compatible with what our code assumed (pointers to objects of
  TraceEntry and its POD base class trace_entry aren't identical
  anymore).
* Added optional stack traces for ktrace_printf() output in the kernel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25531 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-17 18:59:19 +00:00
Ingo Weinhold
ec1f43f304 axeld + bonefish:
* Small style changes.
* Currently ifdef'ed out potentially correct changes, that break Neon
  tests which otherwise succeed. Axel will investigate this further.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25530 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-17 18:48:24 +00:00
Stephan Aßmus
91af9113d6 The compiler warns, and it is correct - DPMSState() and DPMSCapabilities
are supposed to return flags, and not a status_t.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25529 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-17 16:50:29 +00:00
Michael Lotz
0e2a404fc9 * Sync roothub code between UHCI and EHCI (will be reworked to a common one)
* Minor whitespace cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25528 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-17 12:41:56 +00:00
Michael Lotz
fd1e6f2b37 * Getting familiar with the existing code
* Cleanup (whitespace, nameing, code style)
* Move around methods so they match the header order
* Fix some obvious stuff
* Initialize all members
* Sync roothub code (this will be reworked to a common roothub)
* Only minor functional changes (to the worse for now)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25527 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-17 12:39:46 +00:00
Ingo Weinhold
25d0a0841f axeld + bonefish:
_WaitForEstablished() must also accept states implying that the state
has been established at some point. Fixes bug #2172.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25526 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-17 11:56:25 +00:00
Ingo Weinhold
fbe0c27a94 axeld + bonefish:
Changed condition variables so that it is allowed to block (e.g. lock
mutexes etc.) between Add() and Wait(). This fixes #2059, since the
block writer used them this way and could thusly fail to wait for a
condition variable, causing a temporary stack object to be used past its
lifetime.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25525 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-17 10:21:37 +00:00
Marcus Overhagen
f5831806ff Added a "pcistatus" command to KDL that prints and clears the PCI device status register.
Also clear the status register during init.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25523 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-16 22:17:21 +00:00
Stephan Aßmus
94a6647354 Improved the coding style.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25522 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-16 08:50:45 +00:00
Stephan Aßmus
8e48eb6c32 Base the visibility decision for a shape (Level of Detail) on the global
transform only, not combined with the shapes own scale, since that is likely
not what the user intended.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-16 08:47:38 +00:00
David McPaul
cca73f2ab9 display codec id when codec not available\nSome layout changes too
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-16 02:30:50 +00:00
David McPaul
fa9257456d set user data to contain codec id
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25519 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-16 02:29:10 +00:00
Jérôme Duval
4c1f76cbf4 Patch from Shinta: don't send B_INPUT_METHOD_STOPPED when IM is not active
fix bug #2220


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25518 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 23:37:34 +00:00
Jérôme Duval
40bf8fc2d4 a waiting thread can wait on something else than a sem
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25517 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 23:25:17 +00:00
Jérôme Duval
45f03296cf fix the build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25516 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 22:07:42 +00:00
Ingo Weinhold
5947a3be5a * Fixed read() on a read-shutdown socket. It must never wait.
* Added TODO regarding read/write shutdown.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25515 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 21:05:59 +00:00
Ingo Weinhold
8a1852a447 * Corrected the read() behavior on a read-shutdown socket. All the data
that arrived before the shutdown can still be read.
* Debug some more returns.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25514 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 20:50:42 +00:00
Axel Dörfler
9f925127db This should be the last commit to this one, I'll next work on integrating it
into the kernel:
* Added device_removed() function to the device level as well.
* A device_node now also tracks its published devices.
* Made the driver API more consistent with the device API; instead of the node,
  they now get the driverCookie (so they now need to store the node themselves,
  the driver cookie could be retrieved via the node).
  Alternatively, one could either pass both, or have something similar to what
  Ingo did for the file systems, ie. pass a structure that contains both
  elements. Suggestions welcome.
* Implemented device node replacement when a better driver becomes available:
  the new node (and its devices) is already published even though the old device
  is still in use. The new device is B_BUSY until the old one is closed.
* Implemented an update cycle counter: this will prevent a device node from
  being probed again, if there is no new driver since the last time; eventually
  this will be moved into devfs, though.
* Driver removal and replacement now works as expected in all tested scenarios
  (device removed, better driver installed, both with and without open device).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25512 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 15:08:33 +00:00
Stephan Aßmus
9aa2788e97 Another patch by Vasilis Kaoutsis:
* Use find_directory() for the hash for preloaded modules. I am not sure this
  patch is needed, since it only concerns the hash. Please review.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25511 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 12:28:08 +00:00
Michael Lotz
f940ec3d9c Fix the GCC4 build the other way around. Remove the unnecessary forward
declarations and make the functions static again.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25510 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 12:27:20 +00:00
Stephan Aßmus
7c61d84fcd Patch by Vasilis Kaoutsis:
* Renamed main.c to main.cpp
* Use find_directory() to construct the Bootscript path.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25509 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 12:10:12 +00:00
Stephan Aßmus
ea26d9f0c2 Honour 80 char/line limit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25508 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 12:09:12 +00:00
Stephan Aßmus
5dc81824d6 Another patch by Vasilis Kaoutsis:
Use find_directory() to find the runtime_loader when starting teams.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25506 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 11:55:09 +00:00
Maurice Kalinowski
8f65f279f2 gcc4 build fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25505 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 10:46:25 +00:00
Maurice Kalinowski
20993ed92e gcc4 build fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25504 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 10:38:24 +00:00
Stephan Aßmus
2764548ef3 Use find_directory() in the devfs. Based on patch by Vasilis Kaoutsis.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25503 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 10:06:58 +00:00
Rene Gollent
9194faef55 Cleanup as suggested by Ingo.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25502 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 23:03:31 +00:00
Rene Gollent
9603eba5f2 Build fix from Ingo's header reorganization.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25501 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 21:37:18 +00:00
Stephan Aßmus
01c52d4f9c Print the error message to stdout, since that is where the
message->PrintToStream() output goes. Thanks, Jerome, for the suggestion!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25500 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 20:33:53 +00:00
Stephan Aßmus
1781abf702 Print and error and the message in case _ArgvReceived() fails to parse the
message correctly, it is a bit strange why the message should not follow
protocol.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25499 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 20:12:57 +00:00
Axel Dörfler
7a6818d3fa Work in progress:
* added [un]publish_device() calls to the device manager.
* added a very basic devfs emulation to the playground to be able to test how
  the manager reacts to opened devices.
* renamed *_device() functions to *_node() in the device manager API.
* made B_DEVICE_FIND_CHILD_FLAGS a generic flags field, and renamed it to
  B_DEVICE_FLAGS.
* added support for keeping a driver loaded as long as its device is available.
* implemented get_next_child_node().
* added test for device removal, and implemented unregister_node() for this.
* fixed some bugs in the device node reference/initialization count maintenance.
* moved more code from register_node() to device_node::Register().
* initialize the device_node::fFlags member to the value of B_DEVICE_FLAGS, and
  have additional private flags.
* renamed UninitUnusedChildren() to UninitUnusedDriver(), and fixed this
  function by adding the new flag NODE_FLAG_REGISTER_INITIALIZED.
* Now remembers the support when a driver is registered - this will be used
  later to be able to compare with a new driver without having to call
  supports_device() again.
* Removed NODE_FLAG_REMOVE_ON_UNINIT again, as that was pretty stupid - there
  is reference counting for a reason.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25498 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 20:05:40 +00:00
Jérôme Duval
c27f3926a0 * updated ac97 code with the one from Marcus' ich driver
* merged existing quirks (reversed amp enable and ad1981b)
testing is welcome!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25497 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 20:03:29 +00:00
Axel Dörfler
32f1d45867 * Reworked James Woodcock/stippi's patch a bit: since the remaining entries
are NULL pointers anyway, we just adjust argc.
* Made argv processing more safe, it will now check if the allocation of the
  argv array succeeded in the first place.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25496 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 19:57:12 +00:00
Stephan Aßmus
9765d74881 Just spotted a mistake in my previous commit... and while I am at it, I can
properly credit James Woodcock, who debugged this problem and whom I forgot
to mention in my previous commit. Sorry!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25495 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 19:51:36 +00:00
Stephan Aßmus
e5aa9e13f4 If an error happens during extraction of the argument vectors in
_ArgvReceived(), the array elements still need to be set to NULL otherwise
the function will free() random pointers at the end.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 19:44:47 +00:00
Axel Dörfler
707cdd3719 Added Christian Fasshauer, and Marco Minutoli to the list of contributors.
Shinta, if you can give me your full name, I would like to add you too :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 16:48:03 +00:00
Stephan Aßmus
7557d13189 Applied patch by Marco Minutoli:
Added a new command line utility "mkfs" which can initialize a given volume
with a file system by it's short name via the new Disk Device API.
Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25491 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 15:48:41 +00:00
Stephan Aßmus
fe76020396 GetDiskSystem() is supposed to find the system by name, it should not influence
the internal enumaration for GetNextDiskSystem(). The compiler spotted that
one actually... :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25490 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 15:47:22 +00:00
Ingo Weinhold
07ddcd64cf * Renamed libnetapi to libbnetapi. Create a symlink in the image.
* Extended R5 compatibility check to also consider calls from
  libbnetapi.
* Fixed incorrect R5 compatibility check in BNetEndpoint constructor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25489 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 13:49:48 +00:00
Ingo Weinhold
6b202f4e3d * Introduced new header directory headers/private/system which is supposed
to contain headers shared by kernel and userland (mainly libroot).
* Moved quite a few private kernel headers to the new location. Split
  several kernel headers into a shared part and one that is still kernel
  private. Adjusted all affected Jamfiles and source in the standard x86
  build accordingly. The build for other architectures and for test code
  may be broken.
* Quite a bit of userland code still includes private kernel headers.
  Mostly those are <util/*> headers. The ones that aren't strictly
  kernel-only should be moved to some other place (maybe
  headers/private/shared/util).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25486 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 03:55:16 +00:00
Ingo Weinhold
9b4fea7ee7 * Made libnetapi a separate library again.
* The built-in services are no longer added as resource to libnetwork,
  but as attribute. This removes the libbe dependency.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25485 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-13 23:41:09 +00:00
Ingo Weinhold
541532342d Fixed build with tracing turned on.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25483 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-13 20:04:11 +00:00
François Revol
10f483bf90 Don't forget config.h and rdef when updating... it was still saying 3.80.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25482 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-13 17:32:50 +00:00
Ingo Weinhold
3ca1072d44 * Reimplemented pthread_once. The old one was neither thread-safe nor
particularly efficient.
* pthread_mutex implementation:
  - Removed the pthread_mutex_t indirection (the type was a pointer to
    the actual structure which was allocated on the heap), as it made
    sharing the mutex between processes impossible.
  - Removed the distinction between process shared and non-shared
    mutexes. Benaphores work just as well in shared memory, so we always
    use them.
* Fixed some static initializer macros. PTHREAD_COND_INITIALIZER is
  still broken, since it doesn't work in C code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25481 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-13 01:50:54 +00:00
François Revol
f5c558edc1 The wonders of C++ in the kernel... you get C++ linkage by default :^)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25480 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 22:01:12 +00:00
Stephan Aßmus
97ee7d0a55 When drawing is double buffered, there is no excuse for a flickering cursor
(including any drag bitmap). HWInterface::HideFloatingOverlays() was plain
stupid, I know it did check double buffering at one point, but I must have
removed that when messing with it. But copying anything from back to front
buffer is now not overwriting the cursor area anymore, which is painted
immediatly afterwards. Also moving the cursor invalidates only one rect
if old and new cursor area overlap. All these changes should save some cycles
too. Added TODO with regard to caching the on-the-fly cursor compositing
buffer.
If you have
* a more recent computer
* a decent VESA BIOS which supports your native resolution
* don't need video overlays
... I recommend using the VESA driver.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25479 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 21:10:05 +00:00
Ingo Weinhold
b4e5605e0a * unsetenv() was moving too much memory, thus corrupting the data after
its allocation.
* Added TODO to use a benaphore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25478 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 20:48:03 +00:00
Stephan Aßmus
bf681d149a BRoster::GetAppInfo() only works on running applications, for the replicant to
find the DeskCalc icon, we need to use BRoster::FindApp() instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25477 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 19:58:20 +00:00
Jérôme Duval
b2f8eafcb9 apply STA_INTMASK to only handle interesting bits
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25476 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 18:38:39 +00:00
Jérôme Duval
7652e27b3b global status is a 32 bit register, we try to ack if any bit is left out
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25475 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 18:16:16 +00:00
Ingo Weinhold
7c3137b98b * reader_count was not incremented when a waiting reader was woken up.
* Added comment clarifying the use of reader_count and writer_count.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25474 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 17:22:16 +00:00
Jérôme Duval
f1a950f7bf make use of subsystem id and subsystem vendor id
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25473 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 17:16:05 +00:00
Jérôme Duval
996f75abbb * the Chip field is currently unused in our pci ids list, so we prefer to provide the subsystem name when it is found as a second device description
* adjusted pci device dump


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25472 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 16:55:47 +00:00
Rene Gollent
8814495410 GCC4 fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25471 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 16:05:53 +00:00
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
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
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