Commit Graph

3488 Commits

Author SHA1 Message Date
Ingo Weinhold
f38eff6aa2 Added a few more functions to the host platform BeOS compatibility layer:
* thread related functions,
* semaphore related functions,
* atomic_*() functions,
* readv_pos(), writev_pos().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-27 12:11:30 +00:00
Hugo Santos
8ac2dba331 added iterator to OpenHashTable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20853 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-27 08:07:38 +00:00
Hugo Santos
5084c83901 addressed Axel's suggestion regarding SocketAddress' GetPort() name.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-27 07:20:43 +00:00
Hugo Santos
25a2744f9e adapted UDP to use AddressUtilities, for readability.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20850 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-27 07:10:11 +00:00
Hugo Santos
4b55736dde added new helper ProtocolSocket. Moved some stuff together to achieve better inlining.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20848 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-27 07:09:46 +00:00
Marcus Overhagen
4b095722c7 new debug header for media kit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20846 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-26 20:40:27 +00:00
Marcus Overhagen
a4c8b51d3a changed header guard
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20845 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-26 20:39:30 +00:00
Hugo Santos
5d6551d69f removed some of the slab's initial heavy debugging. we now merge the links into the slab itself resulting in zero overhead per buffer with MergedLink strategy.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20841 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-26 15:40:53 +00:00
Hugo Santos
e6fb3d3947 more slab fixes, also introduced a new strategy optimized for medium sized buffers (64 >= x < 512) with lengths other than power of 2 (has an overhead of 2 words per buffer).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20839 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-26 11:38:24 +00:00
Hugo Santos
dd89ad0e7e added locking to slab's Cache<>. Now we react to system's low memory conditions freeing up empty slabs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20836 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-26 07:31:19 +00:00
Hugo Santos
b8c0d6618e gcc 4 compilation fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20835 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-26 06:32:25 +00:00
Hugo Santos
81bc570922 assorted slab fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20833 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-26 06:05:08 +00:00
Hugo Santos
81423c91c7 added initial slab code to the kernel. It is still unused, and there is still no VM interaction.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20832 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-26 03:41:24 +00:00
Hugo Santos
77e70865e1 moved the storage requirements (i.e. ParentType *) to OpenHashTable's Definition which we now instantiate per OpenHashTable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20824 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-25 19:21:06 +00:00
Hugo Santos
2586c25e31 use Chaining in OpenHashTable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20822 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-25 18:55:05 +00:00
Hugo Santos
66a4a42802 added Recv-Q/Send-Q output to netstat.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20819 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-25 17:41:18 +00:00
Hugo Santos
585195c28d introduced SocketAddress wrappers and use them in TCP.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20818 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-25 17:41:01 +00:00
Jérôme Duval
c36e4d4c9f updated freetype to 2.3.4
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-25 17:18:01 +00:00
Hugo Santos
53f23f85a2 partially rewrote TCP's endpoint manager. Fixes #1173
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20814 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-25 16:14:14 +00:00
Axel Dörfler
5c03270bea Added block_cache_sync_etc() that allows you to sync single blocks.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-25 12:07:30 +00:00
Hugo Santos
85dbe747c4 open addressing self-extending hash table implementation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20791 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-24 11:04:35 +00:00
Jérôme Duval
56490cf3b7 virtualized DirectConnected() and EnableDirectMode()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20786 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-23 22:08:34 +00:00
Hugo Santos
8a819b17e4 retrieve the incoming interface on the domain_receive_adapter(). This should fix potential issues with packets addressed to the IP broadcast address, such as in with some DHCP implementations.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20767 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-20 04:40:53 +00:00
Hugo Santos
74b0e85845 merged a bit more of functionality into DatagramSocket so we don't require a custom ReadData in the link protocol.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20765 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-20 02:13:54 +00:00
Hugo Santos
2445c00e64 some internal reorganization of getsockopt()/setsockopt() handling. TCP is now able to fully use the application requested sender/receiver buffer sizes for improved performance.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20764 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-20 01:58:14 +00:00
Stephan Aßmus
375dc591e6 * thought of an extension for the icon editor protocol
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20755 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-19 19:28:57 +00:00
Stephan Aßmus
f591eb8ba0 * cleanup license header (and convert Jérôme to UTF8)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20754 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-19 19:26:44 +00:00
Stephan Aßmus
66cd7e6cc6 * define some more stuff
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20753 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-19 19:22:49 +00:00
Jérôme Duval
31ebfe61e4 added default sound events
implemented system_beep() by sending an event to the media addon server


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20728 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-16 19:15:46 +00:00
Hugo Santos
d5b5a2c2f8 introduced Checksum::PseudoHeader helper.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20717 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-15 23:18:15 +00:00
Hugo Santos
1408d1f0ce introduced datalink's send_datagram to perform route and source address selection and dispatch the datagram to appropriate domain/protocol.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20714 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-15 22:11:12 +00:00
Hugo Santos
624c52d8b7 ARP now queues packets while resolving a destination instead of blocking on send_data(). This fixes several issues:
- TCP now behaves correctly when receiving new connections as its SYN/ACK is queued, or if lost correctly retransmitted when the peer resends a SYN.
 - The first ICMP Replies from an external on-link host pinging Haiku are no longer lost.
 - Reduced the number of ARP messages Haiku needs to generate until resolving an entry.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20712 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-15 21:00:12 +00:00
Jérôme Duval
33c487a43e implemented add_system_beep_event()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20711 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-15 20:40:12 +00:00
Jérôme Duval
88ec4b1dbe fixed some warnings
code style of MMediaFilesManager.* 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20703 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-15 13:59:59 +00:00
Hugo Santos
6a60618094 glued the multicast filter handling to the receive path: we are now capable of receiving multicast frames in datagram sockets.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20695 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-15 07:31:04 +00:00
Hugo Santos
6c501a4085 support RFC 3678's Protocol-Independent setsockopt()s for IPv4 multicast.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20691 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-15 03:07:28 +00:00
Hugo Santos
46527f6806 initial steps towards IPv4 Multicast Filter Delta API (RFC 3678)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20690 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-15 02:44:01 +00:00
Axel Dörfler
ffcc37a0aa * Added and implemented B_INVALIDATE as available on Dano; to invalidate only a certain
part of the view, you can add a BRect "be:area" to that message - very handy.
* Cleaned up AppDefs.h a bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20683 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-14 18:11:42 +00:00
Hugo Santos
49f3c71e21 respect SO_BROADCAST for received and sent datagrams.
- check if the destination address is specified in IPv4's SendData()
 - minor cleanups to IPv4's TRACE()s.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20681 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-13 21:33:13 +00:00
Marcus Overhagen
36e0e8a8bd Interface definition of DVB drivers. Currently private API.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20677 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-13 15:52:58 +00:00
Hugo Santos
658a550639 use module_dependencies to load the required modules by udp, tcp, ipv4, icmp and arp.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20676 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-13 14:37:48 +00:00
Hugo Santos
57e2a3d584 only deliver frames to IPv4 raw sockets of the specified protocol.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20675 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-13 04:20:39 +00:00
Hugo Santos
d438fa4c12 added buffer, datalink and socket module references to the stack module so we don't have to load them in each other module.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20673 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-13 03:06:36 +00:00
Hugo Santos
bfb45f717c introduced a new helper class DatagramSocket which provides a consistent base interface and functionality for the implementation of datagram-based sockets.
- made the ipv4 raw, udp and link protocols use DatagramSocket.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20672 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-13 00:55:32 +00:00
Jérôme Duval
72b4b94081 use __builtin_offsetof for gcc4 and superior, it avoids a gcc4 broken build with template use of offsetof()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20669 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-12 18:36:37 +00:00
Jérôme Duval
b342ed59fb gcc4 is picky with in-template symbols, they must be qualified
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20668 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-12 18:17:31 +00:00
Jérôme Duval
b12aab90c7 fixed typo
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20667 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-12 18:11:11 +00:00
Hugo Santos
6c35350908 moved address selection logic to a new 'get_buffer_route'.
- IPv4 now assumes the addresses it is supplied in send_routed_data are already the appropriate ones.
 - made the Data(), operator* and operator-> methods in NetBufferFieldReader const so we can use them in the same expression as the constructor.
 - fixed an issue with UDP where the wrong source address could be used in the calculating the checksum.
 - changed ipv4_print_address to use the more common 0.0.0.0 format.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20660 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-11 22:24:12 +00:00
Hugo Santos
87001e059c some NetBufferUtility revamp.
- introduced base NetBufferFieldReader which deals with obtaining a continuguous field to deal with.
 - renamed Detach() to Sync() to better express the fact that we may be writing to the buffer.
 - Fixed IPv4's and ICMP's checksum calculation as it assumed the underlying header was contiguous.
 - ICMP is now able to reply to ICMP Echo Requests which were split across data nodes.
 - in split_buffer(), make sure we were able to trim() the new buffer before damaging the original one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20657 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-11 16:40:40 +00:00
Hugo Santos
af56b5b233 fixed add_tcp_header() as it wasn't considering the possibility that prepending data would not result in a contiguous buffer. This would result in wrong checksums for apparent no reason.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20643 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-10 19:04:13 +00:00
Hugo Santos
8107b19403 Fixed some more TCP issues.
- Properly flag sockets using non-blocking connects() when in SYN SENT.
 - and when in LISTEN, we should use the socket's connection queue size.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20631 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-10 05:28:56 +00:00
Hugo Santos
e53357d57a Prepared net_device_monitor to accept device removal events.
- Introduced public net_device_monitor.
 - Changed the link protocol to maintain a lock per instance instead of inside the FIFO. Now all of the link instance data is protected.
 - Adapted the link protocol to use net_device_monitor.
 - Introduced a private Fifo class which doesn't maintain it's own lock.
  - Maybe we should add something like a public net_protocol_implementation which maintains a fifo and a benaphore? With the fifo using the structure's lock instead of maintaining it's own.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20614 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-08 09:15:52 +00:00
Ingo Weinhold
d307e81230 Added ENOATTR.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20607 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-08 02:01:07 +00:00
Jérôme Duval
0c93c0a807 change the way FileGameSound works : avoid using a port
code style, some clean up


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20603 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-06 22:40:23 +00:00
Hugo Santos
0d5afa4dec introduced fifo_socket_enqueue_buffer which clones the buffer, enqueues it to the fifo and notifies the socket.
- changed the link, ipv4 and udp modules to use fifo_socket_enqueue_buffer


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20587 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 17:56:20 +00:00
Hugo Santos
17b77c3b92 consolidate all RECV/SEND ioctls into a single RECEIVE/SEND pair
- changed the socket module to use thew new RECEIVE/SEND in all forms of recv() and send()
 - changed libnetwork to use the new RECEIVE/SEND
 - remove transfer_args processing from strace since the structure was removed


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20581 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 14:26:46 +00:00
Hugo Santos
dae7f8ea46 initial recvmsg and sendmsg implementations
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20562 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 17:39:43 +00:00
Hugo Santos
36883c5516 ipro1000: added ETHER_GET_LINK_STATE support
* use em_media_status to get link status
 * added IFM_1000_SX (Fiber Optic) to net/if_media.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20551 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 12:50:54 +00:00
Axel Dörfler
9206bb3779 * Changed ETHER_GET_LINK_STATE ethernet driver interface, added ETHER_SET_LINK_STATE_SEM.
* The device interface list now uses class DoublyLinkedList instead of struct list.
* Implemented SIOC[SG]IFMEDIA for setting (not supported by any device yet), and
  retrieving the device media information.
* Fixed a locking bug in list_domain_interfaces().
* Added new stack function device_link_changed() that should be called in case the
  link state (media) changed.
* The ethernet device module now spawns a thread and will periodically check the media
  state of all ethernet devices that support this (if any).
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20546 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 09:41:04 +00:00
Axel Dörfler
1a3ab92b81 * Rewrote ether_driver.h, removed some BONE stuff we don't support at this point;
it might also be a good idea to change the constants to better match the usual
  style.
* Added a BSD-style if_media.h.
* Added interface flags IFF_LINK, IFF_AUTO_CONFIGURED, and IFF_CONFIGURING. The
  former will be set automatically by the stack, the rest will be set by the
  net_server depending on the current state.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20535 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-03 14:42:07 +00:00
Ingo Weinhold
ed07b9c7e3 The last missing hooks -- get_vnode_name(), write_attr_stat() and
rewind_query() -- are passed to the userland. get_vnode_name() has an
emulation in userland, in case the client FS doesn't implement it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20522 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-03 04:40:54 +00:00
Axel Dörfler
2d55afcdf7 Support getting route information for a specific destination
using SIOCGETRT. Patch by Hugo Santos.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-01 12:06:16 +00:00
Ingo Weinhold
27d37d4d24 * Optional debug feature for tracking which page queue a page should be
in.
* New debugger command "find_page", which searches all page queues to
  find out, which one a page is actually in.
* Solved nasty race condition between the page scrubber and
  vm_page_allocate_page_run(): The page scrubber didn't mark the pages
  it was processing busy, so that vm_page_allocate_page_run() could claim
  them in the meantime. They would end up in the clear pages queue,
  although being assigned to a cache at the same time. This should
  finally solve bug #1056.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20474 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-30 19:48:51 +00:00
Axel Dörfler
9c62a6ed7d Rewritten Debug.h by Vasilis Kaoutsis.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20473 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-30 14:43:25 +00:00
Ingo Weinhold
b8ba8f58d7 Added the disk device API to the libbe_haiku.so, so that libtracker.so builds
again for target libbe_test. Added respective syscall stubs and other functions
to libhaikucompat.a.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20447 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-28 15:20:08 +00:00
Ingo Weinhold
2b2ec4382a * Moved the AutoLocker class out of the kernel/utils/AutoLock.h header
into its own shared/AutoLocker.h. It can be used by userland code too.
* Removed headers/private/shared/ObjectLocker.h and replaced all uses of
  BObjectLocker by AutoLocker.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20432 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-27 12:05:33 +00:00
Axel Dörfler
c6a7ff7a9f * The new vm_page_mappings weren't updated correctly in many cases.
* Added a comment to vm_remove_all_page_mappings() that shows that we need to
  change the mapping spinlock into a mutex.
* Pointed out some potential problems in the code.
* Added vm_page_at_index(), vm_clear_map_activation(), and vm_test_map_activation()
  in preparation of the page scanner rewrite.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20407 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-23 11:48:37 +00:00
Ingo Weinhold
27810ccf5e Added the last useful features I dare imagine: A Lock() method and the
possibility to initialize the AutoLocker without locking the object even
if it is unlocked yet. Especially in loops Lock()/Unlock() come handy
when an otherwise constantly hold lock needs to be unlocked for a short
time.

I suppose we should move the kernel utils AutoLocker implementation
to headers/private/shared, and drop the less powerful ObjectLocker.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20405 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-23 00:03:59 +00:00
Axel Dörfler
bdfc47dbcd * Fixed the test for equality when a known ARP reply came in - you should no longer
see the "ARP entry updated with different address" message.
* sockaddr_dl::sdl_data is now unsigned (uint8_t instead of char).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20399 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-20 22:21:36 +00:00
Ingo Weinhold
44b5d72b5a Added new functions to the debugger API:
{set,clear}_debugger_{break,watch}point(), allowing to set/clear break
and watchpoints for the calling team. When a break/watchpoint is hit,
the team enters the debugger. Handy in situations when the program in
question can't really be started in a debugger (or it would be
complicated to do so). The functions work only as long as no debugger is
installed for the team.

We clear the arch specific team and thread debug infos now, when a new
debugger is installed, thus clearing break- and watchpoints.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20396 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-20 16:20:13 +00:00
Ingo Weinhold
2c97a8d164 Use -I instead of -isystem for system header directories when building
with gcc 4. Fixed resulting build errors (gcc is more lenient for
headers in -isystem directories).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20386 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-14 20:36:42 +00:00
Jérôme Duval
4d275b2b21 added some Haiku media definitions
made mpglib beos compatible


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20383 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-13 23:10:19 +00:00
Stefano Ceccherini
a3d758e369 Added support for font settings in PictureDataWriter. Not used yet
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20381 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-13 11:14:47 +00:00
Ingo Weinhold
d0c61f232b More distinctive header guard.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20370 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-11 21:20:23 +00:00
Axel Dörfler
826e857cf0 Implemented hash_remove_current() which removes the current iterator position
from the hash - not yet tested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20368 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-11 21:18:49 +00:00
Ingo Weinhold
9781d591cb Include <util/kernel_cpp.h> in DoublyLinkedList.h only when compiling
for the kernel. Added missing includes in userland code that uses the
header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20366 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-11 13:56:45 +00:00
Axel Dörfler
6e601ee88f get_memory_map() now panics (and fails) in case it was called on unmapped memory as
suggested by Ingo; before it would just fill the physical pages with NULL pointers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20364 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-11 13:27:42 +00:00
Axel Dörfler
1594e83f84 * All mapped pages that are not wired (ie. locked) now have a vm_page_mapping object
that points to both, the page and the area the page is in. This will allow a page
  scanner to steal unused pages when necessary.
* The locking is currently done with a spinlock which we might want to have another
  look at one day.
* dump_page() and dump_area_struct() now dump the page mappings as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20356 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-08 14:35:26 +00:00
Ingo Weinhold
2f92537221 One unremove_vnode() prototype shall suffice.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20339 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-06 01:22:47 +00:00
Axel Dörfler
863634b83f Patch by Euan Kirkhope:
* Initial support for Rage Theatre 200.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20338 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-05 21:16:15 +00:00
Axel Dörfler
76b5213f47 Patch by Euan Kirkhope:
* Use AGP Bus manager module
* Fixed wrong framebuffer address computation; this should fix bug #1079.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20336 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-05 17:06:27 +00:00
Ingo Weinhold
4e0e80ed6c We analyze a client FS's capabilities -- i.e. which hooks it provides or
can be emulated -- and pass this info to the kernel add-on. Thus we can
avoid passing requests to the userland that can't be serviced anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20331 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-05 05:16:08 +00:00
Ingo Weinhold
cf4ccd6575 Renamed the FS interface hook read_link() to read_symlink().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20330 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-05 03:52:57 +00:00
Ingo Weinhold
12d359b85a * Removed write_link from the FS module interface. Adjusted all FS
add-ons accordingly and removed the syscall.
* Removed send_notification().
* Reimplemented notify_listener(). It used the unimplemented
  send_notification(). Now it has a chance to work. Note that
  notify_listener() is obsolete. I would already have removed it, if
  there weren't lots of FS implementations still using it (Hint!).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20329 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-05 00:46:57 +00:00
Ingo Weinhold
6aeea78c6e Made the UserlandFS code gcc4 friendly.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20322 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-04 08:26:45 +00:00
Ingo Weinhold
eb9b19800b Fixed gcc 4(.1.2) build problems.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20320 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-04 05:00:40 +00:00
Ingo Weinhold
30589be58b Added C++ guard. I don't know, why we define the <wctype.h> protos both
there and in <wchar.h>. Any reason for not removing them in <wctype.h>? Or
maybe even nicer reverse the inclusion direction, i.e. remove the
duplicate protos in <wchar.h> and include <wctype.h> instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20317 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-04 02:31:43 +00:00
Ingo Weinhold
97dd0fe3c8 * Adjusted according to the is_vnode_removed() -> get_vnode_removed()
change.
* The new notification functions are used instead of send_notification()
  and notify_listener() now. Mapped them in the BeOS kernel emulation
  accordingly. RamFS node monitoring seems to work now. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20298 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-02 00:41:09 +00:00
Ingo Weinhold
9481e62bdb is_vnode_removed() is now known as get_vnode_removed() and returns its
answer through a reference parameter.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20297 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-02 00:34:20 +00:00
Marcus Overhagen
0b0ecfab90 Added "const" to many parameters.
Removed most data allocations/copying from PicturePlayer, ServerPicture now has to do this when converting coordinates.
Added additional functions to ViewLayer to copy&convert multiple BPoint, BRect, BRegion to Screen coordinates, those should be further optimized.
Removed some function call overhead.
Note: some functions of PicturePlayer don't appear to be implented by PictureDataWriter,


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20292 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-01 23:17:40 +00:00
Marcus Overhagen
a20cecff60 removed unnecessary use of const_cast<> and (global) do_playback() function
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20290 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-01 18:37:55 +00:00
Axel Dörfler
0c12332715 * vm_map_physical_memory() now sets the wiring/locking type of the area created
to B_FULL_LOCK.
* vm_clone_area() now respects the source area's wiring and inherits it. This
  should fix bug #1055.
* vm_cache::type is now duplicated in vm_area::cache_type - this allows looking
  it up without having to lock a vm_cache_ref; this also solves a locking bug
  in vm_unmap_pages() in this regard.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20281 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-01 13:44:55 +00:00
Axel Dörfler
7ce2eaa1e0 Patch by Euan Kirkhope:
* VIP FIFO functions for Rage Theater200 support


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20278 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-01 09:43:33 +00:00
Axel Dörfler
0caeca2af7 Patch by Euan Kirkhope:
Sync overlay with x.org


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20277 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-01 09:41:37 +00:00
Axel Dörfler
df647a5c3d Patch by Euan Kirkhope:
* Laptop LCD Backlight rework + powermanagement


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20276 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-01 09:38:11 +00:00
Axel Dörfler
b8fb3d1705 Patch by Euan Kirkhope:
Monitor Routing rework
 * mostly to fix my issues with dual monitors VGA + DVI which didn't work! ;)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20275 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-01 09:35:22 +00:00
Axel Dörfler
19cadc2f7d Patch by Euan Kirkhope:
* Kernel settings configuration added


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20274 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-01 09:33:08 +00:00
Axel Dörfler
a85694c375 Patch by Euan Kirkhope:
* option for PIO engine instead of DMA (for dodgy X700s)
* misc RAM config changes inline with x.org codebase


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20273 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-01 09:28:25 +00:00
Axel Dörfler
300bef5821 Patch by Euan Kirkhope:
* New "ATOM" BIOS Support for radeons X-series
* This also removes scanning for the BIOS signature for other cards


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20272 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-01 09:05:12 +00:00
Axel Dörfler
8841d8bcd1 First of a set of patches by Euan Kirkhope:
* Headers updated
 * PLL errata workarounds
 * Radeon asic type overhaul (consolidated)
 * Device IDs Updated.
 * support for X-series devices with legacy bios type
 * minor tidy ups / compiler warnings (casts)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20271 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-01 09:00:49 +00:00
Travis Geiselbrecht
0098867364 this seems to solve the 'lock up on bootup on core 2' problem.
Basically, there was a pretty subtle race between the cpus in main where if the main cpu released the AP cpus and then before the AP cpus had a chance to run the boot cpu started creating the main thread (which causes smp ici messages to be created) the system would livelock, where the boot cpu waited forever for the AP cpu to acknowledge the ICI (for a TLB flush when creating the kernel stack).
Added smp_cpu_rendezvous(), used to synchronize all the cpus to a particular point, and used it a few times in main().
While i was at it i fixed another race that'll probably never happen, but what the hey. Make sure the kernel args are copied into kernel space by the main cpu before letting any other ones use it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20269 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-01 08:09:28 +00:00
Ingo Weinhold
042eb16896 * More debug output in the kernel module.
* Made publish_vnode() available in userland. For old style FS add-ons
  publish_vnode() is used when they request a new_vnode(). The semantics
  of new_vnode() changed considerably in Haiku, but publish_vnode()
  seems to do pretty much what the old new_vnode() did.
* The UserlandFS hosted RamFS begins to work under Haiku. It runs pretty
  soon out of memory though (under vmware with 256 MB) and node
  monitoring is broken ATM.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20264 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-01 04:56:08 +00:00
Ingo Weinhold
617ed3e4a9 Implemented the new attribute open/close/... FS hooks. The mapping to the
old interface is completely done in userland ATM.

It becomes more and more obvious that we probably need to provide
the kernel add-on with a bit more information about what the client FS
interface supports in the first place, so we can save unnecessary trips to
the userland. Opening/closing attributes for a FS using the old style
interface could be handled completely in the kernel add-on, for instance
(even if we lose a bit of accuracy wrt to open modes etc.).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20258 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-01 01:16:13 +00:00
Ingo Weinhold
223bba10f3 Resurrected is_vnode_removed().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20256 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-28 22:24:28 +00:00
Ingo Weinhold
c10705cbda We do now provide the BeOS style FS add-ons with the kernel interface they
need via library libuserlandfs_beos_kernel.so. Fine-tuned the legacy headers
so they can by used by the the kernel interface emulation code as well as by
the add-ons. This is actually a bit hacky, since we build everything in the
Haiku build environment and thus mix these old headers and Haiku's.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20254 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-28 22:07:40 +00:00
Jérôme Duval
52710d6211 fixed the build; I also changed MoveFrom(), untested
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20252 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-28 19:35:57 +00:00
Axel Dörfler
ca954b7816 Another work-in-progress towards having extra structures per mapping per page:
* vm_area and vm_page now have a new field "mappings" where they will store lists
  of vm_page_mapping structures. vm_page::ref_count is gone, as it's no longer
  needed (it was never updated correctly, anyway).
* vm_caches now have a type field, ie. CACHE_TYPE_RAM for anonymous areas - this
  makes the stores a bit less independent, but is quite handy in several places.
* Added new vm_map_page() and vm_unmap_pages() functions to be used whenever you
  map in or unmap pages into/from an area. They don't do much more than handling
  vm_page::wired_count correctly right now, though (ie. B_LAZY_LOCK is now working
  as expected as well).
* Moved the device fault handler to vm_map_physical_memory(); it was not really
  used as a fault handler, anyway.
* Didn't notice Ingo's changes to the I/O space region broke lock_memory(). It
  now checks the type of the area that contains the memory, and doesn't lock
  anymore if not needed which solves the problem in a platform independent way.
* Implemented lock_memory() and unlock_memory() for real: they now change the
  vm_page::wired_count member to identify pages that shouldn't be paged out.
* vm_area_for() now uses vm_area_lookup() internally.
* Fixed various potential overflow conditions with areas that reach 0xffffffff.
* Creating anonymous areas with B_FULL_LOCK no longer causes vm_soft_fault()
  to be called, instead, the pages are allocated and mapped (via vm_map_page())
  directly.
* Removed the _vm_ prefix for create_area_struct() and create_reserved_area_struct().
* Fixed a bug in vm_page_write_modified() that would not have enqueued pages that
  failed to be written to the modified queue again when needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20251 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-28 13:24:53 +00:00
Axel Dörfler
91f1fe44d2 It really should only have an fFirst member :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20250 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-28 11:31:19 +00:00
Axel Dörfler
c210cfeb9a Added a doubly linked queue that is similar to the list, but only has a pointer
to its header. Not yet used or tested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20248 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-28 08:21:02 +00:00
Ingo Weinhold
8474904ee0 Adjusted the FileSystem, Volume, and UserlandRequestHandler to the new FS
interface. The classes actually interfacing with the client FS add-on still
need to be adjusted.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20246 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-27 23:27:27 +00:00
Axel Dörfler
3eca858515 * Moved the early startup VM allocation functions from vm_page.c to vm.cpp.
* Renamed them, made everything static besides vm_allocate_early() (previous
  vm_alloc_from_kernel_args()) which now allows you to specify a different
  virtual than physical size, and therefore makes vm_alloc_virtual_from_kernel_args()
  superfluous (which isn't exported anymore, and is now called allocate_early_virtual()).
* Enabled printing a stack trace on serial output on team crash - it doesn't hurt
  for now, anyway.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20244 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-27 19:26:40 +00:00
Ingo Weinhold
b12d25d15d First walk through the userlandfs kernel add-on to port it to the Haiku
FS interface. Adjusted old hooks, but didn't add the new ones yet. The
module builds now at least.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20235 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-26 02:54:05 +00:00
Ingo Weinhold
b881d6401c B_VECTOR_ICON_TYPE is already defined for target libbe_test.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20234 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-26 02:48:58 +00:00
Marcus Overhagen
a090257d09 Add volatile keyword to apic memory access, cleanup, add timeout to arch_smp_send_ici.
But this still doesn't help with bug #1018...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20231 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-25 23:32:21 +00:00
Ingo Weinhold
1fbe3ccd4e * Reformatted to honor 80 chars/line limit.
* Renamed a few parameters of the FS module hooks:
  - *file in the attribute functions to *vnode
  - v to vnode
  - I could barely restrain myself from renaming the "_*" parameters. I
    understand this marks return parameters, but I'd prefer a nicer prefix
    or suffix (that doesn't makes you think this is a private/internal
    identifier) like "out", "ret", "return", "result", or something similar.

I'd also like to propose renaming {read,write}_link() to
{read,write}_symlink(). Er, and do we need write_link() at all?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20226 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-24 23:05:18 +00:00
Ingo Weinhold
0b9da247dc Intermediate check-in. I've decided I rather want to use Pe instead of
Kate for this job. :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20222 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-24 15:01:34 +00:00
Ingo Weinhold
83812f6752 Copied userlandfs code from the test tree to the haiku source tree,
where it will be ported to Haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20216 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-24 00:30:19 +00:00
Ingo Weinhold
24f10d18b1 Added missing B_ATOM_TYPE AND B_ATOMREF_TYPE.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20212 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-23 23:16:31 +00:00
Marcus Overhagen
9e8dd0a713 added PCI express capability
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20198 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-22 17:46:44 +00:00
Axel Dörfler
cf2aeb201f * Implemented BDragger::{Show|Hide}AllDraggers() and its backend in the app_server.
This fixes bug #242. The value is currently stored in a separate file.
* Removed some unused codes from ServerProtocol.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20188 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-21 07:57:21 +00:00
Jérôme Duval
d4d9831990 merge both commpage.h into the private header
Travis, I hope this fits your needs :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20173 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-20 00:21:45 +00:00
François Revol
2dedc014e3 Use same figures as BeOS for soft and ahrd maximums on fd and mon tables (even though we don't use a table for mons).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20164 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-19 15:43:20 +00:00
Travis Geiselbrecht
1cbf8f4b3c initial support for a commpage, which is a chunk of memory in high kernel space with user readonly permissions.
The first use is to let the kernel decide what the preferred syscall mechanism is at boot time and copy the
appropriate user space code there. Can be used for routines the kernel can decide best how to use (memcpy, some
timing routines, etc).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20161 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-19 00:32:44 +00:00
Travis Geiselbrecht
badc7b674e yet another fix for #1018, which has at this point blossomed into a reorg of how AP cpus are initialized.
the new cpuid stuff was apparently exacerbating an existing problem where various bits of low level
cpu code (specifically get_current_cpu) weren't really initialized before being used. Changed the
order to set up a fake set of threads to point each cpu at really early in boot to make sure that at
all points in code it can get the current 'thread' and thus the current cpu.
A probably better solution would be to have dr3 point to the current cpu which would then point to the 
current thread, but that has a race condition that would require an int disable, etc.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20160 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-19 00:11:24 +00:00
Marcus Overhagen
3f8d7bce7c added PCI capability support to bus api
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20151 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-18 00:18:13 +00:00
Marcus Overhagen
13dbe1c7ff Added support function to find a PCI capability offset in the configuration data, needed for SATA support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20149 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-17 22:57:59 +00:00
François Revol
0ba2462a6d Added a stub BTextParameter as in Dano, I'd need that for ESDSink at least.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20146 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-16 23:40:49 +00:00
Jérôme Duval
c34e204a4e updated mesa to 6.5.2
updated the mesa software addon to work again (maybe would need more work)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20137 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-15 23:40:43 +00:00
Travis Geiselbrecht
dfb5375d18 clean up TSS initialization.
Now two complete tss structures exist within the per-cpu structure. Instead
of having to create a seperate area per each one, initialize them in place.
Also, the old mechanism to getting all of the cpus to get initialized was 
subtly broken, but still managed to work. Now, just force all the cpus to
initialize at boot, which makes the actual swapping of esp0 somewhat simpler.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20131 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-14 06:24:59 +00:00
Axel Dörfler
aa547f5fbb * mutex_lock() and recursive_lock_lock() now return a status_t and report failure.
* recursive_lock_unlock() now returns a void to mirror it's counterpart better;
  use recursive_lock_get_recursion() if you're interested in the lock depth.
* switch_sem(), and release_sem() now don't do anything anymore in kernel startup
  mode.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20099 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-07 14:07:31 +00:00
Axel Dörfler
eb117b4bfd Reworked the way thread_yield() works: just setting the thread to B_LOWEST_ACTIVE_PRIORITY
for one quantum wasn't really a good idea, as this could get quite expensive for the thread
(depending on the system load, it might have taken a long time until the thread was scheduled
again, no matter what priority it was).
Also, calling thread_yield() in a loop would have taken 100% CPU time.
Now, we sort the thread into the queue as with any other thread, but we'll ignore it once.
This now guarantees an actual context switch, as well as a much fairer rescheduling policy
for threads calling that function.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20077 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-06 02:29:17 +00:00
Travis Geiselbrecht
dcdc4f4b43 pulled over some stuff from newos:
at boot, per cpu, detect the cpu, pull down all the relevant cpuid bits and
save them into the per-cpu structure. Changed most of the code scattered here
and there that reads the cpuid to use a new api, x86_check_feature, which looks
at the saved bits.
Also changed the system_info stuff to read from these bits.
While i was at it, refreshed all the bits to be current.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20072 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-05 01:46:28 +00:00
Travis Geiselbrecht
ea4ff0f689 is_computer_on() lives again as a true syscall.
Replaced the _kern_null syscall with _kern_is_computer_on.
is_computer_on_fire is a bit harder, since it returns a float from kernelland, which
at the moment isn't supported in haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20069 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-04 21:08:35 +00:00
Axel Dörfler
815c38625d Applied patch by Vasilis Kaoutsis:
* replaced new[] with malloc()/realloc() where appropriate - since we're messing with
  the bits anyway, this makes the code slightly faster.
* however, we might want to throw some std::bad_alloc exceptions to deal correctly with
  low memory situations.
* cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20065 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-04 13:32:36 +00:00
Axel Dörfler
f6c0820638 * The BHandler observer mechanism was completely broken in Haiku for remote targets;
this fixes bug #1005. As a result, the Disks icon will now appear in file panels
  when you change that setting with a panel open.
* _ObserverList is now in the BPrivate namespace (and renamed to ObserverList).
* its BHandler map is now only temporarily used for handlers that do not belong to
  a looper yet; when BHandler::SendNotices() is called, they will be transferred
  into the BMessenger map.
* Invalid messengers are now removed from the map when encountered.
* Added TODO comments about a possible reference counting if a handler is added
  twice to a list (right now, this will be ignored).
* All {Start|Stop}Watching() methods are now more or less safe to be used in low
  memory situations (adding some items to the map can still throw an exception...).
* Renamed BHandler::InitData() to _InitData().
* Some refactoring and cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20029 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-01 16:08:01 +00:00
Axel Dörfler
fe70b87d91 Fixed a couple of issues in our VM:
* we now always flush the TLBs after having unmapped some pages.
* vm_soft_fault() could traverse to a source cache while it was being collapsed
  by vm_cache_remove_consumer() - this is now no longer possible as the latter
  marks the cache as busy when doing so, and the former now tests this flag and
  locks the cache (via the new fault_acquire_locked_source() function).
* if fault_acquire_locked_source() fails with B_BUSY, the current cache is locked
  again, and tested again for the page - as it might have been moved upwards to it
  with the destruction of its former source.
* The cache delivering the page for vm_soft_fault() is now locked until the end;
  it can no longer go away before having actually mapped the page into the area.
* This also fixes the issue where pages would get lost as vm_soft_fault() put the
  page in the active list, no matter if its cache still existed.
* Also, we now keep a reference of to a cache in case a dummy page is inserted; this
  makes again sure that it doesn't go away during the execution of vm_soft_fault()
  (which could even add this page to the free list...).
* divided vm_soft_fault() into several smaller functions which should make it much
  more readable.
* Added a "cache_chain" KDL command that dumps the whole chain until the bottom
  when giving a pointer to a vm_cache as parameter.
* now usually call vm_cache_acquire_ref() before map_backing_store(), even though
  it shouldn't be really needed (I added it for debugging purposes).
* Some minor cleanup.
* NOTE: a major problem still persists: when removing a vm_cache, it's possible
  that some of its pages are still mapped, and there is currently no mechanism
  to get rid of these mappings! I've added TODO comments into vm_cache.c where
  appropriate.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20028 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-01 12:12:54 +00:00
Ryan Leavengood
e3e76a3af9 Added convenience methods to allow a group or grid layout's insets to be set
while it is being built.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20026 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-31 20:30:20 +00:00
Axel Dörfler
2e27874523 * wait_for_child() now behaves correctly when waiting for children of a specific
process group. This fixes bug #996.
* As a result, the process group stuff and wait_for_child() got much simpler;
  get_death_entry() and update_wait_for_any() could go away completely.
* If a team goes away, all of its children are now "reparented" to the kernel team,
  instead of the team's parent - this follows common implementations (and POSIX if
  I understand it correctly), but not BeOS anymore. The OpenGroup Base says this
  about this topic: "If a parent process terminates without waiting for all of its
  child processes to terminate, the remaining child processes shall be assigned a
  new parent process ID corresponding to an implementation-defined system process."
* We wait too long in wait_test_4 which at least puts us on par with Linux; see
  comment in _user_setpgid().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20010 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-29 15:33:31 +00:00
Axel Dörfler
1beeb96080 setpgrp() returns a pid_t, not an int.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20008 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-29 13:31:24 +00:00
Axel Dörfler
a6cba27756 Turned off patented colored subpixel rendering.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20006 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-29 12:36:08 +00:00
Axel Dörfler
6af9dcbfe5 Another cleanup patch by Vasilis Kaoutsis - thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19998 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-28 21:35:08 +00:00
Axel Dörfler
4a50aa51f2 Applied another patch by Vasilis: this one replaces all C++ style comments with
C style ones, as this is a C header, too (and a very basic one).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19984 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-27 16:26:37 +00:00
Axel Dörfler
686bdd59d3 Rewritten Errors.h, courtesy of Vasilis Kaoutsis - thanks for all the work!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19979 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-26 22:11:00 +00:00
Axel Dörfler
087882c26e * Rewrote headers as necessary; only Errors.h and Debug.h still originate from a Be header now;
feel free to change that ;-)
* Cleaned up existing headers.
* Coding style guide update to BBufferIO (renamed m_* members to f*).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19972 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-26 16:36:29 +00:00
Axel Dörfler
9dbe170a69 Implemented direct message passing for local targets; this fixes a deadlock
with PostMessage() in case the message queue is full.
Some notes:
* for synchronous replies, we don't use this mechanism yet, but it could be
  extended to do that as well.
* the code looks so complicated because we need a way to access the looper's
  queue without locking it (to prevent deadlocks); like Dano's solution, I've
  abused BTokenSpace to store a BDirectMessageTarget with a BHandler.
* we also need to decouple the lifetime of a looper's queue from its target,
  as we cannot lock the looper, and therefore, can't guarantee it stays valid
  as long as we're accessing it outside of BLooper.
* init_clipboard() now needs to be done after the global constructors have
  been called - since sending messages now needs gDefaultTokens to be initialized.
  Since this is done per image, it shouldn't cause any troubles, though.
* some minor cleanup, removed unused _msg_cache_cleanup_() and friends.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19968 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-26 13:59:56 +00:00
Axel Dörfler
c01f349e6d Cleanup:
* Got rid of unused BLooper members
* renamed fTaskID to fThread
* Removed private and deprecated AddLooper()/RemoveLooper()/... stuff; BLooper is now
  directly calling BLooperList methods.
* Got rid of extensive and useless comments
* Made a few TODOs more clear
* Merged InitData() and InitData(...) to _InitData(...)
* BLooper::Team() now uses BPrivate::current_team(), sTeamID is gone now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19966 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-26 12:42:18 +00:00
Axel Dörfler
aa33d0a928 Got rid of the looper ID stuff - it seems nowhere to be used.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19965 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-26 12:11:33 +00:00
Jérôme Duval
76b72c03e8 updated freetype to 2.3.0
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19960 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-25 19:12:34 +00:00
Axel Dörfler
ca9b91886d * Added a Dano extension to BMessageQueue: IsNextMessage().
* BLooper::AddMessage() is now using this method to determine wether or not to
  update its looper thread.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19956 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-25 17:08:16 +00:00
François Revol
6181d22fb0 Change IPPROTO_* from enum to #defines. This fixes #992.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19955 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-25 16:37:06 +00:00
François Revol
ea62eb1bc9 This should fix intermitent KDLs (at least with console debug output).
Use the size of the struct instead of checking a pointer that is never NULL...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19935 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-24 00:24:51 +00:00
François Revol
f9c52afd6a Remove old usb kit fro Be in favor of the new rewritten one. At least we have one now :D
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19918 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-23 17:14:35 +00:00
Michael Lotz
3a630146d2 * Minor cleanup
* Fixed wrong wording in comment

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19915 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-23 16:44:37 +00:00
Michael Lotz
3c0b8e7fff Commiting reimplemented USBKit that is compatible with the old Be sample code version.
It is supposed to be cleaner and more object oriented. It also adds some features (like a string getter for the interface) that were appearantly left out in the Be implementation.
It is currently built as a small static library from src/libs.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19913 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-23 15:55:34 +00:00
François Revol
2781a652ae Let it B, let it B...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19904 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-22 16:55:37 +00:00
François Revol
9b84f25119 The original (sample code version) USB Kit from Be, as from ftp.be.com/samples/usb_kit/usbkit_99-03-23.tgz
Some files renamed. Won't build yet with our usb_raw driver due to different namings. classes need to be B-prefixed anyway. USBKit.h needs to be split like in zeta as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19901 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-22 15:59:44 +00:00
Axel Dörfler
9ecaa867f7 Applied patch by Vasilis Kaoutsis: now checks for the MSR feature as well; obviously
some Pentium 200 MMX pretend to support MTRRs.
This should fix bug #553.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19899 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-22 14:45:50 +00:00
DarkWyrm
9e88e05b1f Fixed non-Haiku build targets for libicon
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19887 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-21 03:19:27 +00:00
Michael Pfeiffer
fcccd8b759 Some printing related improvements:
* libprint based drivers can now show a preview window and show progress
  window while printing contributed in part by Hartmut Reh.
* Libprint and PCL6 driver bug fixes.
* Code clean-up (removed code duplications, coding style, copyright text)

Builds under Linux. Not tested under BeOS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19882 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-20 15:52:37 +00:00
Axel Dörfler
6a50382249 * Mixed consumer with consumerRef to identify the cache in the consumer list;
this fixes bug #227 again (which I recently opened again accidently).
* We actually switched the last consumer's source without having acquired its
  lock! This fixes some rare random app crashes as well as potential kernel
  crash ("cache to be deleted still has consumers").
* Some more comments to explain why things are done and can be done the way they
  are done :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-20 12:49:44 +00:00
Axel Dörfler
dff7fdee70 Now it's self-containing.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-19 22:59:28 +00:00
Axel Dörfler
c2f641f2e5 Turns out the whole "active app" mechanism in the registrar wasn't used at all; the
Switcher now works as expected.
* Renamed TRoster::ActivateApp() to UpdateActiveApp(), as the app is already activated
  at that point (the registrar only keeps track of it).
* BWindow::DispatchMessage() now calls the new BRoster::Private::UpdateActiveApp()
  method when it receives a B_WINDOW_ACTIVATED message.
* Added BRoster::_UpdateActiveApp() which calls the new B_REG_UPDATE_ACTIVE_APP.
* Removed now unused B_REG_ACTIVATE_APP.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19857 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-18 17:45:08 +00:00
Axel Dörfler
2a720453e1 One step closer to the Switcher - still doesn't work, though, but at least the
BWindow code looks okay now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19849 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-17 19:38:58 +00:00
Axel Dörfler
849de6ef97 Added another GetStyledText() function to force a specific encoding.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19847 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-17 12:04:02 +00:00
Axel Dörfler
8acdd17f08 Added WriteStyledEditFile() variant that gets an encoding argument; it will automatically
encode the text in the BTextView accordingly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19841 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-17 09:10:16 +00:00
Bruno G. Albuquerque
e62e6bd5a7 Implemented support for hardware cache flush. This is based on code I originally
did for yellowTAB GmbH when I worked for then and is being used under permission.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19840 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-17 01:39:59 +00:00
Marcus Overhagen
ebb02063bd Fixed documentation, uint16 was wrong and doesn't work. Also checked other usage of this items, but they are already correct.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19836 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-17 00:19:59 +00:00
Stefano Ceccherini
68fb266820 get rid of the now useless trackTime parameter
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19828 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-16 15:22:31 +00:00
Axel Dörfler
f39acd678c * Made vm_area_lookup() part of the kernel private API.
* "sc"/"where"/"bt" now prints the area where the function of the stack frame
  is located in case there is no other information (using the above function).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19800 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-14 23:26:20 +00:00
Philippe Houdoin
af1c1a0a03 Renamed the public api to underline the DPC *queue* mechanism handled.
Pending DPCs at queue death time are now called too, to avoid possible leaks.
Meanwhile, queue_dpc() will refuse to add another DPC and returns B_CANCELLED.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19798 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-14 21:58:19 +00:00
Axel Dörfler
647b1f70a5 * vm_copy_on_write_area() did not always correctly divide the ref_count of the
two cache_refs - it needs to count the consumers of the lower cache to find
  its actual number of references; the upper cache could still be in use by
  someone else.
* There were several locking bugs in the VM code; since cache_ref::cache can
  change, we must not access it without having the cache_ref locked.
* As a result, map_backing_store() now requires you to have the lock of the
  store's cache_ref held.
* And therefore, some functions in vm_cache.c must no longer lock the cache_ref
  on their own, but require the caller to have it locked already.
* Added the -s option to the cache/cache_ref KDL commands: it will only print
  the requested structure, and not its counterpart (useful if accessing one
  structure results in a page fault, as was possible previously).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19796 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-14 18:41:57 +00:00
Axel Dörfler
00d65a521d Added Eric Petit's VMware graphics driver - thanks!
Made the following changes from the version I got from Eric:
* made BppForSpace() in DriverInterface.h inline to remove some warnings
* renamed driver source files to lower case.
* removed Be Inc. copyright from kernel driver as I couldn't see anything coming
  from Be Inc. there - correct me if I was wrong, Eric.
* Minor other changes like added missing header guards.
* The README provided in the main directory is only included in the accelerant
  directory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19793 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-14 14:16:06 +00:00
Jérôme Duval
5efe9479fe ACPI boot menu item is for bios_ia32
added a kernel settings option to disable ACPI



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19791 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-13 19:55:14 +00:00
Axel Dörfler
dc237c7990 ref_count should be vint32, as we're accessing it at least once directly.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19786 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-13 17:21:47 +00:00
Axel Dörfler
ce51da52b6 Added a kernel socket API module which exports the usual BSD socket API to kernel modules.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19783 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-13 13:18:54 +00:00
Marcus Overhagen
43792b9eed propagate required settings for the remote disk from boot loader to kernel (client-ip, server-ip, server-port)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-12 22:27:48 +00:00
Axel Dörfler
fa4858af26 Didn't notice that x86_enter_userspace() also copied the thread entry's arguments to
the userland stack in an unsafe way - moved that stuff to arch_thread_enter_userspace(), too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19778 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-12 20:40:39 +00:00
Jérôme Duval
173acea776 added a boot menu option "Disable ACPI" and code to avoid loading the ACPI module when it's active. untested (because of sudden reboots when boot menu is used).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19777 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-12 20:01:08 +00:00
Axel Dörfler
8fc075ac5c * There was no reason to copy the "userland calls exit_thread()" stub with interrupts
turned off - accessing userland memory. Now, arch_thread_enter_userspace() does that
  job, and as a result, may also fail.
* dump_thread() now directly prints the info of the current thread when used without
  argument (rather than iterating the thread list to look for the current thread).
* If arch_thread_init_tls() fails upon thread creation, the function will now return
  an error.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19775 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-12 18:26:32 +00:00
Marcus Overhagen
f5fa54f798 Improved error reporting when a failure to find/mount the root device occurs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19774 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-12 18:09:15 +00:00
Axel Dörfler
d1b0be94b0 * Private and temporary vm_caches now maintain their new virtual_base field, which allows
them to commit substantially less memory (we we're committing about 40 MB (!) too much
  after a complete system boot). This means you'll run out of memory less likely now.
* fill_area_info() no longer filters out kernel protection flags - we may want to keep
  filtering them when called from userland, though, dunno.
* Added new debugger command "avail" which shows how much memory has been committed, and
  how much is regarded as free space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19771 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-12 15:07:18 +00:00
Axel Dörfler
7ed5e61cdb arch_thread_init_tls() now accesses user memory safely, and therefore could now
fail.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19768 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-11 18:21:35 +00:00
Philippe Houdoin
a5347f68f8 Moved public interface into its own header file.
Fixed most obvious issues, as reported by Marcus and Axel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19765 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-10 20:28:45 +00:00
Axel Dörfler
cdcb059571 * Renamed get_team_death_entry() to team_get_death_entry() and make it available
to other kernel components.
* wait_for_thread_etc() will now search the team's death entries in case the
  thread is already gone; also resume_thread() is now done later, and its return
  code will no longer matter (as we already have our death entry, no matter if
  the thread is gone now or not).
* The fibo_load_image test now works as expected (only tested with low numbers
  yet, though - the mean testing comes later (first comes functionality) :-))


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19758 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-09 23:58:59 +00:00
Jérôme Duval
9481ed48de updated to tzcode2007a
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19755 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-09 23:16:26 +00:00
Jérôme Duval
a2758a418b replaced size_t with socklen_t where appropriate following POSIX
Axel, I hope you don't mind :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19746 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-08 20:57:28 +00:00
Axel Dörfler
86e355a227 Enlarged all memory range arrays to 6, just in case.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19740 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-08 12:14:58 +00:00
Axel Dörfler
3e161fb661 * Instead of its home-brewn solution, mmu_init() now uses the functions declared
in addr_range.h to add ranges to the arrays. This fixes the crashing bug reported
  by Larry Baydak.
* Added some more exported functions to kernel_args.cpp (prototypes are in addr_range.h).
* TODO: let the PPC/OpenFirmware implementation use those as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19739 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-08 12:14:06 +00:00
Axel Dörfler
43cca04a9a Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19731 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-06 18:06:38 +00:00
Axel Dörfler
83e805ad15 * Added a note that the flock() definitions are misplaced here.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19728 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-06 17:25:52 +00:00
Axel Dörfler
ccf137b886 BWindow::IsFront() was implemented incorrectly - we actually need to query the
app_server for this; added a new AS_IS_FRONT_WINDOW command for this.
For example, clicking on the menu bar to bring windows to front in FFM mode
does work now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19725 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-06 17:08:19 +00:00
DarkWyrm
3cb015b1ee Added the public header to allow apps to take advantage of the services daemon's app restart capabilities
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19717 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-06 02:27:52 +00:00
Axel Dörfler
fb29f5b0fb Changes to let updates happen less frequently:
* _ContrainPoint() was broken as it could never change the point it was supposed
  to contrain.
* MouseDown() no longer sends a notification message automatically (only if it
  changed something)
* MouseMoved() and synchronous MouseDown() will now only send modification messages
  if something actually changed (not for every mouse update).
* After key presses, the invokation message is only sent when the value changed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19697 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-04 14:25:13 +00:00
Stefano Ceccherini
25df172b72 Implemented auto horizontal scrolling (by fixed steps for now), moved
auto scrolling to its own method, introduced a new private 
StyledWidthUTF8Safe method.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19694 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-04 10:44:29 +00:00
Stefano Ceccherini
c733893846 Greatly improved scrolling, and simplified the code too. Now scrolling
is done from inside the BMenu::_track() function, and not inside Pulse() 
anymore. Patch by Lucasz Zemczak


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19653 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-29 07:01:08 +00:00
Marcus Overhagen
2f9a049400 add array indexed access to mac_addr_t
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19627 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-26 14:57:21 +00:00
Michael Lotz
f3001f6a1d Corrected comments. It's a 0 byte, not a NULL pointer.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19625 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-25 22:02:01 +00:00
Michael Lotz
3379428150 * Made UTF8 functions overflow safe
* Unified UTF8CountChars and UTF8ToLength and removed the latter
* Rewrote UTF8CountBytes to use the more safe algorithm from UTF8CountChars
* Removed the unsafe count_utf8_bytes() function

This should fix bug #839. Marcus can you please review?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19624 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-25 21:58:00 +00:00
Ryan Leavengood
a06480efcb Addition of constant used when restarting the input_server within the
app_server. I added it at the end. Feel free to move it to a better spot, if
there is one. Note that putting it in the middle with require recompiling a lot
of things.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19614 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-23 22:56:18 +00:00
Marcus Overhagen
aa88acd003 added define for SATA AHCI
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19611 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-23 02:39:58 +00:00