Commit Graph

4642 Commits

Author SHA1 Message Date
Axel Dörfler f20a8750cb * Enlarged the default BLooper port capacity to 200 messages. Since limiting
the message count doesn't really make much sense anyway (as opposed to
  limiting the maximum size of waiting messages), we might still want to
  enlarge this even more.
* This should further help with #2212.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25709 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 18:24:19 +00:00
Ingo Weinhold 9101535322 Added new kernel thread "undertaker" which gets rid of dead thread
remains. This replaces the previous mechanism of switching the thread to
a dedicated death stack. We might consider moving more cleanup work to
the undertaker, but that seems a little more involved.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25704 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 14:28:31 +00:00
François Revol ebc5ec193f fix gcc4... and style rules. I won't be the only one paying beers at BeGeistert ;)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 12:44:18 +00:00
Axel Dörfler 44b6c0f4b6 Oops, this shouldn't have been part of this file, forgot to delete it when
copying from the playground.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25700 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 12:28:13 +00:00
François Revol 5bd8987ff0 fix C++ linkage of global var... it shouldn't be here anyway, but I suppose it's temporary.
This should fix the (gcc4 at least) build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25697 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 11:25:33 +00:00
Stephan Aßmus 5ebabf0952 Added new line at end of file.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25694 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 08:32:12 +00:00
Ingo Weinhold 2daa4194d4 Added macros for static initialization of mutexes, recursive locks, and
R/W locks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25691 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 02:10:10 +00:00
Ingo Weinhold 2b07b8e0f1 * Replaced all instances of benaphores in the kernel code by mutexes.
* Removed kernel benaphores.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25690 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 02:08:23 +00:00
Ingo Weinhold 1c18a5df87 Replaced R/W lock implementation. Should have a little less overhead
than a semaphore, and can already be used in the early boot process.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25689 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 00:32:06 +00:00
Ingo Weinhold b0f5179aa5 * Changed recursive_lock to use a mutex instead of a semaphore.
* Adjusted code using recursive locks respectively. The initialization
  cannot fail anymore, and it is possible to use recursive locks in the
  early boot process (even uninitialized, if in BSS), which simplifies
  things a little.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25687 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-28 23:12:36 +00:00
Ingo Weinhold 90ca025688 Removed prototypes for openpty() (which lives in pty.h) and forkpty()
(which we don't implement ATM). Why do we have a header that declares
stuff that is for the most part not supported?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25684 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-28 20:44:47 +00:00
Ingo Weinhold d46a010c43 Patch by Vasilis Kaoutsis: Added sigpause().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25682 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-28 15:28:49 +00:00
Axel Dörfler 9f16184577 Patch by Jan Klötzke with minor changes by myself:
* Use vm86 mode to call the VESA BIOS to do the actual mode switching by
  providing an ioctl in the vesa driver.
* Fix vm86.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25680 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-28 10:48:01 +00:00
Axel Dörfler 9c20d5cb7d * Fixed the byte order definitions.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25671 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-27 12:42:04 +00:00
Axel Dörfler 187c576425 * Added sys/ipc.h header. As the functionality has not yet been implemented,
I added an #error directive, so configure scripts shouldn't be fooled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25663 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-26 16:55:57 +00:00
Axel Dörfler 368167ede8 * Integration of the new driver architecture.
* Moved devfs from fs/ to device_manager/, and separated the legacy driver
  support from it.
* Removed fast_log module.
* There are a couple of (temporary) regressions, though:
  - legacy SATA and ISA IDE support is disabled, the drivers haven't been
    ported yet.
  - The not yet used ATA bus manager hasn't been ported yet, either.
  - AHCI changes have not been tested.
  - the listdev command has been removed from the build (as it currently
    doesn't work anymore).
  - device manager generated IDs currently are not freed anymore when a device
    node is removed.
  - generic drivers can't yet use the new driver architecture.
  - simple busses that do not support device types won't work yet.
  - legacy driver publishing/unpublishing (ie. what USB needs) has not been
    tested, and may be broken.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25662 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-26 16:52:27 +00:00
François Revol cb63d44e7a Remove hardcoding of endianness... that'll likely help ppc :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25655 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-25 20:12:00 +00:00
Stephan Aßmus 5b30a26b7c Added additional font face flags for "condensed", "light" and "heavy".
Our font has some extra styles and these could be picked up as the
"regular" face by accident, as witnessed by Firefox. Tracked down by
Michael Lotz. Firefox uses the correct font now for it's interface.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25636 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 14:54:18 +00:00
Marcus Overhagen 33e9755153 Small cleanup of ahci driver. Also clear the PCI interrupt disable bit during setup.
Add PCI command ID (interrupt disable) define to PCI.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25634 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 13:40:58 +00:00
Axel Dörfler a411c76cd6 * Added pthread_attr_setscope(), and pthread_attr_getscope(). We only support
PTHREAD_SCOPE_SYSTEM which makes the implementation rather simple.
* This closed ticket #2242.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25628 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-23 11:24:40 +00:00
François Revol 74be35c78b Some more funny sysconf()...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25627 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-23 01:38:05 +00:00
François Revol 4b9329efe1 Define PAGE_SIZE and PAGESIZE in limits.h. It should really depend on B_PAGE_SIZE, but I'm not sure we can #include anything in there...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25626 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-23 01:01:57 +00:00
François Revol 3a17a548da - factored out [f]pathconf().
- *pathconf() now uses statvfs and fs_info data when appropriate. It should also check for file type though, some only apply to directory or others.
- added confstr(_CS_PATH) with a sensible default.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25625 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-23 00:33:08 +00:00
François Revol ca974ded95 Some more [f]pathconf() names, not yet handled. filesizebits returns 64 though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25623 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 23:22:26 +00:00
Ingo Weinhold 0f448d21e5 * Added vm_page_write_modified_page_range(), which is similar to
vm_page_write_modified_pages(), save that it only writes pages in the
  given range.
* Added vm_page_schedule_write_page_range() which schedules all modified
  pages in the given cache's range for writing by the page writer.
* Added _kern_sync_memory() syscall and the msync() POSIX function.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25620 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 21:51:12 +00:00
Axel Dörfler 15173df4e9 Last patch of the vm86 patch series from Jan Klötzke - thanks!:
* The new function vm86_do_int(struct vm86_state *state, uint8 vec) provides a
  facility to call BIOS interupt handlers. The function must only be called from
  a user thread context because the lower 1MB of the address space is used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25610 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 13:54:28 +00:00
Axel Dörfler 7da0a81c0e Patch by Jan Klötzke (with additional TODO comments):
* Add a "fault_callback" to the thread structure which is called when a
  unhandled page fault happens in user space. A SIGSEGV will only be sent
  if the callback returns "true".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25609 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 12:33:30 +00:00
Axel Dörfler bb107c4e29 Patch by Jan Klötzke:
* In vm86 mode CS will have arbitrary values so we check for both USER_CODE_SEG
  and the VM flag in EFLAGS. This is also done when entering interrupt gates.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25607 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 11:59:47 +00:00
Stephan Aßmus ae6b38b83e Patch by Andreas Faerber:
* Added "struct" to ancillary_data_container which fixes the build of the
  Bluetooth h2generic driver.
---
* Updated license header.
* Honour 80 char line width.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25606 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 11:59:26 +00:00
Ingo Weinhold f3917584f1 Added missing INET_ADDRSTRLEN.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25598 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-21 22:37:42 +00:00
Oliver Ruiz Dorantes 0963754edf Create a parent class for the 2 devices class (RemoteDevice LocalDevice)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25596 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-21 21:56:55 +00:00
Ingo Weinhold 43a4a6bacb Forgot closing parenthesis.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-21 21:08:47 +00:00
Ingo Weinhold 3021393e36 Let's pretend we support POSIX threads.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25588 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-21 00:03:09 +00:00
Ingo Weinhold 9ac19900c4 Added LOG_UPTO() macro. Not part of POSIX, but widely used anyway.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25587 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-21 00:02:26 +00:00
François Revol e2a938c274 Add define for the kernel area to ppc & m68k. They still don't initialize TLS though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25584 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-20 21:28:32 +00:00
Axel Dörfler 35db13ea5a * Replaced the old s3savage driver with the new s3 driver, both written by
Gerald Zajac. Thanks a lot!
* Also put it on the image by default.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25583 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-20 21:09:49 +00:00
Ingo Weinhold a8af2b6dda Some work on pthreads:
* Made the pthread_cond_t internals public. This is necessary to support
  process shared condition variables. Fixed initializer macro.
* Made the pthread_rwlockattr_t structure opaque.
* pthread_t is no longer typedef'ed to int. It's the pointer to the
  internal _pthread_thread structure.
* Removed __get_pthread(). pthread_self() can be used instead.
* No longer tunnel the pthread exit value through Haiku's thread exit
  value. We do have a separate field in the _pthread_thread structure
  for it, now.
* Handle detaching of threads correctly.
* pthread_rwlockattr_{g,s}etpshared() use the
  PTHREAD_PROCESS_{SHARED,PRIVATE} constants, now.
* Commented out yet unsupported structures (barriers, spinlocks).
* Rebuilt APR optional package. The pthread changes weren't binary
  compatible.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25582 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-20 20:43:28 +00:00
Ingo Weinhold 89d327d66e Added missing spwd::sp_lstchg field.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25560 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-19 02:16:12 +00:00
Marcus Overhagen 694c3b75f4 fix bridge control register size
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25551 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 21:21:39 +00:00
Marcus Overhagen 1eace5fc53 fixed typo again ;)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25548 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 20:59:14 +00:00
Marcus Overhagen be121a1c53 fixed typo
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 20:57:49 +00:00
Ingo Weinhold b3d6c12dbf * Fixed kernel tracing for gcc 4. The ABI changed in a way that isn't
compatible with what our code assumed (pointers to objects of
  TraceEntry and its POD base class trace_entry aren't identical
  anymore).
* Added optional stack traces for ktrace_printf() output in the kernel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25531 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-17 18:59:19 +00:00
Ingo Weinhold fbe0c27a94 axeld + bonefish:
Changed condition variables so that it is allowed to block (e.g. lock
mutexes etc.) between Add() and Wait(). This fixes #2059, since the
block writer used them this way and could thusly fail to wait for a
condition variable, causing a temporary stack object to be used past its
lifetime.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25525 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-17 10:21:37 +00:00
Stephan Aßmus da2a1fefe4 Patch by Vasilis Kaoutsis: Fixed typo in comment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25507 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 12:08:13 +00:00
Ingo Weinhold 07ddcd64cf * Renamed libnetapi to libbnetapi. Create a symlink in the image.
* Extended R5 compatibility check to also consider calls from
  libbnetapi.
* Fixed incorrect R5 compatibility check in BNetEndpoint constructor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25489 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 13:49:48 +00:00
Ingo Weinhold 6e19c86ab0 Fixed potential warnings.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25487 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 12:52:34 +00:00
Ingo Weinhold 6b202f4e3d * Introduced new header directory headers/private/system which is supposed
to contain headers shared by kernel and userland (mainly libroot).
* Moved quite a few private kernel headers to the new location. Split
  several kernel headers into a shared part and one that is still kernel
  private. Adjusted all affected Jamfiles and source in the standard x86
  build accordingly. The build for other architectures and for test code
  may be broken.
* Quite a bit of userland code still includes private kernel headers.
  Mostly those are <util/*> headers. The ones that aren't strictly
  kernel-only should be moved to some other place (maybe
  headers/private/shared/util).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25486 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 03:55:16 +00:00
Ingo Weinhold 3ca1072d44 * Reimplemented pthread_once. The old one was neither thread-safe nor
particularly efficient.
* pthread_mutex implementation:
  - Removed the pthread_mutex_t indirection (the type was a pointer to
    the actual structure which was allocated on the heap), as it made
    sharing the mutex between processes impossible.
  - Removed the distinction between process shared and non-shared
    mutexes. Benaphores work just as well in shared memory, so we always
    use them.
* Fixed some static initializer macros. PTHREAD_COND_INITIALIZER is
  still broken, since it doesn't work in C code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25481 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-13 01:50:54 +00:00
Jérôme Duval 996f75abbb * the Chip field is currently unused in our pci ids list, so we prefer to provide the subsystem name when it is found as a second device description
* adjusted pci device dump


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25472 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 16:55:47 +00:00
Ingo Weinhold 370602bff6 Added pthread rwlock support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25470 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 13:56:11 +00:00
Ingo Weinhold b5e3c0a1ea Added new syscalls _kern_block_thread()/_kern_unblock_thread[s]().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25469 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 13:53:56 +00:00
Stefano Ceccherini e2fe7e2fe0 Removed PortQueue since it's not used. Small style (old) changes here
and there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25468 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 13:27:56 +00:00
Ingo Weinhold d648afb8d7 * For each userland team the kernel creates an area in the userland
address space that is fully locked and marked B_KERNEL_AREA. It can
  thus be accessed by the kernel without additional checks.
* For each userland thread we do create a user_thread structure in that
  area. The structure is accessible from userland via TLS, using the
  private get_user_thread() function.
* Introduced private userland functions [un]defer_signals(). They can be
  used to cheaply disable/re-enable signal delivery. They use the
  user_thread::defer_signals/pending_signals fields which are
  checked/updated by the kernel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25451 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-11 16:25:35 +00:00
Ingo Weinhold 58148e2e02 Added new private area protection flag B_KERNEL_AREA, which prevents all
changes to the area (delete, resize, clone) from userland.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25450 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-11 16:02:13 +00:00
Ingo Weinhold 4d3680aaef Added timeout constant B_ABSOLUTE_REAL_TIME_TIMEOUT which specifies a
timeout relative to the Epoch.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25434 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 21:34:51 +00:00
Ingo Weinhold b932012815 Patch by Andreas Faerber:
Replaced single-line comments by multi-line comments for ANSI C
compliance.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 21:30:34 +00:00
Jérôme Duval ba64d8928a * added B_KATAKANA_HIRAGANA and B_ZENKAKU_HANKAKU (used in Japanese keymap)
* Patch by Shinta: switch between input methods are now not only done with Alt+Space but Alt+Zenkaku/Hankaku.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25416 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 12:38:57 +00:00
Axel Dörfler 1da9f5cea5 * Added BDiskSystem::ShortName() and everything needed to get it there.
* Added BDiskDeviceRoster::GetDiskSystem() method, that can get a disk system
  by short/pretty/module name - since they should all be unique, I put them
  in a single namespace, please complain if you don't like that :-)
* Cleaned up DiskSystem.h and DiskDeviceRoster.h according to the updated
  header guidelines.
* Renamed ntfs pretty name from "ntfs File System" to "Windows NT File System".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25414 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 11:44:00 +00:00
Axel Dörfler aa8bff87ee Followed Ingo's suggestion, and made StackDeleter an AutoDeleter specialization.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25395 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-09 13:08:59 +00:00
Axel Dörfler 359f758bc4 * Added PCI_hd_audio sub-type in the PCI_multimedia base class.
* Fixed some minor typos.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25393 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-09 12:42:33 +00:00
Ingo Weinhold f7cc12b389 Implemented pthread_attr_{g,s}etstacksize(). Also added commented-out
prototypes for the missing pthread_attr_*() functions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25390 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-09 01:36:49 +00:00
Ingo Weinhold 4c49f2056b * Changed _kern_spawn_thread() and create_thread(): Instead of individual
arguments they get a single thread_creation_attributes structure now.
* Added stack_address and stack_size to thread_creation_attributes,
  which allow to specify the stack size or the stack to be used for the
  new user thread.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25389 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-09 01:32:36 +00:00
Ingo Weinhold 965aa03f49 Changed all error codes from enum values to macros. This allows for
compile time checks. Incidently those are not totally uncommon in
portable code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25385 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 20:54:14 +00:00
Axel Dörfler 56bbbbc9ca * Added Adopt() method that steals the other path's buffer.
* Fixed operator=(): the second argument of SetTo() is a boolean (normalize),
  not the length of the buffer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25382 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 16:45:29 +00:00
Axel Dörfler b1429e2a05 Added a StackDeleter class that also empties the stack and deletes the items.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25381 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 16:43:59 +00:00
Axel Dörfler 02a3b9ef49 * kernel_daemon is now a C++ file, and uses DoublyLinkedList instead of
the C list mechanism which also makes the code nicer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25375 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 15:08:14 +00:00
Ingo Weinhold f23d0a6242 Implement shm_open() and shm_unlink(). The shared memory objects are
simply created as files in /boot/var/shared_memory/. The Bootscript
clears the directory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25374 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 13:42:33 +00:00
Ingo Weinhold 3dfe682f55 * Added some padding to the sem_t structure.
* Changed the semantics of unnamed semaphores. Before parent and child
  of a fork() would always share an earlier created semaphore. Now we do
  that only, if the "shared" parameter of sem_init() was true. That's
  still not quite the behavior Linux and Solaris have, but should be
  perfectly fine with how reasonable code would use the API.
* There's a global table for shared unnamed semaphores now. ATM a
  semaphore is leaked when no one explicitly destroys it (just as with
  named sems).
* Enforce per-team and global semaphore number limits.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25362 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 01:39:49 +00:00
Ingo Weinhold 01b1098795 * Fixed some misunderstanding regarding the _POSIX_* macros. They are
not supposed to be passed to pathconf() or sysconf().
* Added POSIX semaphore related macros.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25361 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 01:27:31 +00:00
Axel Dörfler 7cbf8fdd5a First part of the vm86 work by Jan Klötzke:
* Allow userland teams to create areas below 1 MB when requested specifically.
* Note, this is a temporary solution - see the comments in the code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25358 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-07 21:21:43 +00:00
Maurice Kalinowski 8b1e3b1af8 - Implemented MediaExtractor::Copyright, which just calls the instantiated reader
- Implemented BMediaFile::Copyright, which just calls Copyright() of the extractor. So this is just a simple pass through.
- Style cleanup (mostly whitespaces)

Problem is that our readers currently return the copyright of the source code, not the copyright of the MediaFile itself, like the BeBook documents. Thus, we might need to change all readers to return appropiate data or behave differently for Haiku readers.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25356 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-07 21:09:56 +00:00
Ingo Weinhold 98e6713172 * Moved realtime_sem.{cpp,h} into new posix subdirectory.
* Renamed the old kernel_posix[_arch...].o to kernel_lib_posix...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25336 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-06 23:16:04 +00:00
Jérôme Duval 7c8ddc9795 added B_SAFEMODE_DISABLE_APM
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25334 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-06 22:04:25 +00:00
Ingo Weinhold 5142c2ac86 Added support for POSIX semaphores (the ones from the XSI extension
Realtime option group). The implementation should be complete, but is
totally untested yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25326 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-06 03:39:36 +00:00
Ingo Weinhold 3bb3ab83a4 Missing copyright header.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25325 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-06 03:30:48 +00:00
Ingo Weinhold 22c6962959 Added atomic_pointer_get().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25324 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-06 03:30:25 +00:00
Ingo Weinhold cb734beeee Added get_open_fd() function which gets the descriptor and also
increments its open count.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25317 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-05 00:24:14 +00:00
Ingo Weinhold d29deffa2c Added the Linuxish SO_PEERCRED.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25303 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-04 00:28:27 +00:00
Ingo Weinhold cdc00dadfc * Added optional {send,read}_data_no_buffer() hooks to the protocol
module interface. They directly operate on iovecs and thus allow
  protocols that don't need it to avoid the creation of a net_buffer.
* Adjusted the socket module to support the new hooks. If they are
  present, they will be chosen over the old hooks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25299 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-03 01:11:21 +00:00
Ingo Weinhold 49e00d1f99 Moved the container management for ancillary data from the net_buffer
module to the stack module. There's a dedicated struct
ancillary_data_container, now. One can just set the container on a
net_buffer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25292 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-02 14:37:16 +00:00
Ingo Weinhold 0c615a01ae * Removed old mutex implementation and renamed cutex to mutex.
* Trivial adjustments of code using mutexes. Mostly removing the
  mutex_init() return value check.
* Added mutex_lock_threads_locked(), which is called with the threads
  spinlock being held. The spinlock is released while waiting, of
  course. This function is useful in cases where the existence of the
  mutex object is ensured by holding the threads spinlock.
* Changed the two instances in the VFS code where an IO context of
  another team needs to be locked to use mutex_lock_threads_locked().
  Before it required a semaphore-based mutex implementation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25283 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-01 22:07:36 +00:00
Ingo Weinhold ee96aa8f6e * Replaced cutex::release_count by flags field. It is only one thread
that can unlock the mutex, so one bit is sufficient.
* Added cutex_init_etc() which has an additional "flags" parameter.
  The only specifyable flag is CUTEX_FLAG_CLONE_NAME, which causes the
  function to strdup() the given name and free() its copy in
  cutex_destroy().
* cutex_destroy() does now unblock waiting threads.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25280 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-01 18:06:09 +00:00
Ingo Weinhold 184de764fe Replaced the vm_cache mutex by a cutex. This should save quite a few
semaphores.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25277 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-01 01:59:09 +00:00
Ingo Weinhold 8562499f44 * Introduced a new locking primitive I called "cutex" (sorry for the
name, couldn't resist :-P). It's semantically equivalent to a mutex,
  but doesn't need a semaphore (it uses thread blocking and a simple
  queue instead). Initialization can't fail. In fact it is ready to use
  without initialization when living in the bss segment, also in the
  early boot process. It's as fast as a benaphore in cases of low lock
  contention, and faster otherwise.  Only disadvantage is the higher
  immediate memory footprint of 16 bytes.
* Changed how the "thread" and "threads" debugger commands list the
  objects they are waiting for. Cutexes are also included.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25276 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-01 01:53:07 +00:00
Ingo Weinhold 514fb1360b * Removed select_sync::lock. The only thread that was still locking was
the selecting thread, which has obviously no effect.
* Changed select_info::events to vint32. It is now updated atomically.
  This removes a race condition when concurrent threads would notify at
  the same time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25273 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-30 16:12:20 +00:00
Ingo Weinhold 2428097297 Removed superfluous uint32 ref parameter from select() FS hook.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25268 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-30 00:06:17 +00:00
Axel Dörfler 801591dbde * Added an atomic_pointer_set() template function to util/atomic.h.
* Made the pointers const.
* Changed how the ARP module maintains its arp_entry::request_buffer: it
  now uses the atomic_pointer*() functions to make sure there is no race
  condition, and it's deleted only once.
* Getting an ARP entry would return uninitialized data, if the entry hadn't
  been resolved yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25263 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-29 22:03:03 +00:00
Axel Dörfler b1d749f8f1 * Added an atomic.h header that provides a C++ file with a templatized
64-bit safe version of atomic_test_and_set() for pointers:
  atomic_pointer_test_and_set().
* The VFS is now using this function (it's not used anywhere else in the
  kernel this way).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25260 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-29 21:05:05 +00:00
Axel Dörfler c0b5962cd6 * Removed unused function benaphore_lock_etc(). A timeout is not really a
good idea for a benaphore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25257 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-29 20:20:36 +00:00
Ingo Weinhold 0e8836d284 Fixed build for paranoia disabled globally, but enabled for individual
components.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25253 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-29 18:42:31 +00:00
Stephan Aßmus f466d35d9c Rewrote parts related to drawing the labels. The order of drawing happens as
this (seems to be what R5 BStatusBar does):
* combine the "trailing text" with the "trailing label" and truncate the
  resulting string on the left side according to the width of the entire
  control
* combine the "label" with the "text" and truncate that on the right side
  according to the space left by the right hand text.

-> No more overlaps (theoretically, in practise there are still overlaps
  because our BFont::TruncateString() does not respect the width in some
  situations.)

* Changed _SetTextData() accordingly, it is not used anymore for the
  label and trailing label, and could therefor be simplified a little.
* fixed _BarFrame() to not return fractional coords, which could sometimes
  leave a dirty line of pixels.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25244 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-29 12:42:10 +00:00
Ingo Weinhold 97c0a2b3f1 * Paranoia checks were accidentally globally enabled by default. Object
* cache paranoia was always enabled.
* Changed from paranoia on/off to levels. Adjusted the macros to take a
  level argument.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25215 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-27 15:13:31 +00:00
Ingo Weinhold 2b8ae28a15 * Added kernel tracing. Even with optional stack traces.
* Added "mode" parameter to set_paranoia_check(), which specifies
  whether the check is supposed to already exist/not exist yet. This
  allows for, as it turns out, very useful additional tests. Added
  {ADD,UPDATE}_PARANOIA_CHECK macros that imply the used "mode"
  parameter.
* PARANOIA_SLOT_COUNT was accidentally redefined in the source file.
* Fixed remove_paranoia_check(). It didn't remove anything.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25207 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-27 03:14:36 +00:00
Ingo Weinhold 65f4015279 Support for stack traces in tracing entries:
* Added capture_tracing_stack_trace() which allocates space in the
  tracing buffer and captures the stack trace according to the given
  parameters.
* Added TraceOutput::PrintStackTrace() to print a stack trace thus
  created.
* Added TraceEntry::DumpStackTrace() callback which is supposed to print
  a stack trace for the entry, if it can do that.
* Added "--stacktrace" switch to the "traced" command, which causes the
  stack traces for all entries that have one to be printed as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25205 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-27 03:02:01 +00:00
Ingo Weinhold 4dd0a2c7b6 Added arch_debug_get_stack_trace() that can be used to get a stack trace
(the list of return addresses) for the current stack.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25204 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-27 02:54:27 +00:00
François Revol d4a5975f50 - some fields needed to build usb_serial
- use the dano version by default
- s/ddraquire/ddaquire/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25203 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-26 23:52:58 +00:00
François Revol 3196359ad2 - some more defines
- the dano version is exposed as v1.1 so drivers can use select with a simple ifdef
- add copyrights from the tty driver as I'll be copying code from it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25201 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-26 21:56:46 +00:00
François Revol 42889352f8 A stubbed tty bus manager.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25198 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-26 21:20:13 +00:00
Ingo Weinhold dfa611bb04 Added paranoia checks debug facility. It helps checking that data in
memory haven't changed behind one's back.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-26 20:25:02 +00:00
Jérôme Duval e8bc20e263 updated mesa to 7.0.3
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25189 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-26 16:33:15 +00:00
François Revol 807cf76df0 memory barrier functions available for drivers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25183 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-26 15:18:04 +00:00
Jérôme Duval 67ed230831 fix warning
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25182 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-26 15:12:55 +00:00
Jérôme Duval 66cb27d82e patch from JiSheng which fixes firewire build warnings and fix atomic_set_int to use atomic_or
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25181 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-26 15:02:43 +00:00
Stephan Aßmus 03baa14fe9 Style improvements.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25171 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-26 09:53:49 +00:00
Ingo Weinhold 123e47de1b Was using __{BEGIN,END}_DECLS without including <sys/cdefs.h>.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25163 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 20:29:47 +00:00
Ingo Weinhold 0e42d1bcd8 Our sockaddr_storage is only 128 bytes long. Hence invocations of bind()
or connect() that passed sizeof(sockaddr_un) would always fail. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25138 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 22:30:54 +00:00
Ingo Weinhold cc6e7cb347 Added the BSDish openpty().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25135 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 21:30:38 +00:00
Ingo Weinhold fb913b19be Added POSIX functions posix_openpt(), grantpt(), ptsname(), and
unlockpt(), which provide a portable way of opening a pty.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25134 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 21:29:13 +00:00
Ingo Weinhold 06b7c7ffe2 * Set reasonable terminal flag defaults. This makes telnetd fully usable
again.
* Publish /dev/ptmx. Opening it will open a fresh pty master. In
  principle /dev/pt/ is obsolete now, but I guess we keep it around for
  compatibility with BeOS. Though there shouldn't be many applications
  opening a pty, that we might be interested in...
* New ioctls B_IOCTL_GET_TTY_INDEX (returns the tty index) and
  B_IOCTL_GRANT_TTY (grants tty slave access rights).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25133 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 21:26:35 +00:00
Ingo Weinhold 023bf5fcda * Added support for timeouts.
* Added support for non-published condition variables. One has to call
  Init() on those, and add entries directly with the
  ConditionVariable::Add() method.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25110 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 21:46:23 +00:00
Ingo Weinhold f842b6fa57 * Added THREAD_BLOCK_TYPE_OTHER.
* Made the object pointer passed to thread_prepare_to_block() const, so
  that strings can be passed without casting. Passing a string could
  maybe be made a convention for THREAD_BLOCK_TYPE_OTHER.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25109 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 21:43:54 +00:00
Ingo Weinhold 6cef245eca * Detemplatized ConditionVariable{Entry}. Merged them with their
respective Private* base class.
* Changed sigwait() and sigsuspend() to use thread_block() instead of a
  condition variable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25100 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 18:32:15 +00:00
Ingo Weinhold b95f6d4710 * Introduced a set of functions (thread_prepare_to_block(),
thread_block(), thread_unblock(),...) that allow a thread to wait for
  something without needing a semaphore or condition variable. It can
  simply block and another thread can unblock it. Supports timeouts and
  interrupting. Both semaphores and condition variables use this
  common mechanism, now.
* Semaphores:
  - Some simplifications due to the thread blocking mechanism.
  - Changed locking order to sem -> thread. It was the other way around
    before and when introducing the wait_for_objects() support I had
    also introduced a situation where the locking was reverse, which
    could potentially cause a dead lock on SMP systems.
  - Instead of queueing thread structures, a semaphore queues
    queued_thread entries now, which are created on the stack. The
    thread::sem structure could thus be removed.
  - Added sem_entry::net_count, which is sem_entry::count plus the
    acquisition count of all waiting threads. This number is needed in
    remove_thread_from_sem() and instead of computing it there we
    maintain it.
  - Fixed remove_thread_from_sem(). It would not unblock threads, if
    the sem count was <= 0.
  - Made sem::last_acquirer unconditional. It is actually needed for
    sem_info::latest_holder. Fixed fill_sem_info() accordingly.
  - Added some optional tracing output, though only via ktrace_printf().
* Condition variables:
  - Could be simplified significantly through the use of the thread
    blocking mechanism. Removed a good deal of unnecessary code.
  - Moved the ConditionVariableEntry "flags" parameter from Wait() to
    Add(), and adjusted all places where condition variables are used
    accordingly.
* snooze() uses thread_block_with_timeout() instead of a semaphore.
* Simplified thread interrupting in the signal and user debugger code.
  Instead of separate functions for threads waiting on a semaphore or
  condititon variable, we only have a single thread_interrupt(), now.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25099 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 16:22:42 +00:00
Ingo Weinhold e01cebeb0a * cancel_timer():
- If the hook of the timer we're cancelling is currently being
    executed, we do now wait till it is finished. This is how the BeBook
    specifies the function to behave.
  - Periodic timers would not be cancelled, if their hook was being
    invoked at the same time, since they weren't in the queue during
    that time.
  - Since we know the CPU on which the timer is scheduled (timer::cpu),
    we don't have to look through any other CPU queue to find it.
  - Fixed the return value. It should report whether the timer had
    already fired, and was not always doing that.
* Added private add_timer() flag B_TIMER_ACQUIRE_THREAD_LOCK. It causes
  the thread spinlock to be acquired before the event hook is called.
  cancel_timer() doesn't wait for timers with the flag set. Instead we
  check in the timer interrupt function after acquiring the thread
  spinlock whether the timer was cancelled in the meantime. Calling
  cancel_timer() with the thread spinlock being held does thus avoid any
  race conditions and won't deadlock, if the event hook needs to acquire
  the thread spinlock, too. This feature proves handy for some kernel
  internal needs.
* The scheduler uses a B_TIMER_ACQUIRE_THREAD_LOCK timer now and
  cancel_timer() instead of the no longer needed
  _local_timer_cancel_event().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25098 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 15:29:22 +00:00
Ingo Weinhold f97199edd3 Made dump_tracing() (the "traced" command function) available in the
kernel and added a WrapperTraceFilter* parameter, which allows for
additional filtering. This way other commands can print tracing output
with special filtering. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25094 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 14:52:48 +00:00
Axel Dörfler 945fb7e32a * Replaced destructor with destructorFunc to please python - it's not a reserved
keyword, so this stupid python should really be fixed instead.
* Enforced the 80 column limit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25090 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 21:20:07 +00:00
Ingo Weinhold 8db2e37492 Removed the feature that a thread can wait for more than one condition
variable at once. It wasn't used anymore, and the code gets simpler.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25080 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 15:19:48 +00:00
Ingo Weinhold 66aac81e98 We use only a single condition variable (instead of thread different
ones) for wait_for_child(), which is notified when any job control
condition (child dead, stopped, continued) occurs. These events are
relatively rare anyway, and it simplifies the code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25079 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 15:15:58 +00:00
Ingo Weinhold e378ab1c09 Added MethodDeleter class, which calls a specified method on the object
when destroyed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25067 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 02:54:38 +00:00
François Revol 0ab2d7407c Fixed ksocket header as we don't use a socket module anymore.
Fixes building nbd, will help with nfs and googlefs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25061 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-19 23:58:26 +00:00
Oliver Ruiz Dorantes 39399f65f0 - Implement RemoteDevice::GetFriendlyName() in kit and handle the required reply in the server.
- Now a discovery process is nicer.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25053 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-19 16:53:06 +00:00
Axel Dörfler 45e95a057f * Removed the old net_stack driver code, and the kernel socket interface.
* Also removed the header files that belong to those files.
* Only kept the userland_ipc.h header for now, to remember us about the
  former userland server driver (that I also removed - it can always be
  resurrected from SVN if needed).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25045 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-19 12:42:25 +00:00
Stephan Aßmus 1dde19ddbc Fix the GCC version check for the virtual destructor. Thanks to Micheal for
showing how to do it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25043 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-19 07:01:48 +00:00
Ingo Weinhold f694f63e2b * Moved private passwd/group/shadow passwd limit constants from
<libroot_private.h> to <user_group.h>.
* Added support in the registrar for adding and modifying users.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25040 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-19 00:10:51 +00:00
Oliver Ruiz Dorantes fae5a1d349 - Add inquiry fields for the RemoteDevice, to store the information retrieved .
- Update those fields at discovering




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25006 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-17 19:17:10 +00:00
Ingo Weinhold 2d9a40222f ReceiveFrom() can now return the message_port_info for the received
message, if desired.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25004 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-17 17:58:02 +00:00
Ingo Weinhold 7727e08e5f Added experimental public API get_port_message_info_etc(). It is similar
to port_buffer_size_etc(), but returns the info through a structure,
which also identifies the sender (uid, gid, team ID) of the message.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25003 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-17 17:46:02 +00:00
Ingo Weinhold a94ce1c912 * Reorganized the passwd and group support: A dedicated thread in the
registrar provides access to the DBs via a port message based
  protocol. The functions in libroot just ask the registrar now.
* Added Linuxish shadow passwd support. No putspent() though -- we'll
  provide private functions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25002 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-17 16:19:18 +00:00
Ingo Weinhold e09769a94c Added Dump() method. It prints some general info and a list of the
message fields, no data, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-17 16:05:37 +00:00
Oliver Ruiz Dorantes 01e363a708 - Reflect the APi change in the RemoteDevice
- Implement function to compare Bluetooth Addresses


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24992 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-16 22:17:55 +00:00
Stephan Aßmus 261a29594b Applied patch by Artur Wyszynski:
* Added virtual destructor to BRefFilter in case the GCC version is 3 or newer
  (can't do it for GCC 2.95.3, since that would break binary compatibility
  AFAIKT)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24986 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-16 20:11:54 +00:00
Stephan Aßmus 52e06f988d Applied patch by Artur Wyszynski:
* Renamed BView::Alignment() to LayoutAlignment() which fixes a ton of warnings
  and some conflicts with BControls.
* Added virtual destructor to BRefFilter in case the GCC version is 3 or newer
  (can't do it for GCC 2.95.3, since that would break binary compatibility 
  AFAIKT)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24983 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-16 17:11:40 +00:00
Bruno G. Albuquerque 044f45b2db - Another patch by Hervé W.
- Updated code so Processor IDs for older processor do not have to be 
modified.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24979 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-15 23:51:17 +00:00
Oliver Ruiz Dorantes be79ee53e1 - Add Implicit namespaces
- Fix constructors & and friend classes



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24976 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-15 22:26:32 +00:00
Ingo Weinhold 3cf7ecd1e4 * Added <sys/mman.h> header. It declares only mmap() and munmap() yet
and defines the macros needed by them.
* Renamed syscall sys_vm_map_file() to _kern_map_file() and changed the
  path to an FD parameter. Changed vm_map_file() accordingly and
  adjusted the kernel ELF loader and the runtime loader.
* Added syscall _kern_unmap_memory().
* Added bool unmapAddressRange parameter to vm_create_anonymous_area()
  and map_backing_store(). If true and the address specification is
  B_EXACT_ADDRESS, all areas in the specified address range will be
  deleted (unless an area is covered only partially).
* Introduced B_SHARED_AREA flag, which is set on areas that have been
  created by {vm,_user}_map_file() with REGION_NO_PRIVATE_MAP. When
  fork()ing those areas won't be copied CoW, but rather be cloned. This
  is needed for mmap() MAP_SHARED.
* {vm,_user}_map_file() also accept an FD argument < 0, in which case an
  anonymous area is created.
* Implemented mmap() and munmap(). Currently there's the restriction
  that we can't partially unmap areas. Otherwise the functions should be
  rather compliant. We also support the non-POSIX extension
  MAP_ANONYMOUS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24964 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-13 22:52:11 +00:00
Ingo Weinhold 34cbfd39d3 Added CObjectDeleter class, which invokes a given destructor function.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24963 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-13 22:33:44 +00:00
Jérôme Duval 801fe71d43 added amd geode lx cpu type, untested
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24960 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-13 17:20:46 +00:00
Bruno G. Albuquerque 9c383d9867 Applied patch by Hervé W.
- Updated Intel processor IDs.
- Only take extended family/model into account on Intel processors.




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24958 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-13 07:27:12 +00:00
Axel Dörfler 4b3b81da9e This header is no longer necessary, since Ingo added the BSD timer macros
to our sys/time.h - this fixes a lot of warnings, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24952 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-13 02:28:43 +00:00
Ingo Weinhold f13ba03959 * Removed SyscallRestartWrapper comparison operators. They are not
needed, since we've got a cast operator.
* Reverted r24927-r24929. There's no potential ambiguity anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24949 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-12 17:18:31 +00:00
Ingo Weinhold 97cdbb548e Added support for sending/receiving ancillary data. The protocol modules
have two more optional hooks for attaching supplied ancillary data to a
net_buffer and for processing received ancillary data. Not sure, if that
is flexible enough for all kinds of ancillary data, but it is for
SCM_RIGHTS and also should for SCM_CRED[ENTIAL]S (if we ever decide to
implement one of those) -- don't know any other types on other protocol
levels.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24941 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-12 09:28:05 +00:00
Ingo Weinhold 62d7da1f45 Added support for attaching ancillary data to a net_buffer. It's a naive
implementation ATM, since it malloc()s the required memory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24940 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-12 09:19:44 +00:00
Ingo Weinhold 0cc82d47d4 Added close_fd_index() which is pretty much like close(), but gets the
IO context in which to close the FD.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24937 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-12 08:32:29 +00:00
Ingo Weinhold ac4630e161 * Added <sys/param.h> include, which is needed for _ALIGN().
* Added SCM_RIGHTS macro.
* Added a few non-standard but widely-used CMSG_*() macros.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24936 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-12 08:30:25 +00:00
Ingo Weinhold 43d5590ce1 Yep, first clear THREAD_FLAGS_SYSCALL, then check whether it is set.
That would explain why syscall restarts were broken. In fact there's no
reason to check the flag at all, since we know we set it.

ftp appears to work again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24918 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 20:36:50 +00:00
Ingo Weinhold 3118b3a7cb * Added fd_ops::set_flags() hook. It's only implemented by socket FDs
ATM.
* Changed common_fcntl() to also work for non-vnode-based FDs. Only the
  operations that require a vnode do fail now. F_SETFL uses the new
  fd_ops::set_flags() if available, falling back to the vnode respective
  operation.
* Changed some direct accesses to file_descriptor::u::vnode. It was safe
  in those cases, but might not be anymore if we ever change fd_vnode().

ftp can at least connect to servers again, now, but apparently we still
have a problem with syscall restarts -- downloads fail after one second,
when the timer goes off.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24917 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 19:21:14 +00:00
Stephan Aßmus f156c25d14 Applied patch by JiSheng Zhang:
Synchronized firewire bus manager with FreeBSD current.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24916 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 17:35:11 +00:00
Ingo Weinhold 75015ff525 * Renamed THREAD_FLAGS_IOCTL_SYSCALL to THREAD_FLAGS_SYSCALL,
syscall_restart_ioctl_is_restarted() to syscall_restart_is_restarted,
  IoctlSyscallFlagUnsetter to SyscallFlagUnsetter, and
  IoctlSyscallRestartWrapper to SyscallRestartWrapper, as they are no
  longer only used for ioctl().
* Removed unused syscall_restart_ioctl_handle_post().
* Made SyscallRestartWrapper a lot fancier. Instead of storing a
  reference to the result value, it stores the value itself, and it
  features all the interesting operators that make it appear like that
  value. This simplifies the use of the class quite a bit.
* THREAD_FLAGS_SYSCALL is now set for all socket function and the
  read[v](), write[v]() syscalls.
* Added is_syscall() function and net_stack hook to the net stack.
* Removed "kernel" parameter from all net_stack_interface and net_socket
  module hooks. They aren't need any longer, since is_syscall() can be
  used instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24914 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 16:13:47 +00:00
Stefano Ceccherini 838c73ba76 Removed unused BWindow friend classes, renamed some BView member
variables to fit our guidelines.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24912 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 09:26:11 +00:00
Stefano Ceccherini 18af47f5c4 Renamed some private methods to have the underline prefix, now that
BWindow doesn't call them directly anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24911 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 08:53:25 +00:00
Stefano Ceccherini 150ddd17b1 added missing header
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 08:29:54 +00:00
Stefano Ceccherini 10f4d0679a Added a class MenuPrivate to handle access to private BMenu methods.
BMenuItem and BWindow are no longer friends of BMenu, but use this class 
instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24909 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 08:22:09 +00:00
Ingo Weinhold df50f7a9b4 * Changed the way the socket functions work:
- The net_stack driver is no longer used. Instead we have a kernel
    module which is directly used by syscall implementations in the
    kernel. I.e. we no longer tunnel those functions through ioctls, but
    have normal syscalls.
  - Removed the superfluous net starter module.
  - Implemented the FDTYPE_SOCKET type file_descriptors, that is sockets
    are no longer vnode based.
  - Adjusted libnetwork (the socket function implementations)
    accordingly.
  - Adjusted netstat accordingly.
* Socket module:
  - Implemented socketpair().
  - Added "kernel" parameter to the control hook. Quite a few more hooks
    would actually need the parameter, but I didn't change those yet,
    since that would probably also require changes to the protocol
    module interface.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24908 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 04:12:23 +00:00
Ingo Weinhold 3cc3dcb385 Preparation for socket file descriptors.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24905 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 03:33:59 +00:00
Ingo Weinhold 89df64c56e Added two helper classes for dealing with restarts of ioctl() like
syscalls.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24903 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 03:29:42 +00:00
Ingo Weinhold bab4c3bbff Changed the type of msghdr::{msg_name,msg_control} to void* as dictated
by POSIX.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24902 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 03:27:53 +00:00
Ingo Weinhold 681fe624a3 Define HAVE_STDINT_H unconditionally. We have it, and some header
modification seemed to have caused the macro not to get defined anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24901 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 03:25:56 +00:00
Ingo Weinhold 7e8cb518e9 Finally decided to put the often copied RETURN_AND_SET_ERRNO() macro
into a header. This version instantiates the given argument only once.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24900 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 03:23:51 +00:00
François Revol 716bba3eae start of a header for a beos compatible tty module.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24899 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 23:29:45 +00:00
Ingo Weinhold f8b4d83f2f New service function vfs_create_special_node() to create special nodes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24883 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 03:07:07 +00:00
Ingo Weinhold ef7cb2253b Rather use a char[] for the path. uint8_t[] is rather uncomfortable to
use with the string and *printf() functions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24882 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 03:06:11 +00:00
Ingo Weinhold 64cd033664 Added socket macros.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24881 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 03:04:03 +00:00
Axel Dörfler 8b79f1fd68 * Added open_module_list_etc() that also allows to specify a required name
suffix. You can use this to verify the version of a module_info structure.
* Made module_info::std_ops optional.
* Minor cleanup in module.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24873 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 14:36:04 +00:00
Axel Dörfler 4f61b1059c Added some macros and an error message if another compiler than GCC is used.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24872 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 14:21:45 +00:00
Axel Dörfler 037f70947f * Cleaned up KernelExport.h completely, removed deprecated and non implemented
API, uses the _PRINTFLIKE macro where appropriate.
* Got rid of the "qent" structure, struct timer now contains everything we
  need. This makes the affected code in sem.cpp, signal.cpp, and timer.c much
  cleaner, and resolves a few TODOs.
* Minor cleanup in vfs.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24871 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 14:21:06 +00:00
Axel Dörfler cfc3fa87da * Cleaned up InterfaceDefs.h, added TODO about getting rid of declaring
_init_interface_kit_() in there.
* Moved private get_mode_parameter() into the BPrivate namespace.
* Renamed interface_misc.h to InterfacePrivate.h.
* Minor other cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 10:07:35 +00:00
Axel Dörfler 3d7e508f7b Added sys/poll.h header by popular request (see ticket #2037).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24864 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-08 09:17:07 +00:00
Michael Lotz d419b482ad Integrate the USBKit into libdevice and make it public. I left the USBKit.h
name, as it in fact is like a kit in the kit. It combines the different BUSB*
classes as compared to SerialPort.h where there really is a 1:1 relationship
between the header and the (one) class. If someone has a better fitting name
please shout.
Separated the usb_raw.h into usb_raw.h which defines the protocol and
usb_raw_private.h which holds the internal device structure for usb_raw. This
reduces the header dependencies.
Hopefully cought all occurencies of USBKit.a usage (in usb_dev_info and
the usb_webcam media add-on) but might have missed something that is not in
the image.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-07 19:24:16 +00:00
Axel Dörfler b9fe86d2d7 * Added pthread_setconcurrency(), and pthread_getconcurrency() functions.
* Since we use a 1:1 mapping, they don't do anything besides remembering the
  level set, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24855 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-07 10:57:01 +00:00
François Revol 038ed3d1f2 Add _SC_PAGE_SIZE sysconf().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24850 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-07 01:08:18 +00:00
Stephan Aßmus 636bff2fd2 Patch by Philippe Saint-Pierre:
* Revised the RLE algorithm used for compressing the boot splash artwork to
  handle uncompressed runs.
* Compress the RGB channels separately for improved efficiency.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24844 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 20:10:50 +00:00
Michael Lotz 5aa70ae110 * Add a AlternateAt() method to the BUSBInterface class that can retrieve the
usb_interface_descriptor of an alternate interface without having to switch
  to it.
* Add some reserve bytes to all classes and add some reserved virtual slots
  where the objects are publically constructable.
* Remove the source compatibilty defines that were briding the old USB* with
  the new BUSB* class names.
* Implement the usb_raw side of getting an alternate interface descriptor.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24842 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 19:59:24 +00:00
Michael Lotz a43222b925 * Implemented setting an alternate interface through the USBKit library based
on a patch by Salvatore Benedetto, adapted to the usb_raw interface by me
* Added two convenience functions IsStalled() and ClearStall() to USBEndpoint

Both changes are actually untested, so if you have a use for them and encounter
problems please shout.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24837 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 16:22:59 +00:00
Stephan Aßmus 6a1d169c52 * Removed trailing spaces in ScrollBar.h
* It's not a good idea to archive fProportion as int32, seeing it's a float
  on [0..1].
* Implemented archive constructor for BScrollBar. Untested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24832 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 15:11:31 +00:00
Michael Lotz fc38019945 Rename vfs_stat_entry_ref() to vfs_stat_node_ref() as that's what a dev_t and
ino_t combination really is.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24825 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 09:18:27 +00:00
Ingo Weinhold 6e36a49e62 * Added _kern_create_pipe() syscall, creating a pipe as an entryless
FIFO. Reimplemented pipe() to use it.
* pipefs is no longer mounted. Will remove the superfluous code soon.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24823 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 02:49:12 +00:00
Ingo Weinhold 7ffafac8d7 * Reorganized the FS interface a little:
- Moved most file_system_module_info hooks into separate structures.
    Those that operate on mounted volumes to fs_volume_ops, those
    operating on a vnode to fs_vnode_ops.
  - Got rid of the fs_volume, fs_cookie, fs_vnode typedefs. We use void*
    again.
  - Instead of a void* volume and node cookie hooks are passed a
    fs_volume and fs_vnode structure pointer, which contain the cookie
    and an ops pointer (fs_volume a few more things).
  - The VFS {new,publish,get,...}_vnode() functions take a fs_volume*
    instead of the volume ID. So does vfs_get_fs_node_from_path().
  - Added type and flags arguments to publish_vnode() and the
    get_vnode() hook and removed the type argument from lookup() hook.
    Added vnode::type using formerly unused bits to store the node type.
    Simplified a few things in the VFS due to the now always available
    node type.
  - Added fs_volume_ops::{create,delete}_sub_vnode() and
    fs_vnode_ops::get_super_vnode() hooks. They are used to support file
    system layers, e.g. allowing to extend an FS not supporting BeOS
    attribute with attribute support. Needs some more work in the VFS.
  - Added fs_vnode_ops::create_special_node() hook for creating special
    nodes (e.g. FIFOs).
* Adjusted the built-in file systems and BFS according to the interface
  changes. Removed all other FSs from the image for the time being.
  We'll see whether further API changes are necessary before porting
  them.
* Adjusted the bfs_shell accordingly.
* Implemented create_special_node() in rootfs to support special nodes.
* Added support for FIFOs:
  - Added syscall _kern_create_fifo() (used by mkfifo()), which creates
    a special node (type S_IFIFO) in the respective file system.
  - When a special node is published the VFS creates a respective sub
    node. Currently only FIFOs are supported.
  - Added a little support for FIFO subnodes by using functionality from
    the pipefs.
  - Added mkfifo to the image. It can create FIFOs in the rootfs, but
    the FIFOs aren't really usable ATM, since they still work like
    pipes, i.e. readers and writers need to have them open at the same
    time.
* Some smaller changes in the VFS:
  - Made the *_CALL macros nicer to use (vargs).
  - Refactored FS entry lookup into new function lookup_dir_entry().
  - create_vnode() no longer just calls the FS create() hook. First it
    looks up the entry and uses open_vnode(), if it already exists. This
    is necessary for two reasons: 1) The FS might not support create()
    while still allowing to open() entries. 2) When the FS has other
    layers on to of it (or the respective node) it might not be
    responsible for opening the node.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24816 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 23:05:16 +00:00
Michael Lotz efb965d559 Introduce vfs_stat_entry_ref() that allows to stat a vnode based on a dev_t
and ino_t instead of a path. Supposed to work with node monitoring messages.
Took the name from vfs_entry_ref_to_path() that takes the same arguments, but
suggestions for a better name are welcome.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24813 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 22:01:05 +00:00
Stephan Aßmus d0fc7c65c6 Patch by Philippe Saint-Pierre:
* Implemented RLE compression for the boot splash images, resulting in
  smaller kernel and boot loader.
* Only the boot loader contains the RLE compressed images, the decompressed
  buffer for the icons is passed to  the kernel via kernel args.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24812 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 21:15:43 +00:00
Michael Pfeiffer e664c41006 Restored the copyright notice before r24684, as pointed out by Marcus Overhagen on the Haiku-commits mailing list, r24684 is a copyright violation.
Also reverted some meaningful comments.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24807 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 11:55:14 +00:00
Stephan Aßmus 75ab36bd50 Refined again the boot splash artwork. Everything is now centered as a whole.
The dividing line is back although with a little more spacing. Also the icon
spacing is a little increased and I added a subtle outline as well as a little
brighter background for the active icon look. The placement logic is now not
independant of each other anymore, otherwise I couldn't center both images
as a unit. But only the vertical placement is affected.
Comments as always on the commit mailing list... :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24796 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 19:13:00 +00:00
Michael Lotz 06da81f012 Implement node monitoring in the kernel disk device manager.
* Added {Create|Delete}Device() analogous to {Create|Delete}FileDevice
* Added a small DeviceWatcher class that reacts to entry creation/removal
* Implemented a way to start/stop node monitoring
* Start watching for devices after the boot volume has been mounted and the
  the second initial scan was run

The disk device manager now creates and scans a device when a "raw" node is
published and deletes the device on removal. This makes hot-plugging of disk
devices (for example memory sticks using usb_disk) work. Their partitions will
be scanned and published so they can be mounted. Somehow the removal of the
partitions does not yet work however, any insights are welcome.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24777 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 18:14:11 +00:00
Stephan Aßmus 64379118a9 * Revised boot splash artwork, the logo is back in the lower right corner,
the icons are centered.
* The boot loader and kernel now use the placement info that
  generate_boot_screen now generates.
* Made the code that draws the images handle the case where any of the images
  is larger than the frame buffer.
* All drawing functions need to know the image width (analogous for bytes per
  row).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24773 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 14:24:10 +00:00
Axel Dörfler e63c117011 Looks like some bloke forgot to commit *some* files that should have been part
of r24768 (block cache notification mechanism rewrite).
Thanks for the note, Vasilis!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24772 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 14:14:27 +00:00
Stephan Aßmus 42014658ad Applied patch by James Woodcock:
* Implemented POSIX getpagesize() function in libroot.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24763 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 08:50:56 +00:00
Jérôme Duval f6604eaad7 updated libpng to 1.2.26
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24758 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-02 20:58:54 +00:00
Ingo Weinhold f8cb30712e * Replaced the dummy implementations of the <grp.h> and <pwd.h>
functions by ones reading /etc/{group,passwd}.
* Added quasi-standard getpwent_r() and getgrent_r().
* Added _SC_GETGR_R_SIZE_MAX and _SC_GETPW_R_SIZE_MAX sysconf()
  constants.
* Moved initgroups() and getgrouplist() definition to grp.cpp. They use
  the same backend as the <grp.h> functions.
* Set the permissions of files created by the build system to what they
  should be on the image (executables: 755, others: 644). Otherwise only
  root could do anything under Haiku.
* Added build system variables HAIKU_ROOT_USER_NAME and
  HAIKU_ROOT_USER_REAL_NAME to customize name and real name of Haiku's
  root user.
* Added build system rules AddUserToHaikuImage and AddGroupToHaikuImage
  for adding additional users and groups (by default only root user and
  group and a "users" group are created).
* Adjusted BIND port and coreutils config.h files according to what
  features have become available.
* Fixed HAIKU_DOCUMENTATION_OBJECT_DIR definition. Untested, but it used
  a wrong variable name before.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24750 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-02 14:02:52 +00:00
Ingo Weinhold f9ed63eb2d Copied the benaphore implementation from the kernel for use in libroot.
Would be nice to actually share those.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24748 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-02 13:39:43 +00:00
Axel Dörfler 6b53669383 * Renamed vm_get_available_memory() to vm_available_memory() to fit better
into our usual naming scheme.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24745 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-02 12:30:06 +00:00
Axel Dörfler 16d8ff2dad * Added a TRANSACTION_IDLE notification that is sent when the transaction
hasn't been used for more than 2 seconds.
* Replaced the block_cache::lock benaphore with a recursive lock, so that
  you can call cache functions from within the notification listeners.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24737 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-02 09:37:22 +00:00
Axel Dörfler 10f0fc8f20 * Implemented sigwait().
* Not sure if it works as intended, as the specs are a bit vague.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24717 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-01 12:15:14 +00:00
Axel Dörfler c80e610789 * Added start of an implementation of pthread_cancel().
* Implemented pthread_setcanceltype(), pthread_setcancelstate(), and
  pthread_testcancel().
* In the previous commit, I also made pthread_private.h self-contained.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24710 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-31 18:49:19 +00:00
Maurice Kalinowski f4a2c0f945 put enum to appropiate place as pointed out by marcus
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24707 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-31 18:14:43 +00:00
Axel Dörfler a635399b07 * Rearranged pthread thread support a bit: there is now a pthread_thread
structure that is attached (via TLS) to each pthread.
* Implemented support for pthread_cleanup_{push|pop}().
* I haven't really been able to test these changes, yet, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24704 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-31 15:10:00 +00:00
Oliver Ruiz Dorantes 7976c871ff Add headers for the authentication and scan mode commands
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24698 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 21:43:59 +00:00
Oliver Ruiz Dorantes b426fc0487 - Modify API be more be like
- Polish a bit the classes composing the Discovery process




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24697 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 21:42:22 +00:00
Karsten Heimrich 1f604fd046 * should have been part of my last commit
* also renamed fCurrentHeader to fSpoolFileHeader


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24694 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 20:24:58 +00:00
Karsten Heimrich e0a750ce0b * rewrote header file
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24684 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 17:42:13 +00:00
Ingo Weinhold 1bc2fbc25d Added BSDish timer*() macros.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24683 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 17:28:31 +00:00
Jérôme Duval 7e11596a27 added athlon 64 model 3
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24677 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 12:27:41 +00:00
Axel Dörfler e549b218af This should have been part of r24675. Not sure what happened as I specified
the path on the commit line.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24676 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 11:42:32 +00:00
Axel Dörfler 6328832fba * Changed get_boot_item() API: it now also can retrieve the size of the boot
item entry.
* The bios_ia32 video platform code now stores the available VESA modes in
  the new vesa_modes kernel_args field.
* When configuring a VESA mode via settings file, it's no longer needed to
  specify the exact mode - the closest available mode is now used. This should
  help with bug #1962.
* frame_buffer_console_init() now also creates a boot_item for the VESA modes
  in the kernel_args.
* The VESA accelerant now filters the mode list to only contain modes that
  are actually supported.
* Moved non-shared vesa driver data into its own file vesa_private.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24675 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 11:01:41 +00:00
Ingo Weinhold 360be1fc45 * Implemented support for chroot:
- Added a "root" vnode to the io_context. It is used for resolving
    paths and converting nodes to paths instead of sRoot. Some more
    passing around of io_context structures was necessary.
  - Introduced a new lock sIOContextRootLock to protect
    io_context::root. The current uses of io_context::io_mutex
    (put_vnode(), remove_vnode() while holding it) looked too suspicious
    to use that mutex in vnode_path_to_vnode().
  - Added _kern_change_root() syscall and chroot() libroot function.
  - Added chroot coreutils program to the image. Funnily it seems to be
    much easier to set up a little jail than under Linux (just copy
    bash and libroot.so into respective subdirs; mount another pipefs
    if you want pipe support).
    With Haiku allowing direct access to directories via inode IDs
    jailing is obviously not very secure at the moment.
  - Added /var/empty to the image. It will be the chroot target for ssh.
* Changed vfs.cpp:get_cwd() so that the io_context::io_mutex is no
  longer held when calling dir_vnode_to_path().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24673 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 05:59:54 +00:00
Maurice Kalinowski 6938364b39 * Implemented BMediaRoster hooks GetRefFor, SetRefFor, SniffRefFor to access BFileInterface related file functions.
* Implemented BFileInterface class which was nearly empty so far. Added handling of messages passed to BFileInterface class.
* Added needed structs and message values to DataExchange.
* This is needed to get for instance the reader.media_addon to work. Usually one calls above functions to set a file to be decoded by the node. If the target is a consumer, they are used for setting the target for encoding data.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24671 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 01:35:58 +00:00
Ingo Weinhold 290946ce80 * Implemented some basics for supplementary groups support:
- The kernel stores the group IDs in the team structure. They are
    correctly inherited on fork() and load_image_etc().
  - Implemented getgroups() for real, i.e. it retrieves the groups
    associated with the process.
  - Implemented setgroups(), initgroups() and (the BSDish)
    getgrouplist(). The latter two read the group information from the
    "group database" /etc/group (if existing).
  - Change the BIND port config, since we do have getgrouplist() now.
* The set-uid feature was broken when the path to the executable was
  relative, since we used stat(), which, in the kernel, uses the kernel
  IO context.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24669 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 00:08:13 +00:00
Ingo Weinhold f244a07d99 Corrected value for _POSIX_NGROUPS_MAX.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24668 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-29 23:58:27 +00:00
Ingo Weinhold 8c117a6d88 Added function vfs_read_stat() that also allows for stat()ing files in
the user IO context from within the kernel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24667 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-29 23:57:34 +00:00
Ingo Weinhold 3bef7d0252 Added functions malloc_referenced[_{acquire,release}]() that implement
reference counted memory allocations. Can be used for sharing immutable
structures.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24666 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-29 23:55:34 +00:00
Maurice Kalinowski 999cd0acee * implemented BMediaRoster::StartControlPanel(). It queries a BControllable node with CONTROLLABE_START_CONTROL_PANEL message and returns the result to the caller (thx for help/suggestions from Marcus here). Needed to add appropiate structs and message value to DataExchange.h
* implemented BControllable::StartControlPanel(). The behaviour is supposed to be the one documented in the BeBook, meaning that it first checks if the BControllable node has been instantiated over an BMediaAddOn. If so, we investigate where the addon is located and try to launch it. Thus media_addons which have a control panel need to be compiled as an Application, not as an Addon. See r24664 as an example.
* inside BControllable::HandleMessage() call StartControlPanel for the message.
* MediaNodes having such a ControlPanel are rarely used as parameterwebs should provide you everything. But for instance the vst MediaAddOn uses it and some others do as well.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24665 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-29 20:53:01 +00:00
Ingo Weinhold 22611e781a Patch by Curtis Wanner:
* Added some limit macros.
* Removed the "L" suffix from [U]INT32_MAX.
* Reordered some definitions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24654 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-29 14:16:07 +00:00
Ingo Weinhold 29674ea8cb Patch by Vasilis Kaoutsis:
* Check against maximum baud rate in cfset{i,o}speed().
* Changed some functions comments to doxygen style.
* Sorted speed macros in termios.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24647 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-29 12:52:10 +00:00
Ingo Weinhold 79e1d3770c Not that I know what I'm doing...
Moved nameser_compat.h to our public headers (arpa/inet) and include in
<arpa/nameser.h>. That's solved similarly in BONE. At any rate OpenSSH
is now happy that HEADER exists.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24644 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-29 12:37:05 +00:00
Ingo Weinhold 479a926477 Define PF_LOCAL and PF_UNIX for compatibility reasons. Makes OpenSSH
happier.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24642 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-29 12:21:45 +00:00
Ingo Weinhold 0fddf2f088 Define howmany(). It seems to be what the BSDs are using. Linux
defines it, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24641 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-29 12:20:40 +00:00
Ingo Weinhold 5d2044f643 POSIX headers should not include BeOS/Haiku headers. Should help with
flex's pthread test.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24625 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-28 14:25:06 +00:00
Ingo Weinhold b564056dda GCC provides <stdbool.h>.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24617 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-28 07:42:07 +00:00
Ingo Weinhold 071f9c3aa2 Build configurations shouldn't be done in svn controlled files, so I
finally created a solution to avoid that: Header files that contain
configuration settings (and nothing else) go to build/config_headers.
To change settings, create a directory build/user_config_headers (which
is ignored by svn), copy the respective header there and modify it at
your leisure. Currently only tracing_config.h has been moved to the new
location, but more files will follow eventually. It is also recommended
to move optional macro definitions in Jamfile (as for BFS) to a config
header instead; the build system will then automatically rebuild on
changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24611 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-27 22:01:38 +00:00
Ingo Weinhold 781a715529 Move RegistrarThread[Manager].cpp to the registrar. There was no point
in those living in libbe.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24603 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-27 02:51:58 +00:00
Axel Dörfler 758962ec3b * Added arch_debug_contains_call() function that returns wether or not
a call chain contains a specific symbol (or address).
* Added a new KDL command "calling" that you can use to get a list of
  threads that have a specific function in their call chain.
* Removed extraneous white space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24594 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-26 17:08:51 +00:00
Ingo Weinhold da17e06b92 Small helper class for filtering file/path names.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24583 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-26 04:03:44 +00:00
Axel Dörfler 41f8d41647 Applied patch by Rene Gollent:
* Add a cached_pages field to the system_info structure, and change the
  meaning of the used_pages field to not include cached pages.
* Provide the needed info using the new calls vm_get_available_memory(),
  and vm_page_num_available_pages().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24571 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-25 11:51:45 +00:00
Ingo Weinhold c7c82420e1 _single_threaded should have C linkage. Was for some reason only a
problem with gcc 4.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24565 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-25 01:56:46 +00:00
Stephan Aßmus 9def3bf783 * Rewrote MediaRoster.h
* Removed appearantly unused satic variables. Hope this does not break
  binary compatibility, going to test.
* There are three more private methods, which could probably be removed
  as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 15:42:58 +00:00
Axel Dörfler a121b8c83c * Added a new flag for write stat: B_STAT_SIZE_INSECURE that allows a
file system to not fill newly created space with zeros. 
  BFile::SetSize() now uses this, while [f]truncate() does not. This
  is only a temporary work-around until BFS supports sparse files.
* Apps that want to reserve space to fill up later should use 
  BFile::SetSize() for now, as this will be a lot faster than 
  [f]truncate().
* cache_io() and the functions below now use a special mode when you 
  pass in a NULL buffer: for read access, the cache is only populated
  (useful for prefetching), for write access, the file is filled with
  zeros.
* Implemented BFS's Inode::FillGapWithZeros() using this method now.
* Removed extraneous white space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24555 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 13:39:02 +00:00
Axel Dörfler 5e2ef462ec * Got rid of the duality of FS_WRITE_STAT_* vs. B_STAT_* flags (removed
the former ones).
* Removed extraneous white space.
* net_server settings are now also updated when the size of the 
  file changed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24552 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 12:04:47 +00:00
Ingo Weinhold 5fd6637b4d * Decide whether to use BeOS style symbol resolution at run time
depending on the gcc version of the executable.
* Adjusted non-BeOS-style symbol resolution so that add-ons and
  dynamically loaded libraries find symbols in the executable.

This change re-enables support for undefined symbols.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24537 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-23 19:43:41 +00:00
Michael Pfeiffer 80339607f9 Get first and last page from job settings instead of print_file_header. In print_filer_header first_page is an offset into the spool file (the field is unused or reserved on BeOS R5 and is always -1) and page_count is the number of pages in the spool file. In the job settings first/last page is the page number of the first/last page as specified in the page setup dialog.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24536 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-23 18:01:13 +00:00
Michael Pfeiffer 242605b930 Set page_offset to -1 like BeOS R5 did.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24535 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-23 17:46:00 +00:00
Ingo Weinhold 3498280968 The runtime loader now reads a part of the .comment section of each
shared object to find out the GCC version it has been compiled with.
This is not an exact science, since we've got the version string for
every single object file that has been linked in, but my heuristic seems
to be good enough.

Having the gcc version at hand will allow for two features: Enabling
work-arounds for old executables (like the type info problem in BeOS
apps), and automatically selecting the right set of libraries in a mixed
gcc 2/gcc 4 environment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24534 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-23 17:01:42 +00:00
Karsten Heimrich e1656f01ae * build fix, removed leftover debug var...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24533 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-23 16:17:52 +00:00
Karsten Heimrich 96d23158ea * some small cleanup
* fFirstPage should be of type off_t



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-23 16:01:03 +00:00
Ingo Weinhold e26a4ce3e9 Define __THROW.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24531 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-23 01:21:53 +00:00
Ingo Weinhold 2754fa8772 bcopy() is supposed to be overlap-save.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24525 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-22 18:13:42 +00:00
Ingo Weinhold 8195a5a835 Prevent redefinition of _IO_MTSAFE_IO. It is defined when building the
legacy gcc's libio.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24524 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-22 15:26:55 +00:00
Bruno G. Albuquerque 7a66a9b8e4 - Added support in system info for extended cpu family and model.
- Take extended family and model into account when generating the cpu
  type and revision.
- Added Intel Core 2 Extreme to the cpu list.

Please review.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24509 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-21 16:44:05 +00:00
Stephan Aßmus d830aa92ce * Added FindKeyFrame() method to MediaExtractor, it is similar to Seek(),
but operates "read-only".
* Added FindKeyFrame() method to ReaderPlugin, see above.
* Reformated ReaderPlugin header. Added const qualifier to Source() method.
* Small cleanups in BMediaTrack::SeekToTime() and SeekToFrame(). Added TODOs
  with regards to "seeking" in decoders, wich should IMHO be revised. (Codecs
  cannot seek in the stream, they only get fed chunk data. The only thing they
  can do is reset themselves in preparation for a discontinuity of the chunk
  data...)
* Implemented BMediaTrack::FindKeyframeByXX() methods via the new
  MediaExtractor::FindKeyFrame() method.
* Implemented Seek() and FindKeyFrame() methods in the Reader base class,
  returning B_NOT_SUPPORTED. I think this makes sense and also I don't have
  to adapt all existing Reader plugins for the new FindKeyFrame() call. :-)
* Implemeneted FindKeyFrame() in the avi_reader. The OpenDMLFile class
  gets Seek() extended for a "read-only" mode. Currently the implementation
  is broken (as before) with regards to keyframes. These were ignored before
  and I have not changed them to actually support the seek flags with regards
  to keyframes. That's the interesting TODO...
* Some reformatting here and there in avi_reader code, sorry for the mixup.
  The only actual change is the support for the read-only flag to Seek().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24495 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-20 23:36:14 +00:00
Axel Dörfler a886f802fc * Added debug_screen_output_enabled() function.
* The boot splash code now checks wether debug screen output is enabled or not
  using the above function.
* The boot splash code no longer maps it's own copy of the frame buffer, instead,
  it will use the boot item feature as the VESA driver does. Also removed the
  lock, as that's not needed at all.
* Renamed splash.cpp to boot_splash.cpp, and boot/splash.h to boot_splash.h
  (it's not part of the boot loader, but the kernel).
* Removed dead code from boot_splash.cpp, added license. Replaced license
  header in boot_splash.h to a style guide conforming one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24489 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-20 11:10:17 +00:00
Ingo Weinhold 8560d1885b * The runtime_loader's test_executable() no longer analyzes the
executable permissions of the file by hand. We use _kern_access()
  instead, which also handles the root case correctly.
* The user and group arguments of test_executable() aren't needed any
  longer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24483 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-20 01:45:00 +00:00
Stephan Aßmus 4a46d818c9 * Implemented ERROR as fprintf(stderr, ...) with tracing turned off as well.
* Fixed all but one compiler warnings in libmedia.so.
* Truncated lines to 80 char width where I looked at code.
* Turned printf()s into TRACE/ERROR calls in MediaExtractor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24478 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-19 19:39:07 +00:00
Stephan Aßmus c844c20840 * Use tracing facilities in BMediaTrack.
* Turn off tracing in the Media Kit.
* Notify of unimplemented functions regardless of tracing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24473 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-19 17:12:05 +00:00
Jérôme Duval 5c102180bd updated fluidsynth to 1.0.8
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24454 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-18 22:17:50 +00:00
Stephan Aßmus 55ef60a5ae * Removed the Copyright image/rendering.
* Fixed the icons image, it was upside down.
* Support the new 24 bit boot screen images in the boot_loader and the kernel.
* Prepare the code for future indexed versions of the boot screen images.
  But the generate_boot_screen tool currently does not generate those.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24449 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-18 20:27:47 +00:00
Ingo Weinhold 62319d069e Commented out real-time signal related stuff (SA_SIGINFO, waitid()) to
prevent "configure" scripts from thinking we do actually support it.
Having real-time signals would be nice though (cf. #1935).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24444 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-18 17:33:03 +00:00
Stephan Aßmus 7d85665d0f * Give boot stages a more meaningful name, make the max stage count known.
* Calculate icon offset from stage in splash.cpp, remove hard coded placement
  values. Draw only icon, not the whole image from top/left to right of
  icon.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24439 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-18 13:14:18 +00:00
Stephan Aßmus aa727f6643 patch by Artur Wyszynski (aljen):
* Added the feature of an animated boot screen (icons lighting up at
  different boot stages).
* Added first version of new boot splash images, generated by the new
  hsbg tool. (Also finally contains the "new" Haiku logo.)

changes by myself:
* Added Artur to the contributors list in About System.
* Fixed some left overs in the patch, kept tracing turned off.

TODO:
* Remove the need for hard coding the icon positions. (Maybe generate
  those from hsbg and put them into images.h? Have user provide icon
  spacing/offsets at the command line for hsbg?)
* Rename the stages to something meaningful.
* Use hsbg as a build system tool and generate images.h during build
  from PNGs provided in the artwork folder.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24434 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-18 10:25:53 +00:00
Ingo Weinhold 404a0fea46 Second stab at reorganizing standard/gcc headers. This time it not only
builds on Linux with gcc 2 and 4, but the images do even run. :-) Not
tested on BeOS.

* Removed stddef.h and stdarg.h. They are provided by the compiler.
* Adjusted size_t.h, wchar_t.h, and wchar.h accordingly.
* Made stdio.h avoid gcc 2.95.3's fixincludes hack stdio_va_list
* Added gcc 2.95.3 headers to the repository. They are used instead of
  the headers of the gcc 2.95.3's we use to compile Haiku with. Should
  avoid build problems with the BeOS native compiler.

For sake of personal recreation you can rebuild the cross gcc 2.95.3,
but the only thing that changed is its header directory
(lib/gcc-lib/.../include), which isn't used anymore. Replacing it with
headers/build/gcc-2.95.3 should have the same effect as rebuilding, BTW.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24413 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-16 17:21:37 +00:00
Ingo Weinhold 0cfb40d0dc Define HUGE_VAL in <math.h> conditionally. That's what gcc's fixincludes
hack math_huge_val_ifndef does, anyway. We do it ourselves and remove
the therefore superfluous gcc math.h header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24412 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-16 16:39:06 +00:00
Ingo Weinhold d8ce64a27f Reverted r24406. If it builds, it doesn't always work as well. The
change resulted in "version mismatch between boot loader and kernel". So
apparently the size of some type changed unintentionally.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24408 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-15 19:23:05 +00:00
Ingo Weinhold 6191d9a8da * Removed our stddef.h. We don't need it, since gcc comes with one that
under Haiku overrides ours anyway.
* Adjusted size_t.h, wchar_t.h, wchar.h accordingly. This should fix the
  annoying "ssize_t redefined" warnings when compiling under Haiku.
* When building Haiku the gcc headers come first in the include
  search path now, as it should be. The respective TODO suggested that
  this might break the build depending on compiler version and host
  platform. I've tested with Linux gcc 2 and gcc 4, which work fine.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24406 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-15 18:41:46 +00:00
Axel Dörfler b921611458 Applied patch by Vasilis - thanks!
* fixed compilation warnings in Node.h and NodeRef.h.
* Added license header to NodeRef.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24394 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-15 10:45:53 +00:00
Ingo Weinhold 6044b22ddb Added new macro SYSCALL_TRACING_IGNORE_KTRACE_OUTPUT to disable tracing
for the _kern_ktrace_output() syscall.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24392 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-14 21:58:17 +00:00
Axel Dörfler 58c42ec9de No need for the kWorkspacesWindow flag anymore.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24388 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-14 11:19:57 +00:00
Oliver Ruiz Dorantes 23234fa59d Supply a supoprt file for functions used among all the kit
Move implementation from LocalDevice for retrieving the BluetoothServer Messenger



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24385 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-13 20:13:39 +00:00
Oliver Ruiz Dorantes 057d0dc02a Correct misspell adquire->acquire
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24384 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-13 19:30:04 +00:00
Oliver Ruiz Dorantes 32c01b554a Move the command builder module to the kit although meant to be kept private
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24379 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-12 21:44:25 +00:00
Oliver Ruiz Dorantes b8c8202d4d * Add one more inquiry process hook function for notify when it has started
* Move Messages id to a private header
* New constructor for RemoteDevice



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24376 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-12 21:18:23 +00:00
Ingo Weinhold 4eb3560949 * Added real, effective and saved set- user and group IDs to the team
structure. They are properly inherited and updated on
  fork(), load_image(), and exec().
* Implemented the get[e]{u,g}id(), set[[r]e]{u,g}id() family for real.
* getgroups() also calls the kernel now, but only returns the effective
  group ID. Supplementary groups support is still missing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24359 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-11 17:12:02 +00:00
Ingo Weinhold 4b7baaba0f Added optional kernel tracing for the userland memory allocator.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24356 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-11 01:35:30 +00:00
Axel Dörfler 4b83262008 * _Realloc() did not initialize the reference count either.
* _Alloc() can now preserve the original reference count, only _Clone()
  still initializes it to 1. As Karsten pointed out, this is necessary to
  preserve the "shareable" status of the private data.
* I hope that's finally it. What happened to our testing suite, anyway? :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24355 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-10 22:56:27 +00:00
Ingo Weinhold 5bced18eab ALM/linprog patch by Christof Lutteroth:
* Got rid of class ObjFunctionSummand. Both the constraint summands and
  the objective function summands are now stored using class Summand.
* Some method names are more BeOS compliant now: SetX instead of ChangeX.
* linprog test code now uses new AddConstraint methods.
* CalculateMinSize and CalculateMaxSize did not free the memory they
  allocated.
* Removed inappropriate setter and getter methods.
* Memory allocated in class Constraint is freed now.
* Other small changes.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24351 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-10 21:43:32 +00:00
Axel Dörfler bf4ddb61e1 * As found by Karsten, the reference count was not initialized in
_ReplaceAtPositions(), and _DoCharacterEscape() (we don't need to preserve
  it, though, as it must be 1).
* Factored out an _Alloc() method which is now always called when the private
  data is allocated. It also takes care of correct initialization (and thus
  fixes the above problem).
* This fix finally allows turning on reference counting again, thanks Karsten!
* Minor cleanup, renamed "oldAdr"/"newAdr" to "oldString", resp. "newString".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24348 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-10 19:14:05 +00:00
Axel Dörfler 688c14266c * After my last change, _IsShareable() was called on the wrong string in the
copy constructors, effectively turning of references completely.
* Since that caused troubles (NetPositive now crashes when started), I
  temporarily disabled references by letting _IsShareable() always return
  false until the issue is resolved.
* _FreePrivateData() now sets the fPrivateData member to NULL, and is also
  safe to be called when fPrivateData is NULL.
* Removed my comment about the threading problem in _Detach() and _DetachWith()
  as that just couldn't happen.
* _Clone() must not use memcpy() as the string pointed to by "data" might not
  be as long as "length".
* LockBuffer() now marks a string as unshareable.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24345 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-10 14:14:44 +00:00
Ingo Weinhold 4a7f236b07 Process groups are now reference-counted. Processes in a group as well
as the death entries of a deceased processes that were in this group
and have not yet been reaped hold references to the group, so that it
won't be deleted until the group is empty and all gone group members
have been reaped. This fixes #1799 at last.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24335 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-09 17:56:27 +00:00
Ingo Weinhold c1de3c34b3 Added deferred_free() function, that can be used to free allocations
in code that has interrupts disabled. The chunks of memories are queued
and free()d periodically by a kernel daemon.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24332 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-09 17:44:55 +00:00
Axel Dörfler fa28330bbf * Explained under which circumstances vnode_path_to_vnode() will clobber the
buffer of the provided "path" argument.
* Applied patch by Vasilis to fix some warnings when build on Linux (missing
  const on certain functions). We should probably fix the original
  {add|remove}_debugger_command() functions in Haiku as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24322 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-09 13:43:38 +00:00
Michael Lotz a433b9febf Rewrite and activate message passing by area. Passing by area works now with
the new sematic of transfer_area so a message area is transfered into the right
teams' address space and it does not need to be cloned there anymore. Passing
by area is only used for messages bigger than a certain size (currently
hardcoded to 40KB) which should be somehow bound to the max port message size.
This makes passing large messages (i.e. > the port limit) possible, so for
example copy&paste of long text, image data, etc. should now work.
Got rid of the fClonedArea member as it is not necessary with the new design,
renamed shared_area to message_area in the private message_header, avoid
an unnecessary allocation of the header for the copy constructors, check
allocations in a few more places and some minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24321 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-09 13:35:41 +00:00
Michael Lotz d1189f0b05 Naive implementation of transfer_area(). It follows the suggested sematics
of the resolved ToDo, but could probably be made more efficient. Instead of
transfering the area, the area is cloned into the target teams' address space
and the original is deleted. This generates a new area_id for the transfered
area (as suggested by the ToDo). Updated syscall prototypes according to the
status_t to area_id return type change.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24320 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-09 12:56:59 +00:00
Axel Dörfler 637eef896b * Added a get_safemode_boolean() function for easy access to the safemode
options.
* module_init() now sets sDisableUserAddOns to whatever the safemode settings
  say, ie. the B_SAFEMODE_DISABLE_USER_ADD_ONS setting is now respected by
  the module code.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24315 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-08 23:12:46 +00:00
Axel Dörfler 002b33b720 * Fixed a bunch or concurreny bugs and memory leaks of the new reference
string stuff.
* It's still not thread-safe for all usage patterns, though, so we might want
  to remove or disable it: if a string is shared between several threads, and
  one of those starts to use a reference, all kinds of problems can happen.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24312 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-08 19:05:09 +00:00
Axel Dörfler c7a77521ff Renamed all *LAYER* constants to *VIEW*.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24306 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-08 16:44:18 +00:00
Rene Gollent 326182c3e3 Made DirectMessageTarget's destructor private to avoid potential future
errors. This object should never be deleted directly as it's ref counted, 
only when its last ref is Release()'d.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24258 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-06 00:36:31 +00:00
Rene Gollent 2365e7b574 BSlider had code for doing double buffered drawing, but was
disabled by default. Appears to work correctly though, so
enabling it since it produces far less flicker here.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24255 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-06 00:03:02 +00:00
Oliver Ruiz Dorantes 660030cbe7 ADD kit<->server Messages ids
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24253 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-05 23:32:16 +00:00
Oliver Ruiz Dorantes fc892ed429 Remove prefixes and adapt the JSR82 api a bit more to the Be style
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24251 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-05 23:29:04 +00:00
Rene Gollent 676308a602 App Server now saves/restores ui_color settings.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24225 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-04 01:19:04 +00:00
Stefano Ceccherini dc93a6b1ee Applied patch by Denis Washington which implements "diagonal mouse
support" for menus (see ticket #284). Thanks a lot!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-01 22:15:23 +00:00
Rene Gollent f6d52cb737 - Added operator = implementation to rgb_color for convenience.
- Major cleanup of Appearance prefs - colors are now dynamically
  read from the app_server, and updating them also works, but
  triggers a bug: the state of the current window somehow gets
  confused, i.e. if I update the panel background color, for some
  reason the color of the BButtons in the appearance pref change color
  and also the textviews begin misbehaving. Have not yet tracked down
  the cause of this, but newly created windows after making the change
  do show up with the updated color and behave properly. Also vastly
  simplified the pref and cleaned up some obsolete definitions.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24185 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-01 00:57:18 +00:00
Axel Dörfler d8a88cb313 Updated our build SupportDefs.h to the same version as the current standard
version. This gets rid of the _IMPEXP* definitions so it should not cause
any trouble.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24184 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-29 23:43:18 +00:00
Axel Dörfler dd8a8496f0 Hopefully final build fix for Dano; at least I build everything with "-a" this
time and it worked :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24179 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-29 15:02:12 +00:00
Michael Lotz 87df690150 * Replaced the UTF8ToCharCode function with one that handles invalid chars
correctly (or at all...)
* Use the common 0xfffd character as a substitute for invalid characters
* Corrected comment

This function is used by the app_server to convert the UTF8 strings to char
codes to feed FreeType. Using a non space substitute character at least for
now, as it makes it more obvious where invalid characters are present.
I tested this change with some UTF8 test files and it seems to work well.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24175 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-28 23:04:47 +00:00
Axel Dörfler d273d00822 * Fixed previous version of UTF8CountBytes() and put it in again: it was
breaking out of the loop too early, and would therefore miss the last
  character.
* Replaced UTF8CountChars() with a short and safe version as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24173 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-28 19:17:33 +00:00
Stephan Aßmus ccf6ad1d8b Reverted to the previous version. Axel, your change completely broke all kinds
of stuff. I think the trouble is that you keep decrementing charCount while
still inside the same UTF8 glyph. I cannot really tell, I am hoping you don't
mind me reverting to the old version, since the new one is only three lines,
so it should be easy to correct and re-commit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24172 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-28 15:56:31 +00:00
Axel Dörfler b5a5aebc90 * Added a set_to_defaults() function to the address module: it can be used
to retrieve the default settings for the netmask/broadcast depending on the
  specified address/netmask.
* interface_protocol_control() now uses this to reset the broadcast/netmask
  to their default values on SIOCSIFADDR resp. the former only on
  SIOCSIFNETMASK.
* This fixes bug #1861.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24170 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-28 15:43:27 +00:00
Axel Dörfler 487b83f327 This should fix the remaining build problems under Dano and Zeta.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24169 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-28 14:49:51 +00:00
Axel Dörfler 326dce3ae0 * Simplified UTF8CountBytes() a bit, made it faster, and less error-prone
against malformed UTF-8.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24166 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-28 10:45:57 +00:00
Rene Gollent 07d1827688 Implement BOutlineListView's derivative of SwapItems(). This makes things like Vision's network reordering shortcuts
work correctly.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24158 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-27 22:54:37 +00:00
Axel Dörfler a77ed12b25 * Removed obsolete "ident" parameter from devfs_publish_device().
* driver_entry::api_version now stores the actual version instead of a
  pointer to it.
* Renamed node_path_entry to path_entry and reused it for driver 
  reloading: handle_driver_events() will now also check for drivers to
  add in the sDriversToAdd list.
* Added new devfs_driver_added(), and devfs_driver_removed() functions
  that trigger certain driver actions.
* Implemented notifying devfs on B_ENTRY_CREATED, B_ENTRY_REMOVED, and
  B_ENTRY_MOVED events in probe.cpp. The watched directory inode numbers
  are now stored in a hash for B_ENTRY_MOVED.
* unpublish_driver() did not actually delete the node, it only marked
  it removable since we never get/put the node. We now do, and so the
  node is actually removed as intended.
* Added "devfs_driver" KDL command.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24152 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-27 16:55:59 +00:00
Axel Dörfler 4f26630d82 * Factored a vfs_entry_ref_to_path() out of _user_entry_ref_to_path()
and made it public (within the kernel).
* _user_entry_ref_to_path() is now using that function.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24151 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-27 16:39:32 +00:00
Axel Dörfler 9c800a96c0 This should fix the build under Dano/Zeta again, at least it works here:
* added HaikuBuildCompatibility.h to the src/build/* files that are built as
  part of the tools we need to build Haiku.
* Changed HaikuBuildCompatibility.h so that it does not define the things
  that are already in the build headers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24147 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-27 09:03:46 +00:00
Rene Gollent 43948ef628 - Fix an error in SwapItems where the item tops would not be swapped
if the items were the same height.
- Modified _RecalcItemTops to allow us to specify a range instead of 
just a starting point. This is useful for cases like Swap, where 
only the items in between those being swapped need to be 
recalculated.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24139 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-26 13:27:24 +00:00
Jérôme Duval 30cce27770 Patch from kaliber: use path of executable instead of the command. Thanks!
this fixes bug #1773 and #1824. I tested only #1773.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24131 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-26 00:03:51 +00:00
Stephan Aßmus 46ea5b1e49 Further improvements to auto scrolling and text rect + container view resizing:
* Renaming things in Tracker list mode no longer magically grows the text view.
* ScrollToOffset() is not supposed to depend on the existence of any scroll
  bars, in R5 text views simply scroll to where they need to. This fixes
  renaming things in Tracker when hitting the window bounds (text widget stops
  growing and starts to autoscroll) and also the Text tool in WonderBrush.
* _ScrollToOffset() is therefor no longer needed.
* The insets of the text rect are not so interesting as the original width.
  In auto resizing mode, the original width is important when there is no
  container view. In this setup, the text rect auto resizing is mainly needed
  for auto scrolling, but it should never shrink below the original size.
* Further improved auto scrolling for right aligned and center aligned text
  views, it works like R5 now. Also take the line height into account when
  checking for the bounds bottom. Removed extra spacing for vertical
  scrolling.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24130 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-25 23:34:23 +00:00
Oliver Ruiz Dorantes 42d737bb2e Implementation for pretty_showing bluetooth physical addresses
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24123 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-25 20:14:15 +00:00
Axel Dörfler 49499c1707 Forgot to commit these; this fixes building the fs_shell, thanks Jerome!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24115 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-25 14:08:59 +00:00
Axel Dörfler 351b7a2d24 * Added B_WATCH_INTERIM_STAT, and B_STAT_INTERIM_UPDATE definitions to
NodeMonitor.h.
* The latter will be set in "statFields" for interim updates when you have
  asked to get them via the former.
* BFS now uses the B_STAT_INTERIM_UPDATE flag for sending updates to actively
  written files.
* This makes us more compatible with BeOS again; if you only asked for
  B_WATCH_STAT, you will now only receive a notification if the file in
  question has been closed.
* Tracker now uses B_WATCH_INTERIM_STAT to always get all updates (ie.
  downloading a file will update its size and modification time in Tracker
  periodically during the download).
* Wether "needsTrimming" was true or not has no influence on wether or not
  the size index needs to be updated in BFS - only the actual file size is
  stored there, not the on-disk size.
* Added a TODO comment in Inode::WriteAt() that it would actually need to
  update the size index when changing the file size, not when the file has
  been closed (but that's probably too slow).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24114 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-25 13:54:30 +00:00
Ingo Weinhold 0306945545 Patch by Christof Lutteroth:
* copyright headers for the files of the libraries linprog and alm
* new class Summand for representing summands in a linear constraint
* merged class SoftConstraint into class Constraint; Constraint now
  supports both soft and hard constraint functionality
* new AddConstraint methods in class LinearSpec for directly setting
  constraints with 1 to 4 summands
* code cleanups by using aforementioned AddConstraint methods
* a new very simple test application for alm
* some style corrections


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24108 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-25 01:54:05 +00:00
Ingo Weinhold f69d34a72c Updated headers/build/os/support/TypeConstants.h with the current
headers/os version and removed the now duplicate icon type constant
definitions from several sources.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24106 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-25 00:55:57 +00:00
Karsten Heimrich 93608e10d1 * fixed coding style...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24103 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-24 22:22:43 +00:00
Stefano Ceccherini 576e2bf833 Patch by Julun: implements a refcounted BString. Thank You!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24102 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-24 21:16:58 +00:00
Stephan Aßmus b8872c02c1 BTextControl:
* Placed _BTextInput_ into BPrivate namespace.
* Made _BTextInput_::AlignTextRect() smarter, it centers the line vertically,
  for the case that the BTextControl has a larger label font. Improved insets
  for asthetics.
* Used _BTextInput_::AlignTextRect() consistently in BTextControl, no more
  custom calls to SetTextRect(). Account for minimum vertical inset of 2
  pixels in GetPreferredSize().
* Consistendly select all text when gaining focus in _BTextInput_.
* Override MouseDown() in case the control did not have focus before, or else
  BTextView::MouseDown() will deselct the text again and place the cursor.
  (in line with BeOS behavior)
* Removed unused fBool member from _BTextInput_ and other cleanup.

BTextView:
* Reimplemented BTextView::_AutoResize() so that it works well with
  BTextControl and autoscrolling when the alignment is not B_ALIGN_LEFT.
  I needed two new members for this, fLeftInset and fRightInset which are
  the original insets from the fTextRects. It might currently be broken
  for renaming things in Tracker, I will have to check. _AutoResize() no
  longer messes up the fTextRect insets.
* Fixed stray carrets sometimes being left over, mostly when auto scrolling,
  but I observed them in other cases as well.
* Prevent negative scrolling offsets when autoscrolling. Fixes weird scrolling
  offsets when navigating to the left.
* Reset scrolling to B_ORIGIN when SetText() is called. Fixes for example
  starting to type in the middle of the control in Vision when entering new
  text and autoscrolling was triggered before.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24101 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-24 20:39:29 +00:00
Stephan Aßmus fef3930499 patch by Rene Gollent:
* BListItems now store the top offset of the frame within the parent BListView.
* This allows binary searching the clicked item.
* ItemFrame() is now a cheap call.
* Fixed several bugs in the sorting code of BOutlineListView which lead to
  crashes of client applications.
* Implemented previously unimplemented functions in BOutlineListView.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24092 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-24 14:15:28 +00:00
Jérôme Duval 6213408838 added search.h
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24091 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-24 13:41:01 +00:00
Axel Dörfler f9bbab8848 * First steps towards a more flexible workspaces view handling: the
workspaces view can now be any view in the hierarchy.
* Added private view flag kWorkspacesViewFlag that identifies such a
  view - note though, that you must not remove a view before closing or
  hiding its window for now (and that you still need to set the 
  kWorkspacesWindowFlag, too).
* Fixed Workspaces check for valid screen coordinates; after a crash, it
  managed to open its window offscreen for me.
* Added a ViewLayer method FindView() that finds a view with the 
  specified flags set.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24090 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-24 11:18:52 +00:00
Jérôme Duval b3918e2f66 added SIZE_MAX to stdint.h
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24085 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-23 22:31:19 +00:00
Ingo Weinhold 7dc065bdb0 * syscall_restart_handle_timeout_pre(uint32&, bigtime_t&): A huge
negative relative timeout would be converted to B_INFINITE_TIMEOUT.
  For some reason the ScreenSaver preflet is snooze()ing with such
  a value.
* Some more comments.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24080 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-23 15:56:56 +00:00
Ingo Weinhold bc2001bb39 We have to update the pending signals thread flag when restoring the
signal block mask when returning from a signal handler.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24064 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-22 14:54:03 +00:00
Axel Dörfler ea9d4cd0f7 Slightly increased the default key repeat rate to make it at least
bearable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24059 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-22 10:53:27 +00:00
François Revol 7f3937521f Add debugger module hooks to implement alternative io (I need laplink debugging...)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24052 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-21 22:41:49 +00:00
Oliver Ruiz Dorantes df05c82d14 Add using namespace pragmas
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24050 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-21 22:17:54 +00:00
Axel Dörfler 0dd3108ca0 * Added SIGNAL_FLAG_DONT_RESTART_SYSCALL for send_signal_etc() which
utilizes the THREAD_FLAG_DONT_RESTART_SYSCALL (but only in SIGCONT
  for now).
* resume_thread() is now using that flag to be compatible with BeOS.
* This fixes the Terminal hanging on close.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24045 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-21 13:19:54 +00:00
Ingo Weinhold 562e2f204a * Removed unused team::pending_signals.
* Added team::flags. Currently only used for setting a flag when a team
  has exec()ed.
* Some improvements of _user_setpgid():
  - It failed incorrectly when the target process was a process group
    leader. According to the standard it shall fail when the process is
    a session leader. Moving a process group leader to another process
    group is fine, even if that leaves the group leaderless.
  - Fixed race conditions. We need to recheck the error conditions when
    we hold the team spinlock. Otherwise the situation could change
    while we allocated the new process group. This was one of the
    reasons for bug #1799 -- after the shell fork()'s both parent and
    child invoke setpgid() for the child.
  - Fixed behavior for pid == pgid. It doesn't necessarily mean that a
    new group has to be created.
  - Fixed update of target process group orphaned state.
  - Squashed TODO: setpgid() on a child is supposed to fail after the
    child has exec()ed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24041 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-21 00:46:22 +00:00
Axel Dörfler 3a0782dc15 Added printf()/scanf() type definitions, courtesy of Curtis Wanner - thanks
a lot!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24039 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-21 00:08:03 +00:00
Oliver Ruiz Dorantes d816d81682 Lesson learned, dont use system IOCTL codes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24038 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-20 21:10:53 +00:00
Axel Dörfler 9448bb6e0b Added add_node_listener() and remove_node_listener() kernel private functions
to watch a node.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24035 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-20 16:48:16 +00:00
Michael Lotz cf46897b4c Use a dedicated heap to allocate everything that is needed during heap growth.
This eliminates the edge case where the grow thread would not be able to create
a new area because no memory could be allocated for the allocation of the area.
As this case cannot happen anymore, it is also not possible to deadlock in
memalign. Therefore the timeout (which would only have prevented the deadlock
but wouldn't have solved the edge case anyway) has been removed too.
Add options to dump the dedicated grow heap and to only print the current heap
count to the "heap" debugger command.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23994 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-18 01:04:19 +00:00
Ingo Weinhold c72d22a5e8 Converting relative timeouts into absolute ones is fine in principle,
but there's a special handling for 0 us relative timeouts. Syscalls
usually return B_WOULD_BLOCK instead of B_TIMED_OUT in this case, and
callers might explicitely check for it. Hence we don't convert 0 us
timeouts anymore. gdb works again.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23989 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-17 18:05:49 +00:00
Ingo Weinhold 058494285a axeld + bonefish:
* Added syscall restart support for connect(), accept(), send(), recv(),
  which are implemented via ioctl()s. The actual restart support is done
  in the net stack driver's ioctl() hook. Lower layers need to correctly
  deal with socket timeouts, though, for which the stack module provides
  support functions.
* TCPEndpoint::_WaitForEstablished() does abort now when an error
  occurred earlier, so that trying to connect to an unused port fails
  immediately, as it should.
* Fixed and refactored TCP connection reset handling. The new
  TCPEndpoint::_HandleReset() does the job. Got rid of
  TCPEndpoint::fError.
* Fixed sequence numbers for SYNC/FINI packets.
* The former two fix the problem that connections wouldn't be closed
  correctly and could even be reused when trying to connect again (as
  was reproducible with svnserve + svn).
* Some style cleanup in CPEndpoint.h.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23984 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-17 16:25:07 +00:00
Ingo Weinhold 4048494ce4 axeld + bonefish:
* Implemented automatic syscall restarts:
  - A syscall can indicate that it has been interrupted and can be
    restarted by setting a respective bit in thread::flags. It can
    store parameters it wants to be preserved for the restart in
    thread::syscall_restart::parameters. Another thread::flags bit
    indicates whether it has been restarted.
  - handle_signals() clears the restart flag, if the handled signal
    has a handler function installed and SA_RESTART is not set. Another
    thread flag (THREAD_FLAGS_DONT_RESTART_SYSCALL) can prevent syscalls
    from being restarted, even if they could be (not used yet, but we
    might want to use it in resume_thread(), so that we stay
    behaviorally compatible with BeOS).
  - The architecture specific syscall handler restarts the syscall, if
    the restart flag is set. Implemented for x86 only.
  - Added some support functions in the private <syscall_restart.h> to
    simplify the syscall restart code in the syscalls.
  - Adjusted all syscalls that can potentially be restarted accordingly.
  - _user_ioctl() sets new thread flag THREAD_FLAGS_IOCTL_SYSCALL while
    calling the underlying FS's/driver's hook, so that syscall restarts
    can also be supported there.
* thread_at_kernel_exit() invokes handle_signals() in a loop now, as
  long as the latter indicates that the thread shall be suspended, so
  that after waking up signals received in the meantime will be handled
  before the thread returns to userland. Adjusted handle_signals()
  accordingly -- when encountering a suspending signal we don't check
  for further signals.
* Fixed sigsuspend(): Suspending the thread and rescheduling doesn't
  result in the correct behavior. Instead we employ a temporary
  condition variable and interruptably wait on it. The POSIX test
  suite test passes, now.
* Made the switch_sem[_etc]() behavior on interruption consistent.
  Depending on when the signal arrived (before the call or when already
  waiting) the first semaphore would or wouldn't be released. Now we
  consistently release it.
* Refactored _user_{read,write}[v]() syscalls. Use a common function for
  either pair. The iovec version doesn't fail anymore, if anything could
  be read/written at all. It also checks whether a complete vector
  could be read/written, so that we won't skip data, if the underlying
  FS/driver couldn't read/write more ATM.
* Some refactoring in the x86 syscall handler: The int 99 and sysenter
  handlers use a common subroutine to avoid code duplication.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23983 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-17 15:48:30 +00:00
Michael Lotz 4af6cd5f38 Adding two debug features to the new heap implementation:
* Tracing of allocations, reallocations and frees
* Leak checking infrastructure to dump allocations

The leak checking code records the team and thread id when an allocation is
made as well as stores the originally requested size. It also adds the
"allocations" debugger command that can dump all current allocations (usually
a huge list) or filter by either a team or thread id. This way it's easily
possible to find leftover allocations of no more active teams/threads.
Combined with the tracing support one might be able to track down the time and
reason of an allocation and possibly find the corresponding leak if it is one.
Note that kernel heap leak checking has to be enabled manually by setting the
KERNEL_HEAP_LEAK_CHECK define to 1.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23953 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-12 20:20:35 +00:00
Michael Lotz 5c4d1c5e21 Complete rework of the heap implementation. Freelists are now part of the pages
and pages are now kept in lists as well. This allows to return free pages once
a bin does not need them anymore. Partially filled pages are kept in a sorted
linked list so that allocation will always happen on the fullest page - this
favours having full pages and makes it more likely lightly used pages will get
completely empty so they can be returned. Generally this now goes more in the
direction of a slab allocator.
The allocation logic has been extracted, so a heap is now simply attachable to
a region of memory. This allows for multiple heaps and for dynamic growing. In
case the allocator runs out of free pages, an asynchronous growing thread is
notified to create a new area and attach a new heap to it.
By default the kernel heap is now set to 16MB and grows by 8MB each time all
heaps run full.
This should solve quite a few issues, like certain bins just claiming all pages
so that even if there is free space nothing can be allocated. Also it obviously
does aways with filling the heap page by page until it overgrows.
I think this is now a well performing and scalable allocator we can live with
for quite some time. It is well tested under emulation and real hardware and
performs as expected. If problems come up there is an extensive sanity checker
that can be enabled by PARANOID_VALIDATION that covers most aspects of the
allocator. For normal operation this is not necessary though and is therefore
disabled by default.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23939 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-10 21:00:13 +00:00
Jérôme Duval 176480764b declared entry_ref
clean up


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23934 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-08 21:37:25 +00:00
Oliver Ruiz Dorantes ce28fccee2 Even code field has more sense like that
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23933 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-08 18:32:52 +00:00
Oliver Ruiz Dorantes 2573c43064 Change macros names, guidelines & consistency
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23932 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-08 18:29:33 +00:00
Ingo Weinhold 2c986936df Added new syscall _kern_normalize_path() to normalize a path.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23929 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-08 03:06:14 +00:00
Ithamar R. Adema eb5a25ca41 Slight rework of my previous commit... now ports can be asked too ;)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23928 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-08 02:00:08 +00:00
Ithamar R. Adema 62cb58a8ef Make print_server track Transport addons too. This is because some of the NewTransportAddOns(tm) can also autodetect devices, e.g. USB printers. For this, the print_server needs to keep those transport addons loaded at all times. This code now also enables dynamic Transport discovery for the Printer prefs, e.g. 'hey print_server GET Transport 0' or 'hey print_server GET Transport 'USB Port'' will now work too ;)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23927 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-08 00:34:53 +00:00
Oliver Ruiz Dorantes 6ad588aae8 Added remaining event IDs I saw in new Bluetooth 2.1 specs plus some internal stack haiku is gonna use
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23924 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-07 19:56:08 +00:00
Ingo Weinhold 7486b72dd1 Added some kernel tracing to the runtime loader.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23921 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-07 19:22:39 +00:00
Ingo Weinhold ed854de770 Also include info about the syscall return type in the
extended_syscall_info structure.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23916 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-07 16:03:00 +00:00
Axel Dörfler 6f58064f10 * Added flags field in net_protocol_module_info; there is currently a single
defined flag: NET_PROTOCOL_ATOMIC_MESSAGES.
* socket_send() now honours NET_PROTOCOL_ATOMIC_MESSAGES and returns either
  EMSGSIZE if the data to be send is larger than net_socket::send::buffer_size,
  or divides the data in appropriately sized chunks.
* This fixes sending >=64K over a TCP socket at once (TCP would just have
  returned an error in that case).
* TCP now overrides the default send buffer size (to 32768 for now).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23915 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-07 15:09:19 +00:00
Ingo Weinhold 9835c090a6 Added a boolean "force" parameter to thread_yield(). When true, the
function has the old behavior. When false, it just calls the scheduler
without any priority adjustment or other stuff.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23906 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-07 11:40:31 +00:00
Stefano Ceccherini d082779211 Rewrote Input.h, adjusted Input.cpp accordingly, added nothrow on
allocations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23905 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-07 10:50:39 +00:00
Philippe Houdoin 6198a9798e Made DPC module binary compatible with BeOS one.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23901 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-06 23:10:13 +00:00
Oliver Ruiz Dorantes 2f7e4b7c05 Add bluetooth error codes according 2.1+EDR official specs
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23898 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-06 18:00:04 +00:00
Oliver Ruiz Dorantes c9502bbe71 Added macros to parse port code, cointaining the event
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23897 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-06 17:57:29 +00:00
Axel Dörfler 392eb518d5 * Added gcvt() implementation - this fixes bug #1757.
* Added gcvt(), ecvt(), and fcvt() prototypes to stdlib.h - they are all
  marked legacy, but are still part of the POSIX standard, so we might want
  to implement them if the need arises.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-06 17:11:02 +00:00
Ingo Weinhold a101e99aad Added libalm.so and its dependency liblinprog.so. libalm.so provides a
BLayout implementation (BALMLayout) using the Auckland Layout Model
(ALM). The original ALM was implemented by Christof Lutteroth, the
Haiku/C++ version by James Kim.
The code needs some review, but the test programs seem to work fine.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23889 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-06 10:51:44 +00:00
Ingo Weinhold 38d596cb81 * Moved public headers to headers/libs/lp_solve.
* Added Jamfile by James Kim and Christof Lutteroth.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-06 10:37:19 +00:00
Ingo Weinhold 350b6dbc3a * Removed AbstractTraceEntry::sPrintTeamID and added a flags field to
TraceOutput for output options instead.
* Added "traced" option --difftime. Instead of the absolute system time
  it prints the difference time to the previously printed entry.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23864 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-04 17:54:40 +00:00
Axel Dörfler 7cb9337835 * Ingo broke binary compatibility of Window.h in r18649, thanks to Stefano
for finding this. This should fix bug #1734.
* Removed unused BWindow members and the temporary PrintToStream() method.
* Indentation cleanup (DirectWindow.h had some spaces instead of tabs).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23863 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-04 15:01:34 +00:00
Axel Dörfler 43711de9d2 * Added BSD specific errno.h for EDOOFUS (yeah, I know, great error code...)
* Added sigmask() macro.
* Fixed libutil.h I broke yesterday: it's thought to add functions only if
  you've included some other headers before; added the correct header guard
  we're using for our sys/param.h.
* Added pidfile.c to the build.
* Fixed warning in realhostname.c, and pidfile.c.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23840 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-03 16:20:16 +00:00
Michael Lotz f87d72d788 Introduce a B_NO_LOCK_VECTOR flag to be used with install_io_interrupt_handler().
When specified it desigantes that the interrupt handler should not lock the
vector with a spinlock when executing the installed interrupt handlers. This
is necessary to allow the same interrupt vector to be handled in parallel on
different CPUs. And it is required for the CPU halt to work synchronously when
there is more than one AP CPU. Though the acquire_spinlock() should cause IPIs
to be processed, only this fixed the SMP_MSG_FLAG_SYNC problem for me.
Not locking is safe as long as it is guaranteed that no interrupt handler is
registered or removed while the interrupt handler is running. We can guarantee
this for the SMP interrupt handlers we install in arch_smp_init() as they are
never uninstalled. Probably this flag should be made private though.
Restored the SMP_MSG_FLAG_SYNC when entering the kernel debugger.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23838 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-03 16:16:17 +00:00
Axel Dörfler a32a4683ff * Implemented flock() semantics to the advisory locking backend. Not tested
(must also compare to BSD; I've looked at their sources, but I might have
  missed something).
* Added sys/file.h and the flock() system call.
* common_fcntl() could forget to put back the file descriptor on some error
  conditions (I guess we should introduce and use a DescriptorGetter class).
* Cleaned up fcntl.h, moved the BSD extensions S_IREAD and S_IWRITE to
  sys/stat.h where they belong, and added the missing S_IEXEC to them.
* Added some more comments.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23836 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-03 15:37:31 +00:00
Axel Dörfler e5bc2a9e7a Added BSD extension vsyslog() - is also found on Linux.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23835 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-03 15:31:16 +00:00
François Revol 82610ec8eb * get rid of ppc stuff
* possible types of exception frames


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23833 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-03 11:39:28 +00:00
Stephan Aßmus ff5defe060 Include <sys/param.h> for MAXPATHLEN - fixes the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23831 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-02 19:08:58 +00:00
Axel Dörfler e6b30aee0f Minor improvements for the BSD compatibility library:
* Added {get|set|end}usershell() functions.
* Define MAXLOGNAME, and L_SET, L_INCR, and L_XTND.
* The pidfile stuff in libutil.h is now included, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23827 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-02 17:38:09 +00:00
Axel Dörfler b4fd412b3e * Added BSD's FD_COPY() macro (it's not POSIX, though).
* Some other minor improvements.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23826 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-02 17:32:01 +00:00
Stephan Aßmus 96418817f9 * added a PrintToStream() method
* added optional tracing for the main operations
* fixed bad pointer arithmetic when reallocating/moving the object's data
* it was impossible to remove the very first space via _RemoveSpaces()
* added a little more variaty to error return codes for some
  functions to make them a little more helpful

-> This fixes the bogus space values in DriveSetup (#1737)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23824 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-02 12:38:15 +00:00
Axel Dörfler f033aee165 * Added B_NOT_SUPPORTED, B_KERNEL_READ_AREA, and B_KERNEL_WRITE_AREA to
HaikuBuildCompatibility.h; this fixes building agp_gart and the intel
  extreme driver for BeOS.
* Added sockaddr_storage to HaikuBuildCompatibility.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23823 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-02 12:18:55 +00:00
Axel Dörfler 45b17b80d1 * Temporarily switched to a recursive lock for the depot.
* While this is not a really good idea for a lock with supposedly little
  contention, but it'll fix bug #1731. I haven't tested it yet, but will
  do so in a minute :-)
* I will need to rework the slab anyway so that it's possible to use it
  as a replacement for our heap, and then I'll switch back to a benaphore
  again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23822 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-02 12:12:54 +00:00
Bruno G. Albuquerque ea2fe1498f It is a good idea to return a value. :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23821 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-01 23:24:10 +00:00
Axel Dörfler 5ccd99565d Benaphores are nice and fast, but they aren't useful for debugging at
all.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23820 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-01 23:05:26 +00:00
Oliver Ruiz Dorantes b06bf23fb5 Add 'public' headers in order all stuff actually compiles
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23816 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-01 21:17:02 +00:00
Oliver Ruiz Dorantes 9b67804dce Add private bluetooth headers being used in the kit and the future server
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23815 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-01 20:59:14 +00:00
Ingo Weinhold 90e3bbf0cb Added optional kernel tracing for sending BMessages. Currently only the
destination of the message and it's "what" field are stored. It might be
nice to also get some info about its fields -- maybe as an additional
option.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23810 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-01 12:35:00 +00:00
Axel Dörfler 78fa3affbc * Overlay on the G33 does not work anymore in the secondary ring buffer;
we now always only use the primary ring buffer.
* Removed secondary ring buffer allocation and member fields.
* Increased size of the primary ring buffer to 65536 bytes.
* The bytes per row register is computed differently for 9xx chips.
* On G33, the overlay does not need a physical address anymore, so we
  don't pass B_APERTURE_NEED_PHYSICAL to the allocation anymore for that
  device.
* intel_free_memory() accidently added the aperture base to the allocation
  and would therefore never free any memory.
* INTEL_RING_BUFFER_SIZE_MASK was shifted one bit to the right, didn't
  cause any harm with our buffer sizes, yet, though.
* With these changes, the driver runs stable on a G33 chipset (I have not
  yet tested the hardware cursor, though, it might need some work, too).
  The only known issue left is that overlay flickers a bit if its buffer
  is partially backed up by reserved and allocated memory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23798 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-31 18:28:48 +00:00
Axel Dörfler 103d05f3c2 * Renamed GART's deallocate_memory() to free_memory().
* Removed "physical" parameter of GART's bind_aperture() - I don't think this
  be of use to anyone.
* Fixed binding/unbinding pages in the Intel GART driver; I accidently shifted
  the page offset twice.
* Actually forgot handling of allocated memory in Aperture::BindMemory().
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23796 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-31 17:54:23 +00:00
Axel Dörfler 3cec75dc33 * Debugger modules now have two methods: enter_debugger() and exit_debugger().
* The kernel now opens up to 8 debugger modules (and puts them into an array;
  maybe we'll want to switch to a doubly linked list when there is the need).
* Implemented an example debugger module that prints a stack trace of the
  current thread when the kernel debugger is entered (not included in the
  image).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23794 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-31 12:25:43 +00:00
Axel Dörfler 1c34b9b1f5 Work in progress (might not work for you yet):
* Now uses the AGP GART module for memory management. This greatly simplifies
  the memory handling, and memory is now actually allocated on demand,
  instead of a fixed size (stolen memory is not freed, though).
* The Intel GART module should now also work with older chipsets.
* No longer remove the GTT size from the stolen memory; this appears to have
  been a mistake in the X driver. Not sure about the BIOS popup yet.
* The AGP module (in combination with the Intel GART module) is now mandatory
  to use the Intel driver.
* Removed now superfluous settings (like memory size). Only enabling/disabling
  the hardware cursor is still supported.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23781 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-29 08:55:36 +00:00
Axel Dörfler 7019a43544 * Added B_NOT_SUPPORTED.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23776 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-28 17:38:28 +00:00
Philippe Houdoin 46b5cc220a Corrected GLRenderer's instantiation function name.
(I guess frenchies are guilty here, as mmu_man's ThemeAddOn have the same disease...)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23757 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-26 22:51:51 +00:00
Axel Dörfler 3adccb1935 * More or less completely rewrote the AGP bus manager.
* It now also serves as a generic GART manager and accepts bus modules as well
  as custom modules of graphics drivers if they want to (could be used for the
  Radeon PCI GART stuff, for example).
* Implemented GART support module for Intel i965 and G33 chipsets (the other
  Intel chips will come later).
* Renamed agp bus manager to agp_gart to reflect its new functionality (even
  though the AGP functionality is already outdated (due to PCIe), the GART
  stuff remains current).
* Adapted existing users of the AGP bus manager to the API changes.
* Not very well tested yet...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23754 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-26 22:18:52 +00:00
Axel Dörfler d75c88206e * Simplified usage of the INTEL_TYPE_xxx constants.
* Added some defines needed when playing with the bridge controller.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23753 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-26 21:59:02 +00:00
Stefano Ceccherini f095b4556b for some reason, BDirectWindow apps compiled with the r5 headers don't
work on haiku... let's start reverting some headers changes I did, 
although these don't look harmful.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23729 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-25 10:43:58 +00:00
Stefano Ceccherini 0e6fdcf676 Added back BGLScreen declaration. On second thought, we might want to
move it to its own file, but it's not implemented yet... we'll see.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23717 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-24 13:05:21 +00:00
Stefano Ceccherini 455a252e0d rewrote GLView.h (left out BGLScreen for now, will integrate it later),
adapted GLView.cpp to the new variable naming scheme.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23716 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-24 12:55:38 +00:00
Axel Dörfler 4dfa9e425f Some work in progress:
* set_gtt_entry() used the wrong index to fill the GTT - this could have never
  worked correctly when you specified more memory than the amount of stolen
  memory.
* Implementing maintaining resources for emulating overlay using the 3D engine
  on i965. I don't yet commit the actual overlay code, as that is a) ugly, and
  b) does not work yet.
* Moved AreaKeeper into its own header.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23709 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-23 17:50:27 +00:00
Ingo Weinhold 325b88a661 * Introduced debugger command flag B_KDEBUG_DONT_PARSE_ARGUMENTS.
For commands with this flag set, the parser won't parse the
  arguments provided (it will only check for matching parentheses and
  brackets), but will pass the unparsed argument list string to the
  command instead.
* Set the new flag for the "expr" command, so one doesn't have to quote
  the expression to evaluate anymore (or put it in parentheses).
* Fixed tokenizing of quoted and unquoted strings in expression mode.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23697 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-21 23:25:34 +00:00
Axel Dörfler 4a67038e56 * Added a new function hash_insert_grow() that grows the hash table when needed.
* Removed the public hash_grow() function again (at least for now, it's only
  private).
* Removed the newSize argument from hash_grow(); it will compute the new size
  automatically.
* The block cache is now using hash_insert_grow() instead of hash_insert()
  which should make hash lookups much faster with some 10 thousand blocks,
  also increased the initial table size from 32 to 1024...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23692 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-21 19:57:40 +00:00
Ingo Weinhold b4f58d8758 Renamed syscall_parameters_info structure to extended_syscall_info (and
kSyscallParametersInfos to kExtendedSyscallInfos) and added "name"
field. Now the classes for syscall kernel tracing don't need to lookup
the syscall function symbol anymore, which speeds up printing/filtering
of those entries dramatically.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23687 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-21 15:29:00 +00:00
Ingo Weinhold a54c125e37 Added experimental ktrace_[v]printf() functions to libroot. Their output
is recorded in a kernel trace entry (if tracing is enabled).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23686 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-21 15:10:05 +00:00
Ingo Weinhold 64fe37ee89 * AbstractTraceEntry records the team ID too, now.
* Added "printteam" switch to "traced" command, enabling the printing of
  the team ID.
* Added "team" filter to the "traced" command expression language.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23684 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-21 13:31:27 +00:00
Ingo Weinhold 6d36996620 * Fixed my fix for make_space() wrapping. It's always a good idea to
write code aligned to what one has written in the comment (or the
  other way around).
* Made trace_entry structure doubly linked, by introducing a
  previous_size member. By using bit fields, shrinking the flags field
  to 4 bits, and not saving the lower two bits of size and previous_size
  (which are always 0 due to alignment), the structure remains 4 byte
  sized and can still address the same entry size.
* kBufferSize is no longer one less than it could be.
* "traced" command:
  - Use static variable for the iteration state rather then cluttering
    the temporary debug variable name space.
  - The <count> parameter can now be negative, in which case the entries
    before (and including) <start> are printed.
  - Added a new optional parameter, specifying the maximal number of
    entries to be filtered. Filtered iteration is beautifully
    comfortable now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23678 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-21 00:41:45 +00:00
Ingo Weinhold 902425896d Made kputs() available in the kernel and used it for printing debugger
command usage texts, which can be too long for kprintf().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23677 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-21 00:15:33 +00:00
François Revol 1778540a37 Cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23675 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-20 22:01:33 +00:00
François Revol 93b4dee849 * Add NeXT platform.
* Add platform methods for timer as it is platform dependent.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23673 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-20 21:30:59 +00:00
Stefano Ceccherini 9c76ea4c52 Applied patch by Alexander Deckner (with a few small changes by myself):
Implemented palette mode and fixed bugs listed at ticket #1701. Thanks 
for your work!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23671 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-20 21:20:12 +00:00
Jérôme Duval 3d239d7451 added missing include
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23664 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-20 17:21:01 +00:00
Stephan Aßmus 23108d8b57 * include StorageDefs.h for convenience, otherwise stuff like B_READ_ONLY
is not defined if you just include File.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23661 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-20 14:44:02 +00:00
Ingo Weinhold 4c4b14c3bb The "traced" command can now be passed a filter expression consisting of
boolean operators ("not", "and", "or") and filters matching thread IDs
or contained strings.
I'm still not fully happy with the command. It should be possible to
define a filter and then comfortably scroll through the matching
entries. Currently having to specify an index range of the unfiltered
entries is rather unhandy in combination with filtering.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23658 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-20 00:34:37 +00:00
Ingo Weinhold f7a5d9c583 Changed TraceEntry::Dump() to take a TraceOutput& and removed
AbstractTraceEntry::AddDump(char*, size_t).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23655 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-19 22:23:32 +00:00
Jérôme Duval ec1315c2ea added arch_commpage.h for the m68k arch (copied on x86)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23646 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-19 18:16:45 +00:00
Ingo Weinhold ab23dfa7f7 Moved tracing macro definitions into separate tracing_config.h header.
So now there's a central place to enable tracing in general and for
individual components.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23645 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-19 17:24:34 +00:00
Ingo Weinhold 2477bce504 Added support for userland symbol lookup in "sc" and "call". Having
used it for an hour or so, I really wonder how we could live without it.
:-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23640 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-19 16:33:03 +00:00
Jérôme Duval 907f26dbb5 added a arch_commpage.h header for ppc, dunno if it needs to be changed
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23637 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-19 15:43:45 +00:00
Jérôme Duval 8164606d77 fix a warning
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23632 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-19 14:26:59 +00:00
Ingo Weinhold f1047a1c3e Introduced helper class TraceOutput that represents an output buffer
and added AbstractTraceEntry::AddDump(TraceOutput&) method.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23622 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-18 22:15:30 +00:00
Ingo Weinhold 19101ba0f4 Generate a kernel array kSyscallParametersInfos containing information
about syscall parameters. Particularly interesting is a type_code field
for each parameter. The mechanism isn't very accurate, but we can
classify everything in string, pointer, and integer types.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23618 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-18 19:25:28 +00:00
Axel Dörfler 5d0afa4e4e * cache_detach_sub_transaction() didn't really work: it did not put all needed
blocks into the new transaction, but it would set that transaction on all
  blocks of the old transaction, too. Also, it did not correctly update the
  num_blocks/sub_num_blocks fields of the old transaction. Even worse, it did
  return B_OK instead of the ID of the new transaction...
* get_writable_cached_block() did not correctly maintain the number of blocks
  in the sub transaction.
* write_cached_block() did not free the original_data of a block when it wrote
  it back as part of a previous transaction.
* Changed "cookie" for cache_next_block_in_transaction() to "long", so it will
  be 64 bits when needed.
* Improved the API for detaching sub transactions: you can now get the blocks
  of only the main (parent) transaction as well, added new
  cache_block_in_main_transaction() function.
* BFS now flushes the log when there is no space left for the current
  transaction.
* _WriteTransactionToLog() allocated a "vecs" array, but never freed it.
* _WriteTransactionToLog() now also supports detaching the current sub
  transaction if the whole thing is getting too large (it will now also panic
  if that doesn't work out).
* Removed a useless optimization: making the blocks available in the cache
  isn't really needed, as all blocks in a transaction are locked into the
  cache, anyway.
* Implemented Transaction::WriteBlocks().
* Minor cleanup, removed some dead code, fixed warnings in the fs_shell's
  block_cache when compiled with debug output on.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23610 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-18 17:07:18 +00:00
Ingo Weinhold bd0689e668 Added usage message to "cvar" and "cvars" debugger commands and define
temporary variables.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23596 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-17 23:22:29 +00:00
Ingo Weinhold 0b60583fec Added convenience functions alloc_tracing_buffer_{memcpy,strcpy}().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23576 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-17 01:58:08 +00:00
Ingo Weinhold 8a90d12e26 * Added add_debugger_command_etc() which is similar to
add_debugger_command(), but additionally takes parameters "usage"
  and "flags".
* Added add_debugger_command_alias() which creates another name for an
  existing command.
* Added print_debugger_command_usage() to print a command's usage.
* invoke_debugger_command() intercepts invocations with "--help" and
  prints the command's usage text, if it is known. If unknown, the
  command will be called normally.
* Made use of the new functions in debug.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23573 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-16 23:41:20 +00:00
Ingo Weinhold 1839792524 Change parse_expression() return value from uint32 to uint64.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23571 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-16 22:55:39 +00:00
Ingo Weinhold 06f78e9fb7 * Changed the way temporary variables work. They won't be unset before
a command is executed anymore. Instead the least recently used
  temporary variable is overwritten, if there's no free slot for a new
  temporary variable.
* Removed the special handling for the command result variable ("_"). It
  just works like any other temporary variable, now.
* Individual temporary variables can be removed (e.g. using the "unset"
  command).
* Added unset_all_debug_variables() and "unset_all" command to unset
  all persistent and temporary variables.
* Removed remove_all_temporary_debug_variables and renamed
  remove_debug_variable() to unset_debug_variable().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23568 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-16 21:50:59 +00:00
Axel Dörfler c6ee79ce38 * vm_create_anonymous_area() now accepts B_ANY_KERNEL_BLOCK_ADDRESS.
* As a temporary work-around for the current slab allocator's area usage,
  I added the CACHE_LARGE_SLAB flag, which will force the allocator to 
  use larger areas.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23564 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-16 20:30:16 +00:00
Ingo Weinhold 3b4fa1664e * Implemented parse_expression(). The back-end is an expression parser
that is a little more powerful than BeOS'. It features:
  - Persistent and temporary uint64 variables. The former kind is set
    only by the user. The latter (those prefixed "_") can be set
    automatically by commands, thus e.g. making it easier to access
    members of a dumped structure. They are unset when the next command
    is invoked. The special temporary variable "_" is defined as a
    command's return value.
  - Expressions can contain nested command invocations using brackets
    ("[ ... ]").
  - Command lines are parsed by the expression parser, too. They can
    contain command invocations (in brackets) and expressions (in
    parentheses).
* Added debugger commands:
  - expr: Evaluates the given expression and prints the result.
  - unset: Undefines a variable.
  - vars: Prints the values of all defined variables.
* Moved debugger command code into its own source file.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23546 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-16 00:01:20 +00:00
Stefano Ceccherini d01f3af185 Menu tracking now ignores mouse movements if they are too fast
(suggested by stippi). The movement threshold will be subject to 
changes, as I only tested on vmware and it's probably too high.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23528 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-15 13:40:13 +00:00
François Revol 82062f804c Works much better when actually allocating the TLS entry...
Now the backend works, Login can list users.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23509 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-14 02:03:34 +00:00
François Revol f9e760ccaa Some more bone compatibility.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23507 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-14 01:58:51 +00:00
Axel Dörfler 4fc4f2c8ae * Added a transaction listener mechanism to be notified when a
transaction ends or has been aborted.
* BFS now listens for transactions when it created an inode to see if 
  the transaction will be aborted without freeing the inode (in which 
  case it will panic for now).
* Started implementing tracing support, but it's not working yet.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-13 17:18:29 +00:00
Michael Lotz 8c2a9d7433 bonefish+mmlr:
As (our) gcc unfortunately uses atexit() to clean up lazily initialized static
variables inside functions we have to ensure that we do the right thing with
unloadable shared objects. In case a shared object was unloaded that installed
an atexit() hook the application would crash on exit. We now implement a
callback into libroot that is used to call all the atexit() hooks of a
component that is to be unloaded. Most prominently this fixes the media_server
crash at shutdown.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23486 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-13 12:08:34 +00:00
Axel Dörfler 8e43ece8b8 Some more work on the tracing API:
* Added function to allocate space in the buffer.
* Dump() now fills a buffer instead of printing its data directly.
* This allows the new "#pattern" argument of the "traced" command to 
  work. When you're using that, the index of the trace entry is printed
  out, too, so that you can then get a full dump around the hits.
* Added an AddDump() method to the AbstractTraceEntry class so that 
  there is no need to call the inherited function anymore.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23479 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-13 02:50:32 +00:00
Marcus Overhagen f0d174e96f fix comments
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23465 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-13 00:04:40 +00:00
Axel Dörfler 416458e9c4 * Added nothrow to the new operator because otherwise the C++ compiler
will not accept if the allocator returns NULL and crashes instead
  (ie. not compiling in tracing would have crashed if some module tried
  to use it).
* Added total entries count to the KDL command output.
* Fixed computing the start index of the KDL command.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23460 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-12 23:55:53 +00:00
François Revol 884c36167c Flag for LPSTOP availability.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23459 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-12 23:55:53 +00:00
Axel Dörfler aa5d2a2df2 bonefish+axeld:
* Implemented an optional tracing layer that can be used in the kernel.
  Nice to use if you don't have serial output or need something that doesn't
  slow down the system as much.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23447 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-12 18:41:35 +00:00
Michael Lotz f82c11c079 bonefish+mmlr:
* Move most of MIME database support out of libbe and into registrar
* Use the (async) MessageDeliverer instead of a synchronous SendMessage in _SendMonitorUpdate

This fixes a deadlock when the message port of a MIME database watching
application gets full as documented in bug #1311.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23423 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-11 22:45:06 +00:00
Stephan Aßmus 374b5544a9 * expose the XOR function for BRegions (for now called "ExclusiveInclude")
which already existed in the region backend ported from XOrg


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23394 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-11 13:42:21 +00:00
Stefano Ceccherini 6e11b3f991 Close the whole menu hierarchy when invoking an item via keyboard. Added
a TODO comment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23389 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-11 12:08:21 +00:00
Ingo Weinhold 34b3b26b3b Merged branch haiku/branches/developer/bonefish/optimization revision
23139 into trunk, with roughly the following changes (for details svn
log the branch):
* The int 99 syscall handler is now fully in assembly.
* Added a sysenter/sysexit handler and use it on Pentiums that support
  it (via commpage).
* Got rid of i386_handle_trap(). A bit of functionality was moved into
  the assembly handler which now uses a jump table to call C functions
  handling the respective interrupt.
* Some optimizations to get user debugger support code out of the
  interrupt handling path.
* Introduced a thread::flags fields which allows to skip handling of
  rare events (signals, user debug enabling/disabling) on the
  common interrupt handling path.
* Got rid of the explicit iframe stack. The iframes can still be
  retrieved by iterating through the stack frames.
* Made the commpage an architecture independent feature. It's used for
  the real time data stuff (instead of creating a separate area).
* The x86 CPU modules can now provide processor optimized versions for
  common functions (currently memcpy() only). They are used in the
  kernel and are provided to the userland via commpage entries.
* Introduced build system feature allowing easy use of C structure
  member offsets in assembly code.

Changes after merging:
* Fixed merge conflict in src/system/kernel/arch/x86/arch_debug.cpp
  (caused by refactoring and introduction of "call" debugger command).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23370 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-11 00:36:44 +00:00
Axel Dörfler 3e5b9076f9 * Fixed (or rather, worked around) a deadlock in the VM: when a file was
resized but still had dirty pages to be written back, 
  vm_cache_resize() (which is called with the inode lock being held)
  deadlocked with the page writer.
* Now, I reintroduced busy_writing: it'll be set by everything that
  writes back pages (vm_page_write_modified(), and the page writer),
  and will be checked for in vm_cache_resize() - other functions are not
  affected for now, AFAICT.
* vm_cache_resize() will clear that flag, and the writer will check it
  again after it wrote back the page (which will fail when it's outside
  the file bounds), and if it's cleared, it will get rid of the page
  (if the file has been resized again in the mean time, writing it will
  succeed then, and we'll keep the page around).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23334 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-09 22:25:21 +00:00
Axel Dörfler bcb71f00e8 * My last change to vm_page.cpp made an existing bug much more likely to
appear: when freeing a modified page, it wouldn't have a cache
  anymore, but set_page_state_nolock() depended on it.
* To work around this, I added a vm_page_free() function, which the
  caches that free modified pages have to call (but others may, too).
  It will correctly maintain the sModifiedTemporaryPages counter in case
  the cache has already been removed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23318 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-09 18:15:28 +00:00
François Revol 1dc0bb774c Avoid empty struct
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23263 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-06 00:40:17 +00:00
Jérôme Duval 0f928a18d2 updated mesa to 7.0.2
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23260 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-05 16:12:28 +00:00
Stefano Ceccherini 9e64a7ed1b Fixed problem with some popup menus (check ticket #1679)
Moved GetMouse() calls near the check for exit conditions.
Reorganized a bit the code, and hopefully simplified it in some places.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23229 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-03 07:30:05 +00:00
Axel Dörfler c88e5e410c * Added support for the G33 line of chips: mode setting and acceleration is working fine AFAICT.
* Implemented mapping the GTT area for i9xx chips other than the i965. This should also fix the
  driver working with these chips at all.
* The memory used by the driver now take the GTT area into account - before the GTT could be
  overwritten theoretically...
* Added fix for some i965 quirks from the X driver.
* Added some overlay definitions for the i965.
* Started support for G33 overlay (not complete yet).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23220 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-02 18:44:39 +00:00
Marcus Overhagen 70eb0da7e0 Mask io-space bit in promise_tx2 driver, the driver was broken after recent ide-adapter changes.
Replaced IDE_ADAPTER_IS_PRIMARY by IDE_ADAPTER_CHANNEL_INDEX to support more than 2 bus master channels,
and made ide_adapter aware of 3rd and 4th channel when calculating bus master dma address.
Fixed bus master DMA support in legacy_sata driver for tertiary and quaternary channel, channel 3 and 4
were using the DMA engine of primary and secondary channels (that might have destroyed your data).
Use PCI_address_io_mask instead of ~PCI_address_space (no functional change).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23207 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-01 20:31:14 +00:00
Stefano Ceccherini 921eba6e4d BPrintJob: PrintableRect(), PaperRect() and GetResolution() now call
_LoadDefaultSettings() if no settings were loaded already, in order to 
return valid values. Renamed private methods to fit our guidelines.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23204 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-01 15:54:28 +00:00
Michael Pfeiffer 9ffc1f4105 Checked in too soon.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23195 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-30 10:33:31 +00:00
Michael Pfeiffer 5d632c2aba - Fixed HW cursor issues:
- in order to set cursor position SVGA_CURSOR_ON_SHOW has to be written to register SVGA_REG_CURSOR_ON. 
  - do not use alpha cursor because it does not support inverting of source pixels.
- Fixed wrong usage of if-statement inside switch-statement
- Sync at end of SCREEN_TO_SCREEN_BLIT so that app_server does not write to frame buffer while accelerated operation is still running.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-30 10:06:46 +00:00
François Revol a78864975b Move mmu definitions to a header so the bootloader can also use them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23188 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-29 14:44:47 +00:00
François Revol 171a03646d Some more fields that helps compiling, but I'll have to sort that out later.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23187 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-29 13:01:14 +00:00
François Revol 5eeaf46777 Minimal headers for atari_m68k
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-29 12:58:32 +00:00
Stefano Ceccherini d73c4e9fb1 Put the code to Extract a replicant into its own function.
BShelf::_AddReplicant() is finally getting acceptable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23182 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-28 11:07:28 +00:00
Stefano Ceccherini 898edb5ba7 Split BShelf::_AddReplicant() functionality into smaller methods. Not
yet done, but I hope it's getting better


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23181 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-28 10:49:04 +00:00
Marcus Overhagen 882123356b Added more debugging code. The partition code appears to be using objects that have been destroyed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23165 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-26 22:26:08 +00:00
Stephan Aßmus 099fb2d3be * removed declarations for methods which are not used/implemented in View.h
* improved naming of some private BView functions and used our underscore
  prefix
* added a _DrawAfterChildren method to BView which does the necessary setup
  and calls the DrawAfterChildren hook
* call the new _DrawAfterChildren method in the BWindow implementation, this
  was easy since the view tokens are already hierachically sorted
* implement support for B_DRAW_ON_CHILDREN in the app_server's ViewLayer, it
  simply means that children are ignored for the views clipping region, any
  drawing methods will paint over children (therefor the B_DRAW_ON_CHILDREN
  flag is even properly named)

With these changes, support for B_DRAW_ON_CHILDREN and the DrawAfterChildren()
hook are implemented and behave exactly as on R5 as far as I can tell, also
for the view background painting.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23154 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-25 14:47:06 +00:00
Axel Dörfler 8818c50507 * Made QueueCommands::Write() and MakeSpace() public.
* Implemented MakeSpace() (not yet tested).
* Changed intel_wait_engine_idle() to spin() between reads and to timeout
  after 1 second of waiting (could probably be done way earlier).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23120 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-13 14:56:28 +00:00
Michael Lotz fd0986401e Ignore disabled local APICs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23118 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-12 18:39:41 +00:00
Michael Lotz f108445b5e * Initial support for ACPI tables to detect multiprocessor configurations
* ACPI is evaluated first as it also handles things like multi core or hyper threading setups
* Removed other (disabled) hyper threading code per the notes in the corresponding ToDo
* Limit the detected CPU count to 2 for now as I wasn't able to get it working in either emulation nor real hardware with more than 2 CPUs
* Added a reserved byte to the mp_config_table struct, it worked only by luck as the compiler did padding there to get to the same size

I can now boot my Core 2 Quad with two out of four processors active :-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23100 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-09 21:01:55 +00:00
Axel Dörfler 21885de266 * BFS now always writes back the whole block when it writes the super block.
* Therefore, I've added an I/O control that let's it update the boot block
  part of this block, so that makebootable can use it on a mounted volume
  (this will probably be moved into a disk system API later).
* Added user_memcpy() to the fs_shell.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23082 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-08 14:23:35 +00:00
Jérôme Duval d2d6724788 added pthread_once() implementation and tests
there is still a TODO on an init race condition 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23076 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-07 21:02:59 +00:00
Jérôme Duval 4ff6af6d52 applied patch by kaliber
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23075 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-07 19:30:34 +00:00
Michael Lotz dfa4dfe033 Something else that has been laying around for some time. Implemented hash_grow() that can grow a hash table to a new table size. Automatic growing is commented out in hash_insert() since there needs to be a way to disallow growing in certain cases (i.e. where no allocations can be made). This is detailed in the ToDo at the top of the file.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23074 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-06 21:58:06 +00:00
Michael Lotz bbea21a256 Forgot the header change in the last commit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23073 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-06 21:41:08 +00:00
Oliver Ruiz Dorantes d89505dc24 Wrong method name
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23033 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-30 19:51:44 +00:00
Ingo Weinhold 92ab20b3a4 Added a list of death_entry's to the teams structure. It stores the
exit status of (non-main) threads of a team. Fixes bug #1644.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23009 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-28 00:07:32 +00:00
Axel Dörfler 5845b6ecc5 * The boot loader now remembers the bytes per row as told by the graphics card, and
passes that information on to the kernel. This should fix wrong bytes per row with
  certain resolutions and graphics cards.
* The boot loader now recognizes 15 bit modes that are advertised as 16 bit modes.
  This should fix wrong colors in 16 bit modes on some cards.
* Reenabled setting MTRR for VESA mode - don't remember why I disabled it, but it
  works fine on my test machines.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23006 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-27 16:33:19 +00:00
Axel Dörfler 3ae3b04bce * The boot loader (bios_ia32 only) now duplicates everything that goes to the
serial output, and puts it into the new kernel_args::debug_output field.
* syslog_init() will now check if there is anything in kernel_args::debug_output
  and will put that into the syslog buffer.
* dump_block() now also prints an offset.
* Fixed warning in mmu.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23003 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-27 12:59:34 +00:00
François Revol 7579aad575 Fix extra token at end of #endif
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22974 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-21 22:57:33 +00:00
Stefano Ceccherini ee70f30ea0 cleanups
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22965 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-20 12:59:59 +00:00
Jérôme Duval c6f1a3bfbb this macro is preferred
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22960 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-19 19:50:38 +00:00
Ryan Leavengood aaa10d6056 Added trunc to the math headers. I need this for JavaScriptCore. It is already
defined in libroot.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22949 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-18 16:54:48 +00:00
Ingo Weinhold f969977bc1 Patch by Vasilis Kaoutsis (modified by myself): Implemented sigset().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22947 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-18 16:39:18 +00:00
Axel Dörfler 7301a7fbdb bonefish+axeld:
* The debug_server now sends the registrar messages whenever the debug alert
  is shown, and also, if the user wants to debug the team.
* In the latter case, the registrar will now cancel a shutdown process.
* Also, it will now wait with the shutdown process until the user has
  acknowledged the debugger alert.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22926 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-14 01:28:47 +00:00
Axel Dörfler 7333992516 On a media change, the KDiskDevice must do a bit more than it did:
* it now updates the partition data,
* the flags,
* and the disk geometry - and that now allows the session add-on to actually
  detect a newly inserted CD.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22918 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-13 12:18:06 +00:00
Axel Dörfler 4a31d30e84 * The file map needs to know the actual file size to be able to know if it has
the complete extent info or not.
* file_map_translate() now cuts down the request to the file bounds.
* Adjusted BFS and FAT to the API changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22913 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-13 10:34:48 +00:00
Axel Dörfler 88ef411154 * Added an UninitializeMedia() method to KDiskDevice that also resets the
device geometry.
* If SetTo() reports no media, and GetGeometry() fails, the device geometry
  is now reset as well.
* KDiskDeviceManager::_ScanPartition() no longer unmarks the partition busy;
  this is now done by the caller, and done independently from the outcome of
  _ScanPartition(). This also fixes the problem that devices with no media
  were never marked unbusy (and thus were ignored subsequently).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22912 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-12 23:20:33 +00:00
Ingo Weinhold 6e122bd99e axeld + bonefish: Missed those changes in the previous commit:
* Added vfs_unmount(), which allows unmounting by dev_t (used by the DDM).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-12 20:54:17 +00:00
Ingo Weinhold b3a5629b9e axeld + bonefish:
* Unmount when uninitializing a partition.
* Finished the media checker implementation, i.e. we rescan when a media
  was inserted and uninitialize when ejected.
* Turned the disk device media checker from a kernel daemon into a thread.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22909 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-12 18:41:36 +00:00
Marcus Overhagen f668d91b37 This hopefully stops BPoligon from corrupting memory.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22887 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 21:23:04 +00:00
Axel Dörfler 3d268eda3d * Extracted file_map API out of the file cache - it's now an optional service
that can be used by file systems.
* Changed the way the file cache works: instead of reading/writing to the
  underlying device directly, it can now be used for any data source, ie.
  also network file systems.
* As a result, the former pages_io() moved to the VFS layer, and can now be
  called by a file system via {read|write}_file_io_vec_pages() (naming
  suggestions are always welcomed :-)). It now gets an FD, and uses that to
  communicate with the device (via its fs_{read|write}_pages() hooks).
* The file_cache_{read|write}() functions must now be called without holding
  an I/O relevant file system lock. That allows the file cache to prepare the
  pages without colliding with the page writer, IOW the "mayBlock" flag can
  go into the attic again (yay!).
* This also results in a much better performance when the system does I/O and
  is low on memory, as the page writer can now finally write back some pages,
  and that even without maxing out the CPU :)
* The API changes put slightly more burden on the fs_{read|write}_pages()
  hooks, but in combination with the file_map it's still pretty straight
  forward. It just will have to dispatch the call to the underlying device
  directly, usually it will just call its fs_{read|write}_pages() hooks
  via the above mentioned calls.
* Ported BFS and FAT to the new API, the latter has not been tested, though.
* Also ported the API changes to the fs_shell. I also completely removed its
  file cache level page handling - the downside is that device access is no
  longer cached (ie. depends on the host OS now), the upside is that the code
  is greatly simplified.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22886 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 21:19:52 +00:00
Ingo Weinhold c9830ce0f5 * KDiskDeviceManager::{Find,Load}DiskSystem() can also find the disk
system by pretty name (not only module name) now.
* _user_initialize_partition() loads the disk system by pretty name.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22880 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 20:30:22 +00:00
Ingo Weinhold 99ed286c94 Patch by Vasilis Kaoutsis: Implemented sigrelse().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22865 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-09 23:23:46 +00:00
Stefano Ceccherini afd60167e3 Reverted r21395. Many people didn't like the change, and after all I too
think it wasn't a really good idea. The alignment of shortcut 
charachters and submenu symbols could use some more work, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22849 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-07 09:38:55 +00:00
Ingo Weinhold 0a1968cf8f Patch by Vasilis Kaoutsis: Implemented sighold().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22846 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-06 22:11:43 +00:00
Axel Dörfler 6405549873 No wonder no one noticed that the silicon_image_3112 driver was broken; I
actually forgot to commit the changes I made to the ide_adapter...
* the IDE bus master command/status stuff is now used via flags; it's no
  bitfield anymore.
* Changed a few constants to upper case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22842 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-06 02:26:44 +00:00
Ingo Weinhold 7b45b55be1 * Added back and partially reimplemented the
K{Disk,File,Partitioning}System writing methods. It is now required
  that the caller has marked the concerned partitions busy, hence we can
  (read-)access them without needing a lock. The module interfaces will
  will be changed to take advantage of the fact as well. The methods take a
  disk_job_id instead of a KDiskDeviceJob* now, though I haven't quite
  decided, whether we need it at all or just want to add a special
  handling in the cases where notifications during the operation make
  sense.
* Reimplemented the disk device write support syscalls (save
  _user_move_partition() for which other module hooks are needed). They
  call the KDiskSystem methods, now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22832 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-05 00:42:47 +00:00
Ingo Weinhold 2128ea4f31 Added IsBusy(bool) version, which optionally also checks the
descendants.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22831 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-05 00:30:14 +00:00
Ingo Weinhold 7154471870 Removed inline versions of sigismember(), sigaddset(), and sigdelset(). They
weren't in sync with the non-inline version in libroot anymore, and aren't
really performance-critical anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22827 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-04 17:43:44 +00:00
François Revol 1a8a803ee1 WIP
Abstracted cpu and mmu version dependant stuff (compatibility where are you) into ops like func arrays.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22821 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-03 21:02:03 +00:00
Ingo Weinhold 53715fe060 * Got rid of the B_PARTITION_DESCENDANT_BUSY flag.
* Added CheckAndMarkBusy() and UnmarkBusy() methods to KPartition.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22801 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-02 00:29:46 +00:00
Ingo Weinhold 8354dac78e Folded KPhysicalPartition into KPartition. Removed the notion of shadow
partitions from the disk device manager.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22800 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-01 23:36:21 +00:00
Ingo Weinhold 327887959e * Moved partition scanning back to KDiskDeviceManager. ATM only
synchronous scanning is supported.
* Removed the disk device job support from the disk device manager.
* K{Disk,File,Partitioning}System:
  - Remove querying and validation methods.
  - Commented out the modification methods until their fate is decided.
* Removed obsolete _user_get_partitionable_spaces().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22799 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-01 22:41:22 +00:00
Ingo Weinhold 74fa73bac6 Patch by Vasilis Kaoutsis: Implemented sigignore(). Small changes by myself.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22789 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-01 18:03:36 +00:00
Stephan Aßmus 6a0f79107d * fix the build of the libbe_test target
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22786 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-01 15:03:58 +00:00
Ingo Weinhold 300868ce27 * Removed no longer needed disk device related syscalls
(_kern_{supports,validate}_*(), etc.).
* Adjusted the prototypes of the disk device modification syscalls.
  Commented out their implementations for the time -- they'll mostly
  have to be rewritten completely.
* Implemented the userland disk device jobs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22781 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-31 21:16:22 +00:00
Axel Dörfler 61291964c3 The intel_extreme driver now finally works with the i965 chipset;
acceleration works fine, but overlay doesn't - that's next on my list.
Turns out the i965 differentiates between RGB-32 and RGB-32-alpha, and 
didn't like trying to use the latter as display mode (the i865 didn't 
care at all)... finding that took me *way* too long, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-31 19:23:59 +00:00
Ingo Weinhold 3ca9267ce3 * The BMutablePartition setters adjust the change flags accordingly.
* PartitionDelegate::Uninitialize() uninitializes the mutable partition. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22779 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-31 17:02:52 +00:00
François Revol 6b3123cf2f Add the Amiga and Atari platforms (sorry to force a rebuild :p).
Mac is there already (TODO: rename some stuff from apple to mac).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22770 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-30 13:59:48 +00:00
Ingo Weinhold 25ab0d1a4a * Fixed typos in the disk device job constants.
* Added missing job classes (they don't do anything yet, though) and
  completed the implementation of the job generator.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22767 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-29 23:51:02 +00:00
Stefano Ceccherini 795a2888e7 Rewrote PopUpMenu.h and MenuBar.h. Adjusted source files accordingly.
Added license to SeparatorItem.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22759 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-29 10:40:16 +00:00
Stephan Aßmus d5f662106a * define more classes for non-selfcontained R5 headers... maybe I would have
to define even more if I did a clean build


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22746 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-26 23:43:55 +00:00
Jérôme Duval 295059869b updated libpng to 1.2.22
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22740 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-26 18:09:44 +00:00
François Revol a790413138 More regs in m68k iframe.
Removed DOS CR.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22735 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-26 14:28:54 +00:00
Axel Dörfler 662e5c8ce4 Fixed warnings when building something for BeOS.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22732 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-26 12:53:25 +00:00
François Revol 0e26d146ec tag warnings with M68K:
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22717 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-25 12:43:05 +00:00
Stefano Ceccherini 2e46156d87 forgot that too...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22714 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-25 11:55:00 +00:00
Stefano Ceccherini 09d6e976df Looks like I deleted too much... copied Region.h back from the os
folder, updated Region.cpp and RegionSupport.cpp accordingly. Also 
implemented empty BStatable destructor. Needed, since it's virtual now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22713 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-25 11:46:06 +00:00
Stefano Ceccherini be9e376352 Removed most (unused) interface kit headers from the build folder
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22712 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-25 11:36:47 +00:00
Stefano Ceccherini acaf7a73ff Copied the updated Statable.h to the build folder, remove unneeded def
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22711 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-25 10:31:57 +00:00
Stefano Ceccherini 1ffa548338 Copied the update Screen.h to the build folder
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22710 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-25 10:31:01 +00:00
François Revol 829748d89d Fix flushing the ATC, add flushing icache.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22709 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-25 02:24:38 +00:00
François Revol 5d31dc1586 Grmbl, wrong type!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22708 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-25 01:45:09 +00:00
François Revol 2f6b2f8612 missing semi-colon.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22707 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-25 01:41:28 +00:00
François Revol ee75f8527b This should handle TLB flushing on m68k (it's called ATC though).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22706 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-25 00:45:01 +00:00
François Revol 8848d5972f Fix cast.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22705 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-25 00:44:09 +00:00
François Revol 82a9fd6a48 Add m68k to the big endian family.
Remove DOS CR from some files.
Add setjmp stuff for m68k (unfinished).
Moved arch specific stuff out of signal.h to arch/<arch>/signal.h
Added m68k vreg for signal.h (unfinished).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22703 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-25 00:36:36 +00:00
Ingo Weinhold 6bd2f399e8 Patch by Vasilis Kaoutsis: Implemented killpg().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22697 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-24 13:49:42 +00:00
François Revol d40bcaab8e m68k code.
We will use SRP (supervisor root pointer) register to hold the current thread pointer.
Its use by the pmmu is optional and I don't plan on using it.
There are 32 other bits left.
Wonder if weshouldn't use it for system_time() instead... will see, but there are no other usable regs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22696 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-23 23:48:02 +00:00
François Revol 1bd446cc44 Debugger support. Unfinished.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22695 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-23 23:44:47 +00:00
François Revol ae8bc15af5 Some more of m68k. Added errors where ports should add stuff.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22694 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-23 23:43:11 +00:00
Axel Dörfler 13ca2d942d Patch by Vasilis Kaoutsis - thanks!:
* Rewrote TextView.h
* Renamed all private methods to have the underscore prefix.
And also:
* Whitespace and line width cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22688 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-23 20:44:17 +00:00
Oliver Ruiz Dorantes a21cc12768 Mistake at commiting before.The listener will not a friend statement for the RemoteDevice class
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22681 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-23 17:33:22 +00:00
Oliver Ruiz Dorantes 74a52b95c2 -I bet for now is the last public class DiscoveryListener:BLooper\n-Fix RemoteDevice... friendship
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22679 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-23 17:25:38 +00:00
Axel Dörfler c76695a275 * The C "struct list" and the C++ DoublyLinkedList implementations had mixed
next/prev link order - that messed up the DoublyLinkedListCLink adapter.
* Since it's more likely that someone messes with the C version, the C++ version
  now uses the same order than that one.
* This fixes a bug when TCP's BufferQueue tried to iterate over a list, messing
  up its integrity.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22676 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-23 10:37:41 +00:00
Oliver Ruiz Dorantes 7044da5546 Fix coding style and add more classes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22667 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-22 17:51:59 +00:00
Stefano Ceccherini 3c5bd34432 Rewrote OptionPopUp.h and OptionControl.h
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22663 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-22 14:59:04 +00:00
Stefano Ceccherini 37b83b1a2d The system palette was defined in two files. Moved to a private header,
included by the two.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22660 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-22 13:44:37 +00:00