* Moved reservation of memory for the "locked" cases upfront.
Particularly if the would-be area is a kernel area, we don't want the
address space to be write locked while doing that, since that would
block the low memory handler.
* For full lock areas the pages are reserved upfront, too. The reasoning
is similar. Reserve the pages needed by the translation map backend for
mapping the area pages there too.
* Moved the cache locking/unlocking out of the individual cases. All
want to have the cache locked the whole time, now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26741 a95241bf-73f2-0310-859d-f6bbb57e9c96
address, it is supposed to consider the worst case address range of the
given size.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26740 a95241bf-73f2-0310-859d-f6bbb57e9c96
in Tracker add-ons folder with short cut (like done for Backgrounds). Untested.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26739 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Renamed it to TextSearch
* Cleaned up the code to match our coding style (already was almost compliant
and the code is very clean and well designed, a pleasure to work with!)
* Fixed memory leaks and potential memory leaks in error codepaths
* Checked the success of most allocations (GrepWindow is missing) and
implemented error code paths
* Simplified the code in a few places
* Fixed bugs in code that iterated over the selected list items and assumed
it found a top level item already while it may not have
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26737 a95241bf-73f2-0310-859d-f6bbb57e9c96
before file_cache_write() or nothing had to be written.
* Fixed race condition. While neither transaction nor read lock are
held, the file size can change.
* Add the inode to the transaction whenever possible, i.e. on error
before file_cache_write() and after it as well. This should prevent
readers from seeing inconsistent blocks when the transaction has to be
rolled back.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26736 a95241bf-73f2-0310-859d-f6bbb57e9c96
empty thread structure. This causes the thread::team pointer to be NULL
during the early boot process, but our kernel debugger didn't like that.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26735 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Dumping the features as string is now a one time thing, that only happens
when DUMP_FEATURE_STRING is defined to 1.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26733 a95241bf-73f2-0310-859d-f6bbb57e9c96
gTeamSpinlock.
* Renamed the static global variables in smp.c to match our style guide.
* Minor other cleanup.
* Removed superfluous white space.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26730 a95241bf-73f2-0310-859d-f6bbb57e9c96
- Fixed deadlock in xsi_sem_undo - RecordUndo
- Fixed issue in xsi_sem_undo: if the semaphore set does not exist
anymore, ignore the request but do remove the process from the sUndoList,
which wasn't previously done.
- free() in ClearUndos was called with interrupts disabled
- when a semaphore set ends to exist, remove all it's sem_undo request as it's ID
will be reused in the future.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26727 a95241bf-73f2-0310-859d-f6bbb57e9c96
- iospace should now be initialized correctly, at least the kernel goes much further.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26726 a95241bf-73f2-0310-859d-f6bbb57e9c96
- push the address of the iframe before calling the C handler.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26724 a95241bf-73f2-0310-859d-f6bbb57e9c96
* sCopied wasn't needed anymore due to the sManagedEnviron variable.
* Minor cleanup, added a description to copy_environ_to_heap_if_needed().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26722 a95241bf-73f2-0310-859d-f6bbb57e9c96
the environment would crash on Haiku. Added a small test application that
just checks every one of those.
* Fixed env locking (in userland, you better check against B_INTERRUPTED).
* Made our code safe against an environ of NULL.
* There is now an additional sManagedEnviron that points to the environment
our code actually managed; whenever an application overrides environ, we'll
get aware of it with the next *env() function invocation, and will handle
it adequately.
* Added non-POSIX clearenv() function.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26719 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Improve code in FileUtils to copy attributes in chunks and improve
error checking. Should also copy 0 size attributes now, since those are valid.
* Craft SoundConsumer towards more style guide compliance.
* Use new (std::nothrow) and check result.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26717 a95241bf-73f2-0310-859d-f6bbb57e9c96
running - this fixes several cases where someone could see outdated data
when a transaction had to be reverted (the time between unlocking the inode
and actually reverting the blocks). For that, Inodes can now be put into a
singly linked list.
* Added a TODO in Inode::WriteAt() which explains why it cannot use the above
method: seems that our VFS/VM locking model isn't really that good.
* Fixed a possible deadlock in Attribute::_Truncate() where the inode write
lock was held before starting the transaction.
* Added an InodeReadLocker convenience class, that should be used instead
of ReadLocker - Inode::Lock() only still exists because of the needs of
bfs_io().
* Moved the bfs_io() callback hooks out of the exported module API region,
and removed their bfs_ prefix.
* Added a Volume::IsInitializing() method that should be used rather than
checking if Volume::ID() is >= 0.
* Removed the MultiInodeLocker again, as it's pretty much superfluous now.
* Moved openModeToAccess() to the Utility.h header.
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26715 a95241bf-73f2-0310-859d-f6bbb57e9c96
inode - unlike get_vnode() the busy flag won't prevent you from getting that
reference.
* Changed put_vnode() to return an error in case the vnode couldn't be found.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26713 a95241bf-73f2-0310-859d-f6bbb57e9c96
in steal_pages() which uses the number of pages in the inactive queue as
return criterion. It would thus return, if only marker pages were in the
queue and no page could be stolen. This led to a busy loop in
vm_page_allocate_page(). The whole system would become unusable when the
thread in question was the heap grower, since it would starve everyone
else due to its high priority.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26710 a95241bf-73f2-0310-859d-f6bbb57e9c96
user_{memcpy,memset}(), since that can cause a page fault, which needs
pages and might try to steal some from our cache.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26700 a95241bf-73f2-0310-859d-f6bbb57e9c96
which does
message->GetInfo("field", &type, &count);
while (message->FindBlah("field", --count, &...) == B_OK)
...;
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26695 a95241bf-73f2-0310-859d-f6bbb57e9c96
new parent directories. This would only be necessary in case it's a directory,
but we do it always now.
* This fixes bug #2556.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26694 a95241bf-73f2-0310-859d-f6bbb57e9c96