Commit Graph

25484 Commits

Author SHA1 Message Date
Oliver Ruiz Dorantes
001662ae04 A bit more styling on main headers
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26743 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 21:15:02 +00:00
Ingo Weinhold
7cc9a52df8 IORequests leaked their IOBuffers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26742 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 20:51:59 +00:00
Ingo Weinhold
c421c138b6 vm_create_anonymous_area():
* 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
2008-08-02 20:24:41 +00:00
Ingo Weinhold
802d18a970 Small semantical change of map_max_pages_need(): If given a 0 start
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
2008-08-02 20:11:11 +00:00
Stephan Aßmus
eeb8244dc2 Add TextSearch to the image (apps folder but not Haiku menu), create link
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
2008-08-02 18:54:13 +00:00
Stephan Aßmus
edf2516d60 Moved TextSearch to apps folder, since it's actually a regular app.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26738 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 18:51:20 +00:00
Stephan Aßmus
6c3234ba0b * Imported Tracker Grep 5.1 source code
* 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
2008-08-02 18:43:22 +00:00
Ingo Weinhold
d172ee84c3 * Fixed recently introduced write lock leak, when something failed
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
2008-08-02 17:41:03 +00:00
Axel Dörfler
0d6a27ae0a * thread_preboot_init_percpu() sets the current thread pointer with a mostly
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
2008-08-02 16:25:16 +00:00
Axel Dörfler
c0275e9556 * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26734 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 16:23:22 +00:00
Axel Dörfler
011d716270 * Removed the feature_string from the cpu_ent structure.
* 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
2008-08-02 15:50:50 +00:00
Axel Dörfler
6bf26da228 * Renamed sem_spinlock to sSemsSpinlock.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26732 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 15:04:47 +00:00
Axel Dörfler
272457553e * Renamed kernel_startup to gKernelStartup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26731 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 15:03:03 +00:00
Axel Dörfler
15374c5dbd * Renamed thread_spinlock and team_spinlock to gThreadSpinlock and
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
2008-08-02 14:55:53 +00:00
Axel Dörfler
11790544cd Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26729 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 14:52:18 +00:00
Axel Dörfler
02c8f6c89d * Coding style cleanups, no functional changes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26728 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 14:06:38 +00:00
Salvatore Benedetto
51daeb7147 - Fixed warnings
- 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
2008-08-02 11:30:55 +00:00
François Revol
64ea0b9f74 - fix early_map
- 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
2008-08-02 00:39:31 +00:00
François Revol
2fc21d4fad Use a bool to check if an irq was acknowledged by the MFP, else we don't call the handler.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26725 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 00:36:33 +00:00
François Revol
150b5ae01f - don't movem a7, it's the stack pointer. the cpu saves it for us before processing exceptions.
- 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
2008-08-02 00:34:40 +00:00
François Revol
b061bf2471 cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26723 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 00:31:19 +00:00
Axel Dörfler
ee091fc0cb * clearenv() did not return anything, but should have returned 0 for success.
* 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
2008-08-01 17:58:04 +00:00
François Revol
7a1fd4cbf8 allocate all kernel page directories at boot, this will simplify later code a lot.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26721 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-01 16:01:02 +00:00
Axel Dörfler
06b4c67fa5 * Instead of just deleting the array, we have to delete its contents, too.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26720 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-01 15:08:06 +00:00
Axel Dörfler
cc6c784ae7 * Sean C. Farley made me aware that some of the possible solutions to clear
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
2008-08-01 15:02:03 +00:00
Axel Dörfler
2accd07be4 * Replaced Chain with the new SinglyLinkedList.
* Renamed openModeToAccess() to open_mode_to_access().
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26718 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-01 14:20:16 +00:00
Stephan Aßmus
c1c81d42d1 * Use shared AutoDeleter.h instead of custom array deleter.
* 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
2008-08-01 14:16:05 +00:00
Axel Dörfler
d2d52d31ab * Made _LaunchInputServer() more robust: when launching by signature fails,
we try its well-known location directly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26716 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-01 14:02:02 +00:00
Axel Dörfler
2e3477e3d8 * Changed the inode write locking to be held as long as the transaction is
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
2008-08-01 12:28:28 +00:00
Axel Dörfler
ebaab6d5f4 * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26714 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-01 12:07:41 +00:00
Axel Dörfler
9f6ae76f02 * Added acquire_vnode() call that you can use to get another reference to an
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
2008-08-01 09:59:19 +00:00
Axel Dörfler
aaad303e67 * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26712 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-01 09:57:14 +00:00
Ingo Weinhold
e6f3de9a29 Added TODO -- food for thoughts.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26711 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-01 00:23:56 +00:00
Ingo Weinhold
dbc6635d1e The page queues no longer count added dummy pages. This fixes a problem
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
2008-07-31 23:54:14 +00:00
Ingo Weinhold
5087b42fd6 Superfluous whitespace.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26709 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 23:45:56 +00:00
Oliver Ruiz Dorantes
bbe098994d Wrong blackboard calculation
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26708 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 21:59:06 +00:00
Oliver Ruiz Dorantes
ceddc28636 Bring to the stack the LinkKey datatype by Mika Lindqvist
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26707 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 21:11:42 +00:00
Axel Dörfler
a9ae9781ea * Removed no longer needed IOCTL_FILE_UNCACHED_IO definition.
* Some cleanup, no functional change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26706 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 21:09:02 +00:00
Oliver Ruiz Dorantes
26e7ba5602 More Stylistic changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26705 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 21:08:27 +00:00
Oliver Ruiz Dorantes
b48fa68ace Fix bluetooth_server debug window tabs, they were getting out of bounds due the index assignation
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26704 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 21:03:17 +00:00
Ingo Weinhold
12c9f1761f * Added thread block type constant for rw_locks, so that they are listed
correctly by the "thread" and "threads" debugger commands.
* Added "rwlock" debugger command.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26703 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 20:43:40 +00:00
Oliver Ruiz Dorantes
0f9aa9c245 Patch by Fredrik Ekdahl. Fix tabs and whitespaces, this set of files were conflicting
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26702 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 19:55:13 +00:00
Oliver Ruiz Dorantes
ded3259257 Patch by Fredrik Ekdahl. Fix tabs and whitespaces
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 19:51:16 +00:00
Ingo Weinhold
9a0fc9a874 In cache_io(): Don't keep the cache locked while doing a
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
2008-07-31 19:23:17 +00:00
Ingo Weinhold
b627c47932 IORequest::Advance() would access the vec array out of bounds after
advancing to the end of the request.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26699 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 14:22:52 +00:00
Stephan Aßmus
97d52f8e2a Make the peak display automatically go back down for the max peaks.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26698 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 13:33:37 +00:00
Axel Dörfler
f9ae429701 * Replaced our SinglyLinkedList with one that has a similar interface as the
DoublyLinkedList. Not yet tested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26697 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 11:47:17 +00:00
Axel Dörfler
850b759925 * Updated the fs_shell version of DoublyLinkedList.h to contain the latest
fixes made by Ingo. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26696 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 11:21:47 +00:00
Stephan Aßmus
d666a89e8f Check for index < 0 too for B_BAD_INDEX. This fixes for example Tracker-Grep
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
2008-07-31 10:54:08 +00:00
Axel Dörfler
274e684a8e * bfs_rename() did not write lock the moved inode, but only its former and
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
2008-07-31 07:41:58 +00:00