Commit Graph

23743 Commits

Author SHA1 Message Date
Ingo Weinhold 08b2313e70 * Fixed some checks for user addresses. IS_KERNEL_ADDRESS is not the
same as !IS_USER_ADDRESS.
* Use the new IoctlSyscallFlagUnsetter helper class in _kern_ioctl().
  The former implementation wasn't checking correctly for a previous
  syscall flag.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24904 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 03:32:45 +00:00
Ingo Weinhold 89df64c56e Added two helper classes for dealing with restarts of ioctl() like
syscalls.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24903 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 03:29:42 +00:00
Ingo Weinhold bab4c3bbff Changed the type of msghdr::{msg_name,msg_control} to void* as dictated
by POSIX.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24902 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 03:27:53 +00:00
Ingo Weinhold 681fe624a3 Define HAVE_STDINT_H unconditionally. We have it, and some header
modification seemed to have caused the macro not to get defined anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24901 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 03:25:56 +00:00
Ingo Weinhold 7e8cb518e9 Finally decided to put the often copied RETURN_AND_SET_ERRNO() macro
into a header. This version instantiates the given argument only once.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24900 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 03:23:51 +00:00
François Revol 716bba3eae start of a header for a beos compatible tty module.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24899 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 23:29:45 +00:00
François Revol ef16b3bb76 Use the thread's stack size for RLIMIT_STACK, this should work even if we ever implement changing a thread's stack.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24898 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 21:56:22 +00:00
Stefano Ceccherini 0323cae536 Fixed warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24897 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 20:58:32 +00:00
Stefano Ceccherini 42bf22abf8 fixed warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 20:57:29 +00:00
Stefano Ceccherini 47908b9ae3 fixed warnings.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24895 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 20:48:38 +00:00
Michael Lotz 017d539c2a A few more things to get the USB stack working under BeOS again. We now have
KDEBUG on by default which causes benaphores to always use their semaphore.
Therefore when initing the benaphore with the inline compatibility function
and then using it using the lock.h provided inline would always cause a
deadlock and a hanging system under BeOS. Also we now (re-)define the
B_KERNEL_{READ|WRITE}_AREA defines for non Haiku targets to 0 apparently which
would probably also cause the stack to misbehave. Therefore they are now
just redefined (again) to plain B_{READ|WRITE}_AREA in BeOSCompatibility.h.
Change the inclusion order in some places so things work as expected.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24894 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 19:55:51 +00:00
François Revol c4a7b4e09e Report the stack size from getrlimit(), we might want to get fancier later but that should be enough. Tcl will want that.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24893 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 19:27:26 +00:00
François Revol 85e1e2f4d6 Coding style :P
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24892 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 18:05:00 +00:00
François Revol 42fe011d2a Set close-on-exec flag on USB Kit device descriptors, so apps launched by Tracker won't inherit all the fds to hubs as they do on Zeta :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24891 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 16:46:26 +00:00
François Revol 0116de8b74 The artist's reinterpretation of the Tcl/Tk interpreter (wish) icon, derived from the GLTeapot one.
It's the old oil lamp with the genius getting out. Would miss a top cover.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24890 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 14:52:36 +00:00
Axel Dörfler c28d31cce6 Removed unused variables.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24889 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 12:48:42 +00:00
Axel Dörfler cdde324d77 * Looks like r24456 was a bit premature: with string attributes, it makes sense
to ignore a trailing null byte, which the code now didn't do anymore.
* This caused bug #2054.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 11:43:45 +00:00
Ingo Weinhold 875757adef Wait states should be interruptable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24887 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 05:01:21 +00:00
Ingo Weinhold 9c796e6e71 * Added some debug output.
* Flags and timeout arguments to acquire_sem_etc() were swapped.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24886 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 04:12:40 +00:00
Ingo Weinhold 65a0f233b9 Looks like I had been fallen asleep before finishing the implementation.
After successfully copying the data from the receive queue into a new
buffer, we should actually return that buffer and update the queue size.
recv() doesn't KDL anymore when reading less data than queued.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24885 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 03:27:31 +00:00
Ingo Weinhold eb8b342d56 Protocol module for Unix domain stream type sockets. The implementation
is almost complete, but still quite buggy (receiving data has a good
chance to drop into KDL). 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24884 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 03:17:05 +00:00
Ingo Weinhold f8b4d83f2f New service function vfs_create_special_node() to create special nodes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24883 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 03:07:07 +00:00
Ingo Weinhold ef7cb2253b Rather use a char[] for the path. uint8_t[] is rather uncomfortable to
use with the string and *printf() functions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24882 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 03:06:11 +00:00
Ingo Weinhold 64cd033664 Added socket macros.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24881 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 03:04:03 +00:00
François Revol 8ff902d0bd Fix building usb busses with tracing on.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24880 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 21:53:11 +00:00
Maurice Kalinowski a7fb4c16b6 fix some gcc4 related warnings...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24879 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 20:28:55 +00:00
Maurice Kalinowski 3c08ed4a34 Don't reset the duration value after passing it to SetRef as pointed out by Marcus.
Sorry for taking so long to commit this...



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 19:43:49 +00:00
François Revol facc00359b Fix building usb bus manager with TRACE on.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24877 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 18:46:24 +00:00
Rene Gollent aa84c115f6 Build fix :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24876 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 18:16:53 +00:00
Axel Dörfler 400ba068e0 Made sure load_driver_symbols() is not used anymore when building for Haiku;
it's a no-op, and I removed the prototype from KernelExport.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24875 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 17:48:36 +00:00
Axel Dörfler afaf6f2f1b * Implemented open_module_list_etc() in libkernel_emu.so as well.
* Added license.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24874 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 14:45:17 +00:00
Axel Dörfler 8b79f1fd68 * Added open_module_list_etc() that also allows to specify a required name
suffix. You can use this to verify the version of a module_info structure.
* Made module_info::std_ops optional.
* Minor cleanup in module.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24873 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 14:36:04 +00:00
Axel Dörfler 4f61b1059c Added some macros and an error message if another compiler than GCC is used.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24872 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 14:21:45 +00:00
Axel Dörfler 037f70947f * Cleaned up KernelExport.h completely, removed deprecated and non implemented
API, uses the _PRINTFLIKE macro where appropriate.
* Got rid of the "qent" structure, struct timer now contains everything we
  need. This makes the affected code in sem.cpp, signal.cpp, and timer.c much
  cleaner, and resolves a few TODOs.
* Minor cleanup in vfs.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24871 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 14:21:06 +00:00
Axel Dörfler 36de598e0f * block_cache_sync[_etc]() now also waits for all notifications to be handled.
This fixes a potential problem where a volume would be left marked dirty on
  a clean reboot as reported by Vasilis; no harm would have been done to the
  data on the volume, though (it would just replay a log entry that it didn't
  need to).
* Unified the naming of the notifier/writer thread: renamed the thread to "block
  notifier/writer", and the variable holding the thread ID to
  sNotifierWriterThread.
* Added a few more doxygen descriptions to the private functions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24870 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 11:04:26 +00:00
Axel Dörfler cfc3fa87da * Cleaned up InterfaceDefs.h, added TODO about getting rid of declaring
_init_interface_kit_() in there.
* Moved private get_mode_parameter() into the BPrivate namespace.
* Renamed interface_misc.h to InterfacePrivate.h.
* Minor other cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 10:07:35 +00:00
Ingo Weinhold 3daf03d3ab I broke the index dir access when changing the FS interface.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24868 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-08 21:14:21 +00:00
Oliver Ruiz Dorantes 2154bbe8d6 Added copyright
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24867 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-08 20:39:04 +00:00
Oliver Ruiz Dorantes da9793832b ObjectList is required
Courtesy of candidate SoC student Adrien Destugues 



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24866 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-08 20:02:29 +00:00
François Revol c78985abf5 Replace spaces with tabs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24865 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-08 15:18:19 +00:00
Axel Dörfler 3d7e508f7b Added sys/poll.h header by popular request (see ticket #2037).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24864 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-08 09:17:07 +00:00
Stefano Ceccherini e5e708ca39 Removed the snooze() call before tracking the popup menu. This should
avoid the problem noticed by Andrea Anzani (can you check, please ?) 
where the tracker menu would close when moving the mouse too fast.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24863 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-08 08:37:05 +00:00
Stephan Aßmus 67d5c5a838 Implemented Oliver's suggested improvement to ServerCursorReference when
switching cursors. There was a race condition in case the objects was used
by multiple threads, in which Cursor() could return an already destroyed
object. Note: This doesn't fix a real bug or anything, the change is purely
forward looking in case ServerCursorReference is ever used like that.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24862 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-08 08:12:38 +00:00
Michael Lotz bfbbfedc5f * Prepare usb_raw.h for eventually being made public. Prefixed enums values
with B_USB_* and the command union is now usb_raw_command.
* Changed usb_raw and the BUSB* classes accordingly.
* Moved the raw_device struct into usb_raw.cpp as suggested by Francois as it
  was the only thing usb_raw_private.h defined.
* Removed usb_raw_private.h again because of the above.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24861 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-08 07:53:43 +00:00
Ingo Weinhold 5822847842 If the entry leaf name is "." or ".." we need to resolve it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24860 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-07 19:41:49 +00:00
Ingo Weinhold 54045c2e44 * Explicitly support source paths with a leaf name "." or "..". In this
case the contents of the directory shall be copied into the target
  directory, not the source directory itself. This is actually a feature
  the build system uses for installing in a directory, but I've only
  ever tested it under Linux and there a bug in libbe_build made it work
  automatically. Fixes #2036.
* Removed copy and paste left-over for the "-x" and "-X" options.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24859 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-07 19:40:52 +00:00
Michael Lotz d419b482ad Integrate the USBKit into libdevice and make it public. I left the USBKit.h
name, as it in fact is like a kit in the kit. It combines the different BUSB*
classes as compared to SerialPort.h where there really is a 1:1 relationship
between the header and the (one) class. If someone has a better fitting name
please shout.
Separated the usb_raw.h into usb_raw.h which defines the protocol and
usb_raw_private.h which holds the internal device structure for usb_raw. This
reduces the header dependencies.
Hopefully cought all occurencies of USBKit.a usage (in usb_dev_info and
the usb_webcam media add-on) but might have missed something that is not in
the image.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-07 19:24:16 +00:00
Michael Pfeiffer d4f7b8428a Applied patch for ticket #2042 by Philippe Saint-Pierre: List box was overlapping the label of the list box.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24857 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-07 19:04:07 +00:00
Axel Dörfler 8b5e5656f4 * BFS now panics if cache_sync_transaction() didn't free the space needed,
instead of writing over the old log entries.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24856 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-07 12:15:15 +00:00
Axel Dörfler b9fe86d2d7 * Added pthread_setconcurrency(), and pthread_getconcurrency() functions.
* Since we use a 1:1 mapping, they don't do anything besides remembering the
  level set, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24855 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-07 10:57:01 +00:00