Commit Graph

23699 Commits

Author SHA1 Message Date
Stefano Ceccherini
150ddd17b1 added missing header
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 08:29:54 +00:00
Stefano Ceccherini
10f4d0679a Added a class MenuPrivate to handle access to private BMenu methods.
BMenuItem and BWindow are no longer friends of BMenu, but use this class 
instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24909 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 08:22:09 +00:00
Ingo Weinhold
df50f7a9b4 * Changed the way the socket functions work:
- The net_stack driver is no longer used. Instead we have a kernel
    module which is directly used by syscall implementations in the
    kernel. I.e. we no longer tunnel those functions through ioctls, but
    have normal syscalls.
  - Removed the superfluous net starter module.
  - Implemented the FDTYPE_SOCKET type file_descriptors, that is sockets
    are no longer vnode based.
  - Adjusted libnetwork (the socket function implementations)
    accordingly.
  - Adjusted netstat accordingly.
* Socket module:
  - Implemented socketpair().
  - Added "kernel" parameter to the control hook. Quite a few more hooks
    would actually need the parameter, but I didn't change those yet,
    since that would probably also require changes to the protocol
    module interface.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24908 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 04:12:23 +00:00
Ingo Weinhold
446d50a652 Removed unused _kern_socket() dummy.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24907 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 03:37:18 +00:00
Ingo Weinhold
0fc6c43728 Resolved TODO: We can check for sockets, now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24906 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 03:35:15 +00:00
Ingo Weinhold
3cc3dcb385 Preparation for socket file descriptors.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24905 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 03:33:59 +00:00
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