Commit Graph

25644 Commits

Author SHA1 Message Date
Salvatore Benedetto
b3ae704659 * fix year in copyright
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26856 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-07 10:59:35 +00:00
Salvatore Benedetto
40353b088c * Updating license
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26855 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-07 08:14:09 +00:00
Salvatore Benedetto
cefb069022 * Adding xsi semaphore test unit
* Moving common functions and macros used in realtime_sem_test1
  to a shared header as they are probably going to be used for other test unit



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26854 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-07 08:09:56 +00:00
Axel Dörfler
a89962b923 * read_cdda_data() needs to know the last frame of the track, so that it can
cut down the buffer size on the last request. This fixes bug #2565.
* cdda_read() did report an incorrect number of bytes read. This fixes bug
  #2511, and also that you couldn't copy tracks via "cp".
* cdda_read_stat() did not include the WAV header in its reported size.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26853 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-07 07:29:29 +00:00
Axel Dörfler
72ebbe4244 * Forgot to allocate the dma_resource before using it. Now scsi_cd works again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26852 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-07 06:41:15 +00:00
Ingo Weinhold
3394ebd3c2 * Improved some output and coding style.
* If a segment violation occurs, we do now check whether the thread in
  question has a handler for SIGSEGV. If so, we just send it the signal.
  Otherwise we notify the debugger as before.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-07 01:18:04 +00:00
Ingo Weinhold
309922b652 Copy and paste bug. Fixes #2576.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26850 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-07 00:19:44 +00:00
Ingo Weinhold
993a8b776f VMCache::RemoveArea(): Don't release the store reference while having
the cache locked, since it enters the VFS and might reenter VMCache,
thus causing deadlocks. Fixes bug #2577.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26849 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-06 23:02:59 +00:00
Stephan Aßmus
a5b8a7dfc9 Handle removed files.
* On Haiku, this will make them disappear from the results list.
* On BeOS, it will only work around the problem that we don't know
  which file was removed from the node monitoring message...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26848 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-06 20:22:50 +00:00
Jérôme Duval
1708513ca8 * added an ALIGN macro for easing readability and use it for 128 alignments
* use HDAC_STREAM_POSITION register value to check the current buffer cycle in interrupt handler
* added B_FULL_LOCK flags for area allocation, not sure it's handled but at least more correct
* buffer descriptors now use a low and high address fields
* applied a byte mask on format
* enabled PCI bus mastering if not yet done
* the PCI space register TCSEL (Traffic Class Select Register, which sets PCI express QOS) is now reset to TC0 (clear 0-2 bits) as needed on some boards like mine to 
ensure good playback

Playback is finally working correctly here on ICH8 HDA!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26847 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-06 20:04:51 +00:00
Stephan Aßmus
28fd262f0e Stop node monitoring when the model changes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26846 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-06 19:55:19 +00:00
Stephan Aßmus
c891bf220e Fix compilation for BeOS compatible targets.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26845 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-06 19:41:00 +00:00
Bruno G. Albuquerque
c93ffc4a03 Work in progress while trying to fix ticket #2227:
- Removed most of the currently fixup code as, at least on my machine, 
  it was messing stuff up. This makes the PATA controller work in IDE 
  mode!
- Added comments to clarify things and TODOs about what is still missing 
  (specially getting AHCI mode working).

Marcus, please review.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26844 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-06 18:57:56 +00:00
Stephan Aßmus
f7c226f467 * StartWatching() now takes an optional BLooper pointer. This looper will
then be used for receiving node monitoring messages.
* Reenabled using be_app as default BLooper if the API user does not provide
  one. I think the problem that Stefano needed to work aroung in r23995 was
  actually caused by the incorrect locking (an never unlocking) of the looper
  before calling PathHandler::Quit().
->If I understand correctly, this code as supposed to work around the possible
  situation that the looper holding those PathHandlers may have already quit,
  leaving stale PathHandler pointers behind. But that case was not prevented
  by the old code anyways, since one would have had to access freed memory to
  even get the stale BLooper pointer. The real fix would be to store the
  BLooper pointer with each PathHandler so that the possible gone-ness of
  those loopers could be checked independent of accessing the PathHandler
  pointer. (The whole problem is that PathHandler adds itself to the BLooper
  and if the looper quits, it will free all its attached handlers.)
* Introduced a global fallback BLooper for the case that no BApplication is
  running, which resolves a TODO.

All this is yet untested, but should have a good chance of working.
(Famous last words...)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26843 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-06 16:56:24 +00:00
Bruno G. Albuquerque
20a8524cc9 Work in progress while trying to fix ticket #2227:
- Better adhere to style guide.
- Remove superfluous check for device function before setting IRQ.
- Added comment about setting IRQ for device with function 1.
- This fixes nothing yet, in case you are wondering. :)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26842 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-06 16:39:56 +00:00
Axel Dörfler
f8009f7ba4 * Applied patch by kaliber: those headers weren't self-containing.
* This closes bug #2346.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26841 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-06 10:01:53 +00:00
Axel Dörfler
a8b77fe01e * Reenabled the ASSERT() in ata_request_set_status(), the problem has been
fixed. Not sure why the 6 to 10-byte command translation was triggered,
  though.
* Minor coding style changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26840 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-06 08:57:23 +00:00
Axel Dörfler
6568215497 * scsi_read_write_6() was incorrectly translating 6-byte requests with a length
of 0 (as this means 256 blocks).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26839 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-06 08:54:49 +00:00
Axel Dörfler
f8a59924e5 * Added Dump() method to IORequest, IOOperation, IOBuffer, and DMABuffer.
* Added KDL commands "io_request", "io_operation", "io_buffer", and
  "dma_buffer".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26838 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-06 08:01:07 +00:00
Ingo Weinhold
8d12bd1370 * Moved the incrementing/decrementing of vm_page::wired_count into
dedicated functions.
* Introduced gMappedPagesCount variable which counts the total number of
  physical pages that are mapped.
* Added vm_page_get_stats() which fills in the memory related part of
  the system_info structure. Used and cached pages are computed
  differently, now. The "available" (== not committed) memory is no
  longer used for the computation as it doesn't say anything about the
  actually used/free pages (with swap support enabled it is even
  less meaningful, since we first commit swap space when possible).
  We do also consider the memory used by the block cache as cached
  pages, now. All in all these changes should fix the memory statistics
  reported by get_system_info(), IOW bug #2574.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26837 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-06 00:28:28 +00:00
Ingo Weinhold
c79e66abb7 Added block_cache_used_memory() that returns the memory allocated by all
block caches for the block cache buffers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26836 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-06 00:09:31 +00:00
Ingo Weinhold
5db876653b Added object_cache_get_usage() function that returns the memory
allocated by an object cache.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26835 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-06 00:07:55 +00:00
Oliver Ruiz Dorantes
8bd7491914 Commit the file i forgot yesterday (ioctl change and cleanups)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26831 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-05 22:12:24 +00:00
Jérôme Duval
43619079f8 sManagedEnviron is already checked for NULL value in free_variables()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26830 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-05 22:06:21 +00:00
Axel Dörfler
65f1e8eceb * Ported scsi_cd, too, still untested.
* This should have been part of r26828, although it did not break the build :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26829 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-05 21:15:28 +00:00
Axel Dörfler
24593e2c79 * First baby steps in letting our drivers use the new I/O request/scheduler
architecture: for now, we do this on the lowest layer only, therefore all
  requests are handled synchronously (ie. in the scheduler's thread).
* Instead of using the block_io module, scsi_disk (and scsi_cd) are now
  exporting a device on their own, and use an I/O scheduler with an appropriate
  DMA resource.
* There are still lots of TODOs, and it can easily panic - don't update if
  you intend to demo Haiku.
* scsi_periph now only has an io() function that get an io_operation, instead
  of the previous read/write functions, moved preferred CCB size from those
  functions into the device registration.
* Changed all scsi_periph files to C++.
* scsi_cd ported, too, but untested.
* Removed block_io from image - it will be removed completely soon.
* Temporarily commented an ASSERT() in the ATA bus manager (in case you use
  it); it's sometimes triggered by the code now, and I haven't yet looked into
  the issue -- doesn't seem to harm, at least.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26828 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-05 21:11:51 +00:00
Maurice Kalinowski
34faa5f214 * In case we do not have any frames to convert we'll need to break,
otherwise we end up in an endless loop. This only happened when
   the remaining raw data provided did not contain enough content.
   In this particular case there were only 2 bytes remaining though
   the decoder needed 4 bytes to handle at least 1 frame. Seems like
   the audio file only provided data for one channel in the end, which
   did not lead to a B_LAST_BUFFER_ERROR yet as it has been read properly.
 * This fixes bug 1708 and most probably 1275 as well (someone check and
   close please)

Didn't we just have a discussion about Media handling killing the system
:P

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26827 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-05 21:09:12 +00:00
Maurice Kalinowski
2b273dbc5d whitespace cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26826 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-05 21:09:01 +00:00
Axel Dörfler
39b5c37418 * Added a DMAResource::Init() method that gets a device node - for now, it will
reuse the block_io attributes in the node to build the dma_restrictions.
* DMAResource::Init() now dumps the dma_resources (should be done with the
  TRACE() macro later).
* Turned off IOScheduler debug output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26825 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-05 21:00:02 +00:00
Karsten Heimrich
9e8c301a39 * fix of by one error, makes printing of ranges work properly
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26824 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-05 20:42:34 +00:00
Karsten Heimrich
14ea5e5e98 * whitespace cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26823 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-05 20:41:31 +00:00
Karsten Heimrich
1a74e75248 * replace some whitespaces
* return error in case we could not get all values from JobConfig



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26822 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-05 20:40:49 +00:00
Karsten Heimrich
1c08970124 * make use of libprint inbuild Preview class
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26821 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-05 20:39:11 +00:00
Axel Dörfler
8169e6b4e6 * Patch by Andreas that adds sched.h, and sched_yield() to Haiku.
* This closes ticket #2568.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26820 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-05 17:54:14 +00:00
Ingo Weinhold
57f2b5a013 * Changed the meaning of the {KERNEL,USER}_STACK_SIZE macros to not
include the guard pages. Adjusted the kernel and boot loader code
  accordingly -- the guard pages size is added/not removed respectively.
  The stack size passed to _kern_spawn_thread() is now the actually usable
  size, and it is no longer possible to specify a size smaller than or
  equal to the guard pages size.
* vm_create_anonymous_area(): Precommit two pages maximum -- a stack with
  only one page usable size obviously doesn't need two pages.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26819 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-05 17:19:46 +00:00
Axel Dörfler
afa9fe8958 * Patch by Andreas: we did not store ebp in vregs::ebp, and we did not store
ebx at all.
* This fixes bug #2569.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26818 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-05 17:13:06 +00:00
Ingo Weinhold
7bcc8f0f61 Removed whitespace at the end of lines.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-05 16:56:25 +00:00
Ingo Weinhold
5737b4aed8 * Increased the maximal number of (pseudo) semaphores.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26816 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-05 16:52:11 +00:00
Axel Dörfler
c569fd76b4 * Coding style cleanup, pointed out by Andreas.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26815 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-05 13:57:14 +00:00
Salvatore Benedetto
79f556e5a6 * Check for wake ups on Revert()
* Fix TRACE() output
* Check for IPC_CREAT in xsi_semget when IPC does not yet exist
* Fix bound checking
* Fix setpid call



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26814 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-05 09:44:36 +00:00
Stefano Ceccherini
03c9250f85 gcc4 build fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26813 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-05 08:33:40 +00:00
Karsten Heimrich
6e758d67b9 * cleanup
* sync against the preview driver
* fixed totally broken multiple pages on single page preview



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26812 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 23:29:40 +00:00
François Revol
6ac63f933f - fix warning
- fix build (weird ioctl name)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 23:18:03 +00:00
Ingo Weinhold
3f075fe6b5 We must not do any kernel exit work when we originally didn't come from
userland. E.g. preparing a signal handler would terribly go wrong, since
we don't have a userland iframe. This fixes bug #2562 and maybe also
#2522.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26810 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 21:53:10 +00:00
Stephan Aßmus
962a6c67e9 Finished implementing and enabled node monitoring on the folders and files
of the current search. If new files match the pattern, the appear in the
results, or are removed if they don't match anymore. The results also
adapt to changes in the files.
Basically, I added another iterator that is also used to track changes when
node monitor events arrive. Only those changed files are grepped again after
a timeout of .5 seconds when no new node monitor events pour in.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26809 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 21:51:33 +00:00
Ingo Weinhold
2a24bab833 arch_setup_signal_frame(): panic() if we don't have a user iframe.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26808 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 21:49:11 +00:00
Ingo Weinhold
5ccf1db34d * Also print whether an iframe is a userland or kernel iframe.
* In case of a kernel iframe the iframe is shorter -- fixed the output
  accordingly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26807 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 21:47:37 +00:00
Ingo Weinhold
783c4e20b4 Added comment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26806 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 21:45:50 +00:00
Stephan Aßmus
a9ab16e27c * Move the LockLooper() call before PathHandler::Quit() into Quit().
* The B_QUIT_REQUESTED message never arrived for me unless I unlock the
  BLooper again, then it works as expected.
* The B_QUIT_REQUESTED handling accessed fOwnsLooper after deleting the
  object.
(Review much welcome - I don't understand the purpose of locking the BLooper
at all before trying to use a BMessenger to send it a message.)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26805 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 21:16:11 +00:00
Oliver Ruiz Dorantes
5c78f79f3a Fix gcc4 build (using __FUNCTION__), and more whitespaces cleanups...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26804 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 20:13:03 +00:00