* Removed storage/Alias.h as that stuff isn't even available on BeOS.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21576 a95241bf-73f2-0310-859d-f6bbb57e9c96
with the other partition types.
* Added kPartitionTypeEFI to the constants.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21574 a95241bf-73f2-0310-859d-f6bbb57e9c96
BDirectory without declaring it first. Since that's an actual bug, I made the
changes in the Haiku headers, and copied them back to the build headers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21562 a95241bf-73f2-0310-859d-f6bbb57e9c96
$PATH, though.
* Telnetting into Haiku is now finally working as expected.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21559 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Also ported over the new MessageAdapter class
* Removed old BMessage implementation prototypes that apparently were left in the private folder
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21515 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Removed r5_message.cpp and dano_message.cpp accordingly
* Also moved out KMessage handling from Message.cpp to MessageAdapter.cpp
* Fixed some minor style issues in Message.cpp
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21514 a95241bf-73f2-0310-859d-f6bbb57e9c96
* _WindowAt() and _CountWindows() now have an individual version of that
code which should be magnitudes faster.
* _WindowQuitLoop() no longer handles hidden windows specially - instead,
it now walks the window list in the correct direction which should fix
the issues.
* Also, it now uses WindowAt() and thus has an up-to-date view of the
window list (it will no longer ignore new windows).
* And finally, it will no longer dereference an unsafe pointer (for
BWindow::IsFilePanel()).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21505 a95241bf-73f2-0310-859d-f6bbb57e9c96
are now only enabled if there are any inbound accounts.
* BMailSettings::StatusWindowFrame() now returns some useful defaults.
* Minor cleanup.
* The MDR kit needs some serious overhaul before it can be part of R1.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21493 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added a TRACE_S3SAVAGE macro that turns on debug output - should be set conditionally
if DEBUG is defined (see DriverInterface.h), but is currently always on, as requested
by Gerald.
* Some minor style fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21492 a95241bf-73f2-0310-859d-f6bbb57e9c96
* vm_copy_on_write_area() now does no longer overwrite the ref_count, but keeps
it's reference to the cache until it has unlocked it.
* It now also locks its reference from the start, preventing any other thread
to interfere.
* vm_cache_remove_consumer() now detects if it has to remove a foreign busy
page itself in order to preserve a mapped page.
* vm_soft_fault() now keeps a reference to the cache that owns the page to be
mapped until it has actually mapped it.
* vm_unmap_pages() removed the mappings of all pages of the area instead of only
those that are within the requested range.
* Kept (disabled) debug output for convenience.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21482 a95241bf-73f2-0310-859d-f6bbb57e9c96
Disabled by default, but all kernel devs are *highly* recommended to turn them on for your builds and see if it trips anything, and then fix it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21477 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Reworked the internal layout. _ValidateLayoutData() computes and caches the
layout related data and all other methods just use those values. Now, in
layout-aware mode the class should properly work not only when using the
layout items. And when using layout items, the class does actually do
internal layout; it was basically good luck that it worked in the tests,
before. Vertical resizing is supported, too.
* We do a few mean tricks to get the probably mostly preferred layout behavior:
By default our own explicit max width and that of the menu bar layout item is
set to unlimited and the horizontal menu bar alignment to left aligned. This
allows to horizontally resize a BMenuField beyond its preferred size,
although both label and menu bar have a limited max width. The user can, of
course, override those explicit sizes/alignments to get a different behavior,
if desired.
* Fixed invalidation in SetDivider(). When having the focus, the left and top
border of the blue frame were not invalidated.
* The label is no longer drawn at vertical position font ascent + descent
+ leading + 2 (not sure how this calculation was supposed to work), but
vertically centers the label around the ascent. With big fonts the label is
shown a bit too far to the bottom. Not sure how to fix this in a generic way.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21466 a95241bf-73f2-0310-859d-f6bbb57e9c96
the maximum width. The latter supports unlimited maximum width. The
_BMCMenuBar_ draws fine when resized wider than its min/preferred width, but
not the complete "button" area will cause the menu to open when being pressed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21465 a95241bf-73f2-0310-859d-f6bbb57e9c96
stupid errors, since I don't use exceptions usually. Feel free to beat
me on this. Moved uninitialization to _DisposeData(). Corrected some
styling issues pointed out by axel. Used fprintf instead of printf.
Turned off debugging.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21450 a95241bf-73f2-0310-859d-f6bbb57e9c96
DoLayout()).
* Don't resize the view and the window anymore, when fResizeToFit is not
set.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21426 a95241bf-73f2-0310-859d-f6bbb57e9c96
fixed warnings and code style. Please, from now on, provide *patches* to this version.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21421 a95241bf-73f2-0310-859d-f6bbb57e9c96
Implemented SetIndexedColors hook, although not really correct.
I don't know why the driver's 8 bit mode were disabled. They seem to
work fine. I had to enable at least 640x480x8 to be able to test
WindowScreen. There are some TODOs in the code. I'll look into them
later.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21410 a95241bf-73f2-0310-859d-f6bbb57e9c96
1. Deleted headers/shared/
2. Added a Jamfile to src/shared to build it into a static library libshared.a.
3. Removed my changes in the build/jam directory.
4. Have ShowImage include libshared.a.
I forgot to add AboutWindow.h to headers/private/shared. I will do that next.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21402 a95241bf-73f2-0310-859d-f6bbb57e9c96
discussed in the thread in haiku-development. I added a fSubmenus member
to BMenu, to be able to tell from BMenuItem if there are other items
with a submenu (maintained in BMenuItem::SetSuper()). If you don't like
this solution, let's just revert.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21395 a95241bf-73f2-0310-859d-f6bbb57e9c96
- Menus are generally a bit wider (BeIDE ones didn't look nice)
- The modifiers bitmap are drawn more centered vertically
- Splitted BMenu::ComputeLayout() into three methods
- Various minor changes.
The menuitems still don't look nice with bigger font sizes, but we'll
try to fix this...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21394 a95241bf-73f2-0310-859d-f6bbb57e9c96
despite being talked about repeatedly, does not currently exist.
Adding this required adding some new Jam rules to deal with this shared source
directory and headers. I had some fun figuring this out. Despite writing
articles about Jam in the Haiku newsletter a few years ago I still find Jam to
be a PITA at times.
But my solution seems to work pretty well. Basically you just call the rule
UseSharedSource and pass the name of the shared source file you want to use.
This rule sets up the header directories and the right Jam variables for the
source file. You then add the source file to the source list in the Application
rule like any other source file.
I also made the authors list sent to the about window constructor null
terminated instead of passing the size of the array, as suggested by Hugo.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21391 a95241bf-73f2-0310-859d-f6bbb57e9c96
realized that calling it a window may not be strictly correct since it isn't a
decendent of BWindow, but just uses a BAlert. Oh well, it can be changed if
need be.
I'm also checking in the first use of it, in ShowImage. Since ShowImage can
still be compiled for R5 I've added a #ifdef around the new BAboutWindow
related code.
I'm open for suggestions for the interface for this class, well mostly the
constructor. I'm not a big fan of having to specify the number of authors.
For now I'm making the header private, but I don't think it would be a big deal
to expose it publically.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21389 a95241bf-73f2-0310-859d-f6bbb57e9c96
only invokes the BView version. Didn't know what to do with MinSize() and
PreferredSize(). ATM they return fixed, hard-coded values. It might make
sense to compute something depending on the font size, for instance.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21380 a95241bf-73f2-0310-859d-f6bbb57e9c96
and DoLayout(). When the B_SUPPORTS_LAYOUT view flag is set (as is by
default when using one of the new constructors) the BBox completely manages
one true child (the first child that is not the label view).
* Centralized the layout related computation in new method
_ValidateLayoutData(). The computed infos are cached in a new private
LayoutData structure.
* GetPreferredSize() was broken in several respects. It does now return the
same result as PreferredSize(). If B_SUPPORTS_LAYOUT is not set, these are
the sums of the insets induces by the frame and the label. I.e. those values
can for instance be added to the child's preferred size to compute the
preferred size of the compound.
Not sure, if the Haiku-only TopBorderOffset() and InnerFrame() functions still
make sense. With layout management they're actually superfluous.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21356 a95241bf-73f2-0310-859d-f6bbb57e9c96
disjunction of all view flags before, and the new layout related flags were
missing. I suppose there was not striking reason for previous method.
* Made InvalidateLayout() virtual. When implementing layout management
directly in a derived class instead of a separate BLayout, one needs to
override it to know when to discard cashed layout infos.
* Added a ResizeTo(BSize) method.
* Avoided ugly multi-line strings in PrintToStream().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21355 a95241bf-73f2-0310-859d-f6bbb57e9c96
max, preferred) size triple so that they are compatible with each other.
* Implemented AlignInFrame(BView*, BRect).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21353 a95241bf-73f2-0310-859d-f6bbb57e9c96
BMenuWindow. BMenuScroller now is just the scroller button, and it's a
child of BMenuWindow. This simplifies attaching/detaching the
scrollers, and it's also a bit cleaner.
The lower scroller wasn't shown anymore for some reason, and this commit also fixes this problem.
A drawing bug shows up now, though: when scrolling the menu UP, some
spurious lines are drawn over the menu. I wonder if this is an
app_server bug or what.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21326 a95241bf-73f2-0310-859d-f6bbb57e9c96
correctly.
* Got rid of this superfluous cookie stuff - either the VFS behaves correctly, or
we're screwed anyway.
* Made adding debugger commands optional depending on if DEBUG_COMMANDS is defined
or not.
* Minor other cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21322 a95241bf-73f2-0310-859d-f6bbb57e9c96
doesn't work on i965 yet.
* B_GET_DISPLAY_MODE now returns the mode actually configured in the chip instead
of the last mode set; while this isn't really necessary, it allows to check what
mode was used during startup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21321 a95241bf-73f2-0310-859d-f6bbb57e9c96
libroot). It's available in the kernel through the private
get_haiku_revision() and added to the kernel syslog output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21173 a95241bf-73f2-0310-859d-f6bbb57e9c96
building on Mac OS X (Darwin). A problem with makebootable remains.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21165 a95241bf-73f2-0310-859d-f6bbb57e9c96
* PowerStatus is now using this API when compiled for Haiku.
* Note, I'm not sure why yet, but running PowerStatus in the background
crashes at least my laptop after some time.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21154 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Change name of header for Haiku specific multi_audio to hmulti_audio (in line with the rename of the media addon itself)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21136 a95241bf-73f2-0310-859d-f6bbb57e9c96
* scsi_cmds.h declared several variables instead of naming enums.
* the CD-ROM standard retrieval was broken (always checked index 0).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21105 a95241bf-73f2-0310-859d-f6bbb57e9c96
and add wrappers for watch_node() as well, though.
* Implemented more or less all what is needed for the path monitoring to work.
* Added a test application: works fine under Haiku, but somewhat flaky under BeOS,
dunno why yet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21066 a95241bf-73f2-0310-859d-f6bbb57e9c96
make both gcc 2.95.3 and the plethora of gcc 4s happy: Typedefed
struct fssh_stat to fssh_struct_stat, thus hopefully avoiding spurious
errors concerning clashes with the function or regarding namespacing.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21055 a95241bf-73f2-0310-859d-f6bbb57e9c96
* The API is just a proposal at this time, please comment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21020 a95241bf-73f2-0310-859d-f6bbb57e9c96
also renamed their accelerants and settings files accordingly.
* Added Mandelbrot and GLDirectMode as demo applications.
* Moved CortexAddOnHost to /bin.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21010 a95241bf-73f2-0310-859d-f6bbb57e9c96
* allow an ipv4 bind() to a multicast address.
* bumped getsockopt/setsockopt kernel driver buffers to 256 bytes to at least handle structures which take one sockaddr_storage.
* convert generic multicast delta API names to IPv4 ones before handling the specific option.
* changed ipv4_getsockopt/ipv4_setsockopt a bit as the code gcc 2.95 was generating was a bit too funky.
* properly pass setsockopt/getsockopt to handling protocols.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20939 a95241bf-73f2-0310-859d-f6bbb57e9c96
- call the reclaimer callback when low on memory.
- use the depot when on multi-cpu setups (for scalability).
- fixed the amount of memory spent on slabs for very large objects.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20889 a95241bf-73f2-0310-859d-f6bbb57e9c96
Doesn't do anything ATM, but already provides the required system
interface (VFS, caches, POSIX functions).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20859 a95241bf-73f2-0310-859d-f6bbb57e9c96
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
- 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
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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
* 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
* 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
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
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
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
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
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
* 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
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
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
{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
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
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
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
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
* 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
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
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
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
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
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
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
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
* 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
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
* 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
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
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
* 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
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
* 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
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
* 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
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
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
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
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
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
* 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
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
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
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
* 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
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
* 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
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
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
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
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
* 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
* 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
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
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
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
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
* 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
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