Commit Graph

25750 Commits

Author SHA1 Message Date
Ingo Weinhold
eb0262fc4c * Reworked vm_soft_fault() and friends:
- While walking down the cache chain, we keep all upper caches locked.
  - When we have to unlock -- when waiting for a busy page or reading a page in
    -- we unlock completely, including the address space, and restart
    vm_soft_fault().
  - Folded fault_get_page() and fault_find_page() into one.
  This simplifies and improves things considerably:
  - We no longer need dummy pages.
  - We no longer need vm_area::no_cache_change.
  - #2710 is fixed, since we no longer hold the address space lock while
    waiting.
* vm_soft_fault(): When we have found our page, we first check whether a page
  is already mapped at the address. If it is already our page, we just change
  its protection. If not, we unmap it first. Fixes race conditions when multiple
  threads fault at the same address at the same time.
* fault_get_page(): When copying a read-only page from a lower cache, no longer
  mark it active, since at least for the fault area it is shadowed from then on.
* vm_set_area_protection(): Fixed potential overflow for in the
  vm_translation_map::protect() call.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30911 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-29 12:55:25 +00:00
Michael Lotz
57a5e69604 * Implement read/write_pages using Read()/Write(), io will follow later.
* Create a file cache for created overlay nodes. It is unused and disabled, but
  causes a vnode cache to be created. This is required for mapping a file, which
  in turn is required for executables to be loaded. With that copied or newly
  created executables should work on top of write_overlay. Will think about and
  implement a more direct way of getting that cache later today.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-29 02:52:11 +00:00
Ingo Weinhold
d9ea25c51d Fixed error handling in module initialization.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30908 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-29 01:04:17 +00:00
Michael Lotz
5740b42f36 Write can be called without cookie (in the CreateSymlink() case for example).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30907 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-28 21:58:42 +00:00
Axel Dörfler
41b1980691 * Added support for the io() hook. Not yet tested.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30906 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-28 21:37:39 +00:00
Axel Dörfler
f0c050f60e * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30905 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-28 21:32:53 +00:00
Michael Lotz
0807998b5d * Implement O_APPEND.
* Also make set_flags available for setting it. O_NONBLOCK is ignored as in BFS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30903 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-28 21:19:13 +00:00
Jérôme Duval
591bc3f2d9 * various fixes identified by gcc4, provided by Joe Prostko
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30902 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-28 20:36:22 +00:00
Rudolf Cornelissen
1f58723702 comments update only. There's now enough info to implement actual use of DDC/EDID (I hope). It will be mixed with the old methods, since on some cards DDC fails for some connectors, and laptops don't use DDC for their internal panels at all.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30901 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-28 20:33:02 +00:00
Jérôme Duval
7abb735ac6 * Includes termios.h in sys/ioctl.h, for TIOCGWINSZ.
* added watch command, which executes a program periodically, showing output full screen. 
* added watch to the image.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30900 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-28 20:16:35 +00:00
Michael Lotz
5f447d9b4c Apply r30890, adding a missing put_vnode() on error, to write_overlay as well.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30899 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-28 17:31:18 +00:00
Michael Lotz
940e8add93 Apply r30895 and r30897 to the attribute_overlay as well.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30898 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-28 17:26:13 +00:00
Michael Lotz
3d94685b25 Move the B_UNSUPPORTED return into the macro. No functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30897 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-28 16:18:11 +00:00
Michael Lotz
f54023cf37 Propagate error codes in FIONREAD. Fixes bug #3973.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-28 16:03:50 +00:00
Michael Lotz
607254f510 We don't want to use the OVERLAY_CALL macro for can_page() as it returns a bool
and not a status_t. In case of virtual files it would have wrongly returned
B_UNSUPPORTED, resulting in true instead of false.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30895 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-28 15:32:42 +00:00
Philippe Saint-Pierre
de81e90c0b Replaces NodeMonitor by PathMonitor in the InfoWindow to update the calculated size of the directory when a change happen.
This implement the suggestion in ticket #2868.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30894 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-28 14:02:41 +00:00
Michael Lotz
2cdc24e4ad Fix two instances of handing wrong vnodes to the next layer in attribute_overlay.
The target vnode in link and the toDir vnode in rename were passed directly,
meaning that an attribute_overlay vnode was handed to the next layer causing
crashes when moving/renaming a file on ISO-only CDs for example. Fixes #3885.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30893 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-28 12:34:03 +00:00
Michael Lotz
588b9abc12 Fix leaking the old entry name when renaming actually succeeds.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30891 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-28 02:39:25 +00:00
Michael Lotz
2fc5fcd1ad Add missing put_vnode() in error case.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30890 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-28 02:16:07 +00:00
Michael Lotz
4251f05625 When writing an attribute store file the parent directory might have been
invalidated since the creation of the object. If this is the case we have to
look it up again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30889 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-28 02:15:14 +00:00
Michael Lotz
0635976606 Invalidate our cached inode numbers when removing the attribute file. Basically
we want to ensure that we re-enumerate our environment when eventually writing
a new one as it has most probably changed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-28 02:05:23 +00:00
Michael Lotz
dfada88840 Add functionality for removing a attribute file. In case a file is (re-)moved
we will later remove the attribute backing file using this.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30887 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-28 01:55:43 +00:00
Michael Lotz
56b2febaad Add actual support for relocated directories. In case we hit a placeholder file
pointing to a relocated directory, we now re-initialize the node we are
initializing with the first entry of the pointed at directory. This ought to be
the "." entry containing the proper flags, start block number and data length.
As per the specs we do only keep the file id or alternate name of the
placeholder and take everything else from the relocated directory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30886 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-28 00:39:33 +00:00
Michael Lotz
f593b93a09 Fix GCC4 build of the HVIFTranslator.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30884 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-27 22:57:31 +00:00
Jérôme Duval
e7c8829c5d strchr(const char*, ...) returns const char* in C++, identified by gcc 4.4.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30882 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-27 20:07:43 +00:00
Rudolf Cornelissen
f595427d00 fixed comment typos. No actual change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30881 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-27 18:57:01 +00:00
Rudolf Cornelissen
21bade017a added more EDID stuff. Now extracting needed monitor specs and placing them in shared_info. More dumping to logfile added. The EDID info is not yet actually used: more testing is needed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30880 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-27 18:46:07 +00:00
Ingo Weinhold
c533f813a2 Normalized the FATAL messages. The image path is always printed, now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-27 14:32:11 +00:00
Ingo Weinhold
6a79745b4c Disabled the stack traces on unhandled userland page faults. As was already
known those can cause a deadlock. Besides, when the debug server is running,
it prints an even nicer stack trace. Not removing the code yet to make things
easier for architectures on which we don't have a userland yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30877 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-27 13:57:07 +00:00
Michael Lotz
43276e5bd1 If we encounter an unsupported entry (like a relocated directory) we now just
skip it instead of returning the error and therefore aborting the directory
enumeration.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30876 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-27 01:30:29 +00:00
Ingo Weinhold
de49044796 * Use the new Add{Files,Symlink}ToHaikuHybridImage rules in HaikuImage and
OptionalPackages. This makes the content definition part in
  AlternativeGCCArchive superfluous.
* Moved the cc and c++ wrapper scripts from src/bin to data/bin.
* Added build variable HAIKU_ADD_OPTIONAL_PACKAGES to add optional packages
  -- the list can be separated by slashes to allow easier passing through
  the shell.
* When invoking the sub-jam that builds the alternative GCC archive, we force
  it to ignore the UserBuildConfigs and we enable the optional packages
  enabled in the main jam.
* Reorganized /boot/develop:
  - There's now an "abi" subdirectory containing a <arch>/<gcc>/ subdirectory
    for each installed ABI-incompatible gcc version and a "current" symlink
    pointed to the currently selected one.
  - All ABI-dependent directories under /boot/develop/ (lib/x86, headers/cpp,
    tools/gnupro) symlink into /boot/develop/abi/current.
  - Changed BELIBRARIES to contain
    /boot/develop/abi/current/library-paths/common instead of /boot/common/lib.
    The former is a symlink to either /boot/common/lib or
    /boot/common/lib/<gccVersion>. There's also a respective "home" symlink.
  - Repackaged the optional binutils+gcc 2/4 packages accordingly. Also fixed
    the obsolete /boot/beos/system/lib/libstdc++.so symlink in the gcc 4
    package.
  - The new structure allows to switch between compilers by changing the
    /boot/develop/abi/current symlink. Added script setgcc to do that.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30875 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-27 01:12:34 +00:00
Jérôme Duval
5348460789 Fixed #1896 by using directly pregenerated bc.c and scan.c instead of bc.y and scan.l
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30871 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-26 21:38:30 +00:00
Oliver Tappe
b788c037f3 * Fixed incorrect use of IN_MULTICAST in ipv4: the macro must be invoked
on an address in host-byte-order, not network-byte-order.
  Basically this caused failure for all IP-traffic to any IP-address
  where the last byte & 0xF0 == 0xe0.
Now we can surf www.pcre.org again ;-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30870 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-26 21:34:42 +00:00
Jérôme Duval
7ba59d8729 don't try to allocate an empty BBitmap
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-26 20:38:10 +00:00
Rudolf Cornelissen
80b01907d9 modified GPU Ptimer programming which according to nouveau should fix LVDS panel programming in some cases. Bumped version to 0.91. If this update brings trouble, let me know... Sorry about the empty commit message before btw.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30868 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-26 18:46:00 +00:00
Rudolf Cornelissen
aeb4bf93d4 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30867 a95241bf-73f2-0310-859d-f6bbb57e9c96 2009-05-26 18:34:05 +00:00
Oliver Tappe
2dc3fd4652 * fixed gcc4-build of DriverSettingsTest
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30866 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-26 15:23:06 +00:00
Oliver Tappe
f36c9e44ac * added a couple more test dates that contain timezones
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30865 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-26 15:22:04 +00:00
Oliver Tappe
78176019e6 * squashed a TODO in parsedate() about missing timezones - now both textual
(3-letter) and numerical timezones (e.g. -0700) are supported
This means that the workaround in mail_util.cpp of the mail kit could be
removed, but since I do not know if that should still support other versions
of BeOS, I have chosen to leave it alone.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30864 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-26 15:11:05 +00:00
Ingo Weinhold
6f2961ffab Added awareness for running with a non-native ABI (hybrid build). In this case
we test for a respective subdirectory for any translators path added and use
that instead, if existing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30859 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-26 01:05:57 +00:00
Ingo Weinhold
c7d1aa192f Added system_info::abi field. It contains the system's ABI version, which
might be different from that of the caller (on hybrid builds).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-26 01:02:39 +00:00
Ingo Weinhold
d69c4f6aa9 Removed BeOS support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30857 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-26 00:14:16 +00:00
Ingo Weinhold
bd8ff8aa9f Yummy, more style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30856 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-26 00:01:48 +00:00
Ingo Weinhold
a9cfff5fc2 Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30855 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-25 23:51:16 +00:00
Ingo Weinhold
8c7bf264f5 The 'extern "C"' was missing for the C function replacement of the Version()
method. Rather reintroduced the method (private) instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30854 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-25 23:32:53 +00:00
Michael Lotz
c26b324e20 Should fix GCC4 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30853 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-25 21:26:54 +00:00
Oliver Tappe
33203f677e * added support for ctime to BFS by grabbing two of the pad-fields
* added TODO about a sanity check that should perhaps be dropped
I checked this change with both a haiku-BFS partition and one from R5

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30852 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-25 18:04:28 +00:00
Ingo Weinhold
42c9b01aa6 * {BEntry,BNode}::GetStat() were still passing the BeOS struct stat size to
the syscall. Anything beyond st_mtim was therefore not filled in. Fixes
  the incorrectly shown creation times in Tracker.
* The BStatable::GetStat() solution was not sufficient yet. We still have to
  provide the old GetStat() symbol for BNode and BEntry, since those could be
  used by old applications/libraries. We also still have to implement the old
  GetStat() slots in the derived classes, but don't need to implement it in
  the base class (was purely virtual before and is private now).
* The old BStatable::_OhSoStatable1() slot function was not implemented
  correctly. Calling the virtual function at the vtable slot obviously results
  in an infinite recursion. The correct implementation would make use of the
  Perform() method, but Be didn't provide one for BStatable, so we have to use
  the old GetStat() method. Fixed #3960.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-25 14:03:38 +00:00
Jérôme Duval
56d4690860 wakeup() means wake any waiting threads, so we use the relevant flags. this gives a reliable dv receive stream here.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30849 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-24 23:15:04 +00:00
Michael Lotz
f2d4d6f676 Invalidate the elfHeader variable when the image struct is deleted on error, as
they share the same pointer. Should fix bug #3955.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30848 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-24 23:10:55 +00:00