Commit Graph

17522 Commits

Author SHA1 Message Date
Axel Dörfler
26a9fcd6ab * set_alarm() now correctly returns the time left for the currently active
alarm, or 0 if there isn't any.
* setitimer() now also sets the previous timer values correctly, so that
  alarm() and ualarm() now return the correct values as well - this fixes
  the test fork_9-1 failing at alarm().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18545 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-20 22:44:53 +00:00
Axel Dörfler
505347b0b2 Threads are now removed from the hashtable earlier, so that a kill() following
a waitpid() can no longer succeed; this fixes the occasional fork 3-1 test failures.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18544 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-20 21:34:25 +00:00
Axel Dörfler
2b6a368811 wait_for_child() could eventually hang until another team exited (or forever if
it waited for a specific child), as B_RELEASE_ALL opened up a race condition between
looking for an existing death entry, and waiting for the dead children semaphore.
Now we're counting all waiting threads for teams and groups separately.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18543 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-20 21:27:12 +00:00
Stephan Aßmus
4fdb58bec0 * added device ids for "Geforce 7300 GT". Lucky me, this works
beautifully. Tested with ZETA on PCIe system.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18542 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-20 12:13:10 +00:00
Axel Dörfler
4b66b0e0ee Imported ContainerWindow.cpp 1.38. This fixes bug #298.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18541 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-20 11:43:06 +00:00
Michael Lotz
1e8c0b3649 * Implemented iovec based data handling in Transfer and UHCI
* Implemented QueueBulkV of the v3 API that uses it

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18540 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-20 01:07:15 +00:00
Michael Lotz
5b0ec61f97 * Added USB API Version 3. It's put into USB3.h while the v2 API resides in USB2.h. USB.h just includes USB2.h for now.
* Rewrote both headers on the way.
* The usb module now exports both, the v2 and v3 module_info.
* Changed the internals of the USB Stack to give out usb_ids instead of opaque handles to internal classes.
* Cleaned up some more of the Stack by moving members into other classes and removing unused stuff.
* Updated the usb_raw driver from v2 to v3 API.

Since both usb_hid (which still uses the v2 API) and usb_raw (which now uses the v3 API) work, I'd call it a success ;-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18539 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-19 23:09:05 +00:00
Michael Lotz
c3157a2749 Created a compatibility header for the USB Stack so that it can be compiled on BeOS too. How to do this correctly? I don't think that this stuff should go to HaikuBuildCompatibility.h as it's kernel stuff.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18538 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-19 13:18:03 +00:00
Stefano Ceccherini
27f1bc8217 Don't activate the window, because it will steal the focus from the current active window, and clicking elsewhere won't close the menu
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18537 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-18 10:26:29 +00:00
Stefano Ceccherini
152808170e Reverted the previous change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18536 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-18 10:18:10 +00:00
Stephan Aßmus
a3b31b17d2 added versions of the logos on transparent background, clipped to
have no unnecessary pixels around the logo


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18535 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-18 09:54:11 +00:00
Stefano Ceccherini
08c1246909 In case of error, errno should be set to a positive value. Yeah, I know,
it's sick.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18534 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-18 09:40:12 +00:00
Stefano Ceccherini
c941d45cd5 oldSet shouldn't be changed in case of error. Thanks axel for noticing
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18533 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-18 09:37:32 +00:00
Stefano Ceccherini
0ce93ee730 the signal block mask is inherited by the child process on fork()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-18 08:26:37 +00:00
Stefano Ceccherini
a5a36fe421 the second parameter of sigprocmask() can be NULL
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18531 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-18 08:00:07 +00:00
Stefano Ceccherini
8cf2c839c5 more fork() tests. Some pass, some fail
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18530 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-18 07:24:36 +00:00
Axel Dörfler
79dd3d935a * The parent/group dead semaphores are now released a bit earlier to make
wait_for_child() hanging less probable - there is a general problem with
  this code, though, as we need to have a dedicated free counter for the
  semaphore to remove all race conditions.
* Also, test fork_3-1 still sometimes fails because the thread is still
  available to the public for a short time, even after its death entry
  has been collected.
* Added a TODO in the code for these issues.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18529 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 21:45:37 +00:00
Axel Dörfler
73a56f1bac * wait_for_child() (the backend to waitpid()) did not work correctly in case you
wanted to wait for a specific child; it always assumed you had specified WNOHANG.
  This fixes the bug the fork_3-1 and fork_4-1 test applications reported. 3-1 still
  sometimes fails, but that's a different problem (to be solved later).
* Also, it could return B_BAD_THREAD_ID instead of the expected ECHILD (for waitpid()).
* There was a race condition between testing for a thread, and checking its death
  entry.
* wait_for_child() can now be interrupted in case it has to wait.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18528 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 21:40:55 +00:00
Axel Dörfler
d024bdc9e6 kill() is supposed to return ESRCH instead of B_BAD_THREAD_ID.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18527 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 19:59:44 +00:00
Axel Dörfler
3b46e73c2b Replaced DOS newlines with "real" ones :-)
This lets the files compile again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18526 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 18:16:23 +00:00
Stefano Ceccherini
278510fe87 added two tests for fork(). Both fail on waitpid().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18525 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 15:20:47 +00:00
Jérôme Duval
e18b600868 posix headers not needed anymore
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18524 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 14:27:15 +00:00
Jérôme Duval
cb57453f51 fix the build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18523 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 13:22:36 +00:00
Jérôme Duval
25160e5093 restored sys/ioccom.h in headers/compatibility/bsd/
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18522 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 12:58:01 +00:00
Jérôme Duval
44d5675324 KernelAddon and KernelStaticLibrary don't include kernel, kernel arch, boot platform headers anymore.
Fixed the build of most of targets using these rules. Though the build can be still broken, feel free to fix.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 12:18:11 +00:00
Stefano Ceccherini
83333816a2 adding back Terminal.cpp as it's obviously needed
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 08:41:53 +00:00
Stefano Ceccherini
16f6901c0b Removed old and unused files
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18519 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 08:08:49 +00:00
Stefano Ceccherini
6636dcac56 BTextView::DrawLines() was drawing some text over some already existing one. Fixes bug 738 (and also the weird text redrawing in Terminal and StyledEdit)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18518 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 08:00:27 +00:00
Stefano Ceccherini
4e338ac6df Started implementing menu keyboard navigation. Does only work for menubars because menu windows never get keyboard focus. Any idea how to solve this, since menu windows are B_AVOID_FOCUS both in beos and haiku?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18517 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 06:12:48 +00:00
Michael Lotz
5591ec214e Use the new usb_ioctl to get the logical device name for publishing devfs entries in usb_raw.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18516 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-16 20:10:49 +00:00
Michael Lotz
64f3c06503 Implemented a usb_ioctl to retrive the logical device name (like 0/0, 0/1/0 or 1/hub) that will be used by usb_raw to publish the according devfs entries.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18515 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-16 20:07:24 +00:00
Jérôme Duval
3bb475bdcb try at fixing bug #737
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18514 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-16 10:50:03 +00:00
Jérôme Duval
f96cab8aa3 tentative at fixing bug #733, unable to test
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18513 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-16 10:24:00 +00:00
Michael Lotz
8c76868794 Adding usb_raw driver. Written from scratch, but kept the data structures and status codes to be compatible with existing apps. Tested OK with the PTP plugin for Exposure.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18512 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-15 23:36:18 +00:00
Michael Lotz
bf9d24edd2 * Fixed memory leak of Transfers never getting deleted (intentionally until now).
* Reduced the Transfer class to a minimum and removed support for synchronous transfers. The only usage of this is in SendRequest(), which now provides a callback and QueueRequest()s it's request instead.
* Clarified semantics of SubmitTransfer(). It returns a status_t indicating wether the transfer was submitted successfully. This includes no information about the outcome. Therefore the UHCI RootHub now reports the status only through the callback and returns B_OK or B_ERROR for SubmitTransfer().
* Added comment to the Transfer class explaining who takes ownership of the Transfer in which cases.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18511 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-14 20:54:57 +00:00
Michael Lotz
49617128ca * Fixed data toggle handling. It must be taken after the transfer finished and from the last transmitted transfer descriptor (which in case of a short packet is not neccessarily the last descriptor of the chain)
* Moved convenience endpoint requests from ControlPipe to Pipe

With this change, bulk transfers are fairly stable now. See here for evidence: http://haiku.mlotz.ch/haiku-usb01.png ;). Those are pictures from my Canon Digital Ixus 750 downloaded with Exposure using the PTP plugin. I of course navigated Haiku with my USB Logitech iFeel mouse which works nice since some days.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18510 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-14 19:26:51 +00:00
Oliver Tappe
a6eda7a04f * added deletion of semaphores to close_hook() such that free_hook() is now actually
being called, resulting in the driver supporting taking interfaces down and back
  up
* some more cleanup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18509 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-13 16:33:13 +00:00
Stephan Aßmus
2f953b71af * min/max visibility scale is now between 0 and 4
* flat icon format optimizes for grays in styles


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18508 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-13 16:06:42 +00:00
Michael Lotz
d83f3c1a45 * Fixed setting configurations (need to use the configuration_value instead of the index of course)
* Fixed reported power status of the UHCI Root Hub
* Added preservation of the SOF_MODIFY register when doing a global reset of the UHC
* Read out the actual length for outgoing transfers too
* Made actual length handling for transfers a bit safer and correct in respect to NULL packets
* Use short packet detect to handle short packets
* First step at implementing the hub interrupt

Since the devices are now configured correctly, some bulk transfers actually work. Also my hub now reports its status correctly.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18506 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-13 14:48:10 +00:00
Stefano Ceccherini
bfb0aa18d3 some adjustments at the menu width calculation. Menus are generally a bit less 'compacted' now. Might need review
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18501 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-13 06:06:00 +00:00
Stefano Ceccherini
509c95da0e Added s small workaround in BMenu::OkToProceed() to fix deskbar not opening the be menu under heavy load (or, always, under qemu) if the mouse button was released too soon. Beos seems to do something similar, although it's a hack
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18500 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-13 05:39:00 +00:00
Michael Lotz
f1020a6c49 * Changed the Stack lock to a benaphore
* Removed some debug output from UHCI
* Added some debug output to the usb module instead ;)
* Rewrote the way new devices are attached and ports are handled (now more similar to FreeBSD)
* Corrected handling of port resets so that they should work on hubs too
* Cleaned up some headers

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18499 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-12 21:07:34 +00:00
Michael Lotz
8be9a75c4e Forgot this in my last commit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18497 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-12 12:50:53 +00:00
Michael Lotz
b8c6a85136 * Implemented most of the USB module public API (using opaque handles like in R5 will change that to using IDs later)
* Fixed the UHCI root hub and the hub implementation. Interface and endpoint descriptors are part of the configuration descriptor, they cannot be requested individually.
* Added simple support for interrupt and bulk transfers to UHCI. It's enough to get my USB mouse working to a stable and usable degree.
* Cleaned up and reworked some other parts, added allocation checks and such.

Yes, my internet connection is back up :)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18496 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-12 12:49:45 +00:00
Michael Lotz
852c3506f5 Check the reallocation in usb_hid. Use B_NO_MEMORY instead of B_ERROR in other checks.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18495 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-12 10:14:55 +00:00
Michael Lotz
4872c00b87 Fixed usage of realloc. Fixes crashing bug of usb_hid under Haiku.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-12 09:42:50 +00:00
Axel Dörfler
95e5d8a86c * Turns out GCC 4 didn't like my latest changes in Shelf.cpp.
* Further cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18493 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-11 20:28:33 +00:00
Axel Dörfler
0240ccffa0 Don't use <new.h> - there is <new> for you.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-11 20:08:51 +00:00
Axel Dörfler
ed0d15ba46 * Use max_c() instead of max() in C++ files.
* Updated license header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18491 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-11 20:06:09 +00:00
Axel Dörfler
78aa8eea3d * Added get_uint32_color() again, the previous "hack" doesn't compile
on GCC 4.
* Fixed buggy scripting error responses: "error" is only included on
  error, and B_ERROR (-1) can hardly be a candidate for the
  BMessage::what field (uint32).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18490 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-11 20:01:26 +00:00