Commit Graph

24501 Commits

Author SHA1 Message Date
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
Ingo Weinhold
049dbc4652 Added APR-util optional package.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25513 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 20:47: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
da2a1fefe4 Patch by Vasilis Kaoutsis: Fixed typo in comment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25507 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 12:08:13 +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
Michael Lotz
0899ad23e2 Adding the usb_ecm driver to the image.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25493 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 17:09:43 +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
François Revol
ae28f0aebd - add sunos as possible host
- fix build (at least CodyCam), NETAPI lib is now libnetapi for Haiku...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25488 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 13:32:52 +00:00
Ingo Weinhold
6e19c86ab0 Fixed potential warnings.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25487 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 12:52:34 +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
377a79df84 Added APR 0.9.17 optional package.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25484 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-13 22:15:45 +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