Commit Graph

3676 Commits

Author SHA1 Message Date
Ingo Weinhold addece2001 * Fixed incorrect check in condition_variable_interrupt_thread().
Condition variables would never be interrupted.
* ConditionVariableEntry::Add() did not correctly insert the entry into
  the per-thread list of entries (the next link of the previous entry
  was not adjusted), which could leave the entry unnotified when the
  previous entry was notified, thus leaving it in the respective
  condition variable's list after the end of its life time. This should
  fix a crashing bug I rarely encountered.
* Added debug checks in the PrivateConditionVariableEntry
  constructor/destructor that should have helped me to find
  forementioned bug hours earlier, had I been bright enough to realize
  that I didn't include <debug.h> and those KDEBUG guarded checks were
  never executed. :-/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22151 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-02 22:21:26 +00:00
Ingo Weinhold 667f1eeb67 * Added support for setting (hardware) break-/watchpoints in the kernel.
Can be enabled by defining KERNEL_BREAKPOINTS in arch/user_debugger.h
  and will provide the arch_{set,clear}_kernel_{break,watch}point()
  function. Hitting a break-/watchpoint will throw the thread into KDL.
* Finally added a comment, what's the point of
  i386_reinit_user_debug_after_context_switch(), since I wonder every
  time I see it. Should be optimized aways soon.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22150 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-02 22:04:36 +00:00
Ingo Weinhold fed5bce4e3 Made SetTo() deal with the lockable == NULL, alreadyLocked == true
correctly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22142 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 18:00:22 +00:00
Stephan Aßmus a431f44be8 * make the text view layouting more robust, draw the frame around the
text view, ignore the divider for this (application code could layout
  the textview itself, and fDivider might not be maintained)
* change Draw() and TextInput::MakeFocus() accordingly

this fixes the weird placement of text controls in Beam


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22134 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 12:51:59 +00:00
Stephan Aßmus 3a38a48561 * fixed size layout of BMenuBar on BMenuField in fixed size mode
(needs to account for the parts that the BMenuField draws, ie the shadow
  on the right)
* fixed follow mode of BMenuBar in fixed size mode (B_FOLLOW_LEFT_RIGHT)
* don't resize the BMenuField in fixed size mode (endless loop), this should
  be more robust anyways, since this endless loop would be triggered if an
  application tried to manually resize menuField->MenuBar() in auto resizing
  mode
* fixed calculation of the parts that need to be redrawn on resize


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22127 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-30 22:36:14 +00:00
Jérôme Duval bb5ea4eb08 work from JiSheng Zhang : firewire and ohci modules from FreeBSD current, update for fw_raw and fw_control. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22124 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-30 21:59:49 +00:00
Ingo Weinhold 65a7804abe Set default team debug flags to 0. Threads of a team were
unnecessarily stopped, when another thread crashed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22119 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-30 01:10:46 +00:00
Ingo Weinhold 25938e2538 Thou shalt not use spaces in file names.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22114 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-29 23:49:02 +00:00
François Revol fb8d275d43 Move this to media/, seems audio/ is only for old stuff.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22107 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-29 12:31:55 +00:00
François Revol 6505ab3d1b OpenSound's driver API header, for use by OSS media node.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22105 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-29 12:24:29 +00:00
Ingo Weinhold 24bcf55926 * Introduced new job_control_entry structure which, among other things,
is used instead of death_entry for team::dead_children.
* Added team::{stopped,continued}_children, which, analoguously to
  dead_children, are used to track the state of stopped/continued
  children.
* A team does have a job_control_entry, which is allocated at team
  creation time. It will be inserted into the parent's
  {stopped,continued}_children lists as the team's main thread is
  stopped/continued and removed when waitpid() retrieves the child
  state. When the team dies the entry is detached from the team and goes
  into the parent's dead_children list.
* Removed the wait_for_any field from team_dead_children. It was solely
  used to avoid deletion of the contained entries in certain situations.
  wait_for_child() (the waitpid() backend) always deletes an entry now,
  regardless of whether other threads are waiting; that's in
  accordance with the waidpid() specification. wait_for_thread() removes
  the entry only, if the caller is the parent of the respective team.
* Introduced team_set_job_control_state() which performes the job
  control entry transitions between the respective lists and wakes up
  threads waiting in wait_for_child(). It is invoked on team death and
  when the team's main thread receives job control signals.
* Reorganized wait_for_child(). It handles WCONTINUED and WUNTRACED now,
  too. Removed a block that interpreted the supplied ID as thread ID.
* Added missing parts in waitpid().

Job control starts to work, though it seems to have some glitches.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22088 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-28 03:29:14 +00:00
Ingo Weinhold c9e5503e5e Notify*() and Unpublish() acquire the threads lock. So they need to know
whether the lock is already being held.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22087 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-28 02:25:14 +00:00
Ingo Weinhold be8990115c * Base class of InterruptsLocker was accidentially private.
* Added class InterruptsSpinLocker, which disables interrupts and
  acquires a spinlock all in one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22086 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-28 02:23:11 +00:00
Ingo Weinhold ff895459b7 * Replaced the team::dead_children::sem semaphore by a condition
variable. Due to C code including the header I had to turn it from and
  aggregated member to a pointer. I'm very close to starting to convert
  all remaining .c to .cpp files. :-/
* Got rid of the "waiters" field. It was only written, never read.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22084 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-27 20:30:34 +00:00
Ingo Weinhold 4ed7917682 Wait() returns a status_t now, which can be B_OK (condition variable
exists and thread was notified), B_ENTRY_NOT_FOUND (condition variable
not found or Unpublish()ed while waiting), or B_INTERRUPTED
(interrupted by a signal).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22083 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-27 20:17:31 +00:00
Ingo Weinhold ff308b0b49 Condition variables changes:
* Removed left-over commented C implementation.
* It is now possible for a thread to wait for more than one condition
  variable at a time.
* Made waiting for condition variables optionally interruptable.
* Renamed Notify() method to NotifyAll() and added a NotifyOne(), so
  that it is now possible to wake up only one of the waiting threads.
Pretty much untested at the moment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22081 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 23:53:12 +00:00
Marcus Overhagen 402a4a4e7b Set scsi target id limit to 16, was previously hardcoded to 2. Add a node attribute to allow overriding this value.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22071 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 19:57:51 +00:00
Marcus Overhagen c42a837e85 scsi_sim_cookie is just another name for void *
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22067 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 16:55:45 +00:00
Ingo Weinhold 61ca8e04bb * Added a common directory for missing system on BeOS systems.
* Added the old fella <stdint.h>.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22050 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-24 21:05:20 +00:00
Ingo Weinhold 2652981136 Added Supports[Content]Name() methods.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22044 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-22 21:22:29 +00:00
Ingo Weinhold 76a8ec23db * Added disk system flags for whether a partition name and partition
content name are supported.
* Added file_system_module_info::flags (analogously to
  partition_module_info::flags) which indicate which disk device
  features the FS supports.
* Replaced the
  file_system_module_info/partition_module_info::supports_*()
  hooks by a get_supported_operations() hook and for partitioning
  systems additionally a get_supported_child_operations() hook.
* Updated file and partitioning systems accordingly.
* Updated fs_shell accordingly.
* Updated the DDM accordingly. The syscall interface remains unchanged,
  though.
* _user_supports_initializing_partition() also checks whether the parent
  partitioning system is content now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22043 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-22 21:21:30 +00:00
Marcus Overhagen 20c4c9e77e Don't trust the user, and enforce the iovec limit.
Also check for negative positions smaller -1
(as -1 means using current address).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22031 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-21 19:07:10 +00:00
Axel Dörfler b78583734c The client-side implementation of B_NO_POINTER_HISTORY did only work for SetEventMask(),
but not for SetMouseEventMask(). We now track the value of that mask in a dedicated
member variable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22022 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-20 23:24:26 +00:00
Stefano Ceccherini 0e5fe45f13 Removed unused DataBuffer class
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22012 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-19 19:59:09 +00:00
Stephan Aßmus f591e3a0f2 * fix weird Shape op/point allocation
* handle out of memory situations
* don't try to copy (and assign op!) in SetData if opCount/ptCount is 0
-> FontDemo doesn't crash anymore eventually when cycling fonts in outline
mode


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22000 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-17 11:17:29 +00:00
Axel Dörfler a728651f04 Some more work on the signal code:
* get_signal_stack() checked the wrong sig_action field (index is signal-1), also,
  it had an off-by-one error in the stack range check.
* factored out a restart_syscall() function to avoid code duplication
* arch_setup_signal_frame() relied on the fact that vregs and the signal stack code
  is a multiple of 4 bytes in size.
* Fixed sigaction(): it did return the error code directly instead of setting errno.
* signal() actually had a work-around for the broken sigaction()...
* Replaced the sig_func_t typedef with a sighandler_t typedef - this is non-standard
  anyway, but now we're at least compatible with the GNU world instead of introducing
  our own solution (BSD seems to use sig_t here, BTW).
* Removed now unused sigval structure from the header; it should be added again as
  soon as we start supporting it.
* SA_RESETHAND and SA_ONESHOT are the same thing; the former did not work before.
* Made the non-standard SA_* flags refer to the standard ones instead of the other
  way around.
* Added a test application for various signal features - works fine under Haiku,
  tested also under Linux and BeOS (the latter fails as it does not support SA_RESTART).
  More tests should be added, though.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21999 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-17 11:01:09 +00:00
Axel Dörfler 0b70ea5992 * Implemented sigaltstack() and set_signal_stack(), thus closing bug #1401.
* On exec() the new function thread_reset_for_exec() is called which clears the signals
  and cancels an eventually set alarm. Both things weren't done before...
* Some minor cleanups.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21989 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-16 18:01:47 +00:00
Axel Dörfler f1cea0512b Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21986 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-16 17:05:14 +00:00
Stefano Ceccherini 422fadc829 Moved the dummy table local to the PicturePlayer::Play() function since,
as Marcus pointed out, having it outside wasn't thread safe. Moved 
PicturePlayer into the BPrivate namespace.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21982 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-16 14:40:03 +00:00
Axel Dörfler dfd5242e7f Even though Korli beat me, I've updated the posix_memalign() function to be more standards
compliant:
* it now checks the alignment is a multiple of 4 (needs to be changed for 64 bit architectures)
* it no longer sets errno.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21975 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-16 10:04:44 +00:00
Jérôme Duval bf7beb500c added posix_memalign()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21974 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-16 09:19:56 +00:00
Stefano Ceccherini 46b4e48998 Added some debug output to PicturePlayer. Since checking the table size for every op is very slow, now we do that only at the beginning, and use a custom op table if needed. The best case (which is the one used when drawing a picture with BView::DrawPicture()) is very fast since it only requires one check.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21972 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-16 09:14:03 +00:00
Stephan Aßmus 86d8381f5f * fixed libbe_test build, I guess this was caused by Ingo's recent change
to the header path variable?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21965 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-15 18:52:50 +00:00
Axel Dörfler b73648647d * Fixed the TODO added by Ingo in r21957: locking the application didn't even make any
sense. Instead, we now lock its app_server connection only. The deadlock as exposed
  by starting Icon-O-Matic twice is now gone, at last.
* Fixed the TODO added by Ingo in r21953: moved the thread/handler renaming code in a
  dedicated method _SetName() which is now called from _InitData() and SetTitle(); the
  "w>" is no longer lost.
* Unlike the BeBook states, BMessageQueue::RemoveMessage() is indeed not supposed to
  delete the message it removes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21959 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-15 01:06:20 +00:00
Stefano Ceccherini 253d42a602 Implemented SetClipping op, but it's not working yet (looks like it's
never written into the data stream)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21947 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-14 15:21:15 +00:00
Ingo Weinhold 2a39e9e44e Made the remote_disk_server build under R5.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21945 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-14 14:54:09 +00:00
Stefano Ceccherini feb557a6d1 Implemented WriteSetFontFamily() and WriteSetFontStyle(). Only the
server side functions are missing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21941 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-14 09:17:21 +00:00
Stefano Ceccherini 37033892c5 Implemented SetPattern op. Reduced the buffer size to 4096 again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21937 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-14 06:39:37 +00:00
Ingo Weinhold d23c482278 Patch by Łukasz 'Sil2100' Zemczak: Made BStatusBar layout friendly.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21936 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-13 23:34:06 +00:00
Axel Dörfler f9a5b215cd Committed patch by Euan Kirkhope to improve routing problems with Radeon cards;
this should fix bug #1293.
I've tested it here on two machines, one works better now, the other stayed the
same (Radeon 9250, and a laptop FireGL (id 4c66) version). This apparently also
fixed bug #1394.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21930 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-13 17:22:32 +00:00
Stefano Ceccherini 4d47fee5cd Renamed some BPicture private functions, small cleanups.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21927 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-13 15:28:31 +00:00
Stefano Ceccherini 690c7474a4 Implemented BPicture's SetPenLocation() op, also nested
AppendToPicture() (but still doesn't work :( ). Moved some functions 
around in PictureDataWriter.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21925 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-13 14:07:12 +00:00
Stefano Ceccherini ed5de868df Implemented the following BPicture ops: fill region, stroke/fill arc,
stroke/fill polygon, stroke/fill bezier. some work towards drawing of 
nested pictures.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21918 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-13 07:20:43 +00:00
Michael Lotz 154860eb4b Port endian conversion fixes to build version of BMessage.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21904 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-12 11:47:11 +00:00
Michael Lotz 0127fb779d * Respect endiannes for item lengths inside swapped BMessages
* Also swap the flattened size when creating the read buffer
* Define specialized byte_swap()s for unsigned types too so that type_code and the like get swapped correctly

This should fix bug #1371.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21901 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-12 10:32:21 +00:00
Stephan Aßmus 8c1a98d8d4 * there was a complete mixup of "drawing origin" and "scrolling offset" in the
BView implementation (client side)
* introduced some private methods for _Convert*(BPoint*) methods which avoid
  doing the check_lock() thing in the recursion, also Origin() would likely
  have communicated with the app_server all the time, since the origin bit
  was needlessly invalidated, so some speedup should be achieved
* this should fix ticket #98


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21900 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-12 09:52:25 +00:00
Jérôme Duval 0a29487db5 fixed gcc4 build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-11 19:53:20 +00:00
Ingo Weinhold 2529455101 Revised the AVLTreeMap code:
* Pulled the actual tree code into a non-templatized class AVLTree to
  reduce the amount of code generated each time the template is
  instantiated.
* Changed the iterator interface to Java-style.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21892 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-11 14:57:25 +00:00
Ingo Weinhold 1873b4b37e Give the runtime loader a chance to reinit its semaphore after fork().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21886 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-11 00:14:26 +00:00
Jérôme Duval 6a2b62ec79 updated freetype to 2.3.5
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21879 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-09 21:33:28 +00:00
Jérôme Duval a9fa028de4 updated mesa to 7.0.1
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-09 21:12:30 +00:00
Ingo Weinhold 279c6b76dc * Use condition variables when waiting for busy pages or busy caches.
* Removed a few instances where the page state was set busy directly after 
  allocating it. This is a no-op, since a page is always busy after 
  allocation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21875 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-09 20:08:25 +00:00
Ingo Weinhold 227402f2bf Added simple condition variables to the kernel. They are a relatively
cheap means to block threads until notified explicitely.
threads 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21874 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-09 20:03:17 +00:00
Ingo Weinhold bce7e9f695 * Added AutoLocker instantiations IterruptsLocker (disables/restores
interrupts) and SpinLocker (acquires/releases spinlocks).
* Adjusted Jamfiles of components that used <util/AutoLock.h> but didn't
  add all header directories required now (<int.h> was added).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21873 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-09 19:47:22 +00:00
Axel Dörfler eaad52e8d7 Now uses the cache stack trick for a cheaper check_lock() version as suggested by stippi.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21863 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-08 22:43:52 +00:00
Michael Pfeiffer 3f4090c83d * open 'Add printer dialog' when 'addp' message is sent to Printers preflet
* style changes


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-08 20:32:46 +00:00
Stephan Aßmus 7f8d0be06f * fix ticket #1365, isinf(x) -> isinf(value)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21849 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-08 09:14:38 +00:00
Axel Dörfler 5af1dda793 bonefish+axeld:
* Removed the ref_count from vm_areas. You now always need to have the address
  space locked (read or write, depending on what you do) when dealing with
  areas.
* Added helper classes for locking the address space: AddressSpace{Read|Write}Locker,
  and MultiAddressSpaceLocker which can lock several spaces at once and makes
  sure no dead locks can happen.
* resize_area() is now using the MultiAddressSpaceLocker instead of no locking
  at all; ie. it should now be safely to use.
* Disabled transfer_area() for now; it will be changed to work like an atomic
  clone_area()/delete_area(), that is, it will hand out a new ID for the
  transfered area.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21848 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-07 21:46:58 +00:00
Ingo Weinhold cf1539e1a3 Added debug macros ASSERT_ALWAYS_PRINT and ASSERT_PRINT which take
additional parameters that are fed into a dprintf() before panic() is
invoked.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21838 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-06 17:35:57 +00:00
Stephan Aßmus 94a48ae276 * use a different message code for DrawString() with escapement delta
and DrawString() without
* this change also includes adding the penlocation to the shape to-screem
  coordinate conversion (temporarily breaks shape rendering, will be fixed
  in next commit)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21821 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-04 11:22:47 +00:00
Stephan Aßmus a4dcea7870 * remove dos newlines
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21818 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-04 11:16:22 +00:00
Jérôme Duval acbe544d74 to please gcc4
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-03 19:02:59 +00:00
Jérôme Duval 84324de507 added an empty implementation of confstr()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21810 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-03 18:13:55 +00:00
Stephan Aßmus 2222864eed * complete overhaul of the font/glyph caching
* the previous AGG implementation is superfluous
* the new implementation is based on that one, but in a way that allows
  read/write locking to the list of cache entries (fonts) as well as
  read/write locking to the cached glyphs per individual font cache entry
* new GlyphLayoutEngine.h, which is to be the central place for layouting
  glyphs along the baseline.
  It handles the locking for getting the font cache entries.
  It works by giving it a template class GlyphConsumer which does the
  actual work.
* changed AGGTextRenderer to use the new font cache
* changed ServerFont::StringWidth(), and the bounding box stuff to use it
* changed DrawingEngine, it doesn't need the global font lock anymore
* our BFont thought that GetBoundingBoxesAsGlyphs and GetBoundingBoxesAsString
  is the same, which of course it isn't, hence the two separate functions...
  AsGlyphs just gets the bounding box of each glyph in a string, not treating
  the string as an actual word
  AsString adds the offset of the glyph in the word to the bounding box
* changed ServerProtocol.h accordingly for the different bounding box meaning


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21797 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 19:10:38 +00:00
Stephan Aßmus 075430faf4 * put some more useful utility classes into "shared". I tried to make sure
that OpenHashTable.h does not collide with all the other places that this
  is used, it seems everything still builds fine. Most problematic could be
  the OpenHashTable.h at kernel/util, but it seems it the target using
  that are not affected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21792 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 16:28:34 +00:00
Ingo Weinhold 9e12e9a72e * Added mapping of dup() in the FS shell.
* Adjusted the FS initialize() hook to have FD and partition_id
  parameters like the other hooks instead of the partition path.
* Adjusted initialization in BFS accordingly.
* Implemented the FS initialization method in KFileSystem.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21788 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 12:43:49 +00:00
Axel Dörfler edb15b5565 bonefish+axeld:
* Simplified the notification framework: removed the updater stuff completely;
  it was only there to account for some peculiarities of the node monitor which
  we now solved differently.
* NotificationListener no longer includes a doubly linked list link for convenience;
  it might want to listen to more than just one service.
* NotificationService cannot have an abstract destructor.
* Changed the _user_stop_watching() syscall to mirror the Be API; ie. it's no
  longer possible to just remove some flags separately, just to stop listening
  completely.
* Adapted the node monitor implementation to live in the NodeMonitorService class
  that uses the new notification framework.
* Removed the public kernel node monitor API - it wasn't useful that way since you
  couldn't do a lot with the KMessage in the kernel without using a private API.
  Now you will have to use the (private) notification manager to use the node monitor
  from inside the kernel. At a later point, we might introduce a public API for that,
  too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-01 14:48:44 +00:00
Axel Dörfler 5102d49461 * Added the default constructor to the Iterator class.
* Added a Current() method to the same class that returns the current element again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21779 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-01 14:28:50 +00:00
Jérôme Duval dc1e5b5351 work from JiSheng Zhang : fw_raw with firewire headers from FreeBSD current. Thanks!
clean up


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21775 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-31 20:15:25 +00:00
Axel Dörfler a898ee19d6 Ahem... build fix. Forgot that there were some last minute changes that shouldn't have been part of the commit...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21773 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-31 17:17:51 +00:00
Axel Dörfler bec0386d82 bonefish+axeld: Implemented a robust notification framework for the kernel.
Will be used for node monitoring and other stuff, too (like the Registrar or the
VM low memory handler).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21768 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-31 16:23:40 +00:00
Axel Dörfler 2851dbad53 * Moved Referenceable.cpp to src/kits/support (private libbe API), and its header to
private/shared.
* Made AddReference() and CountReferences() inlines.
* The registrar is now using the private Referenceable version in libbe.so.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21767 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-31 16:20:37 +00:00
Axel Dörfler 8405223037 axeld+bonefish: Got rid of the ParentType in the HashTableDefinition; it doesn't really
belong there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21766 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-31 16:14:58 +00:00
Stefano Ceccherini 60be800755 Added a wrapper method to instantiate_object(), where we catch any
possible exception thrown from the constructor called by the function 
itself, for safety. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21750 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-30 14:21:41 +00:00
Axel Dörfler 4bef3723a1 * Followed Ingo's suggestion and send the message manually in the runtime loader;
therefore, we could remove the ugly defines from KMessage again, and compile it
  with KMESSAGE_CONTAINER_ONLY.
* Added KMessage::SetDeliveryInfo() to be able to send messages with a correct
  header.
* Fixed a bug in KMessage::SendTo() that would not send the senderTeam when passing
  a negative value for the parameter, but override it when passing in a valid
  value.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21740 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-29 21:36:49 +00:00
Ingo Weinhold 04ed91ac9c Added copy constructor and assignment operator.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21729 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-28 14:56:02 +00:00
Ingo Weinhold d86af8ce27 * Style cleanup.
* Moved method documentation from headers to source files.
* Fixed small problems (memory leaks, unsafe string duplication,...).
* Added TODOs where I spotted problems.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21721 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-27 16:32:47 +00:00
Ingo Weinhold 2dc6403ddc Addition of write support to the disk device manager. Courtesy of Tomas
Kucera and Jan Matejek.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21719 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-27 12:12:35 +00:00
Axel Dörfler 74c0424a43 * Added a mechanism to retrieve a BMessage with eventual error descriptions
for _kern_load_image().
* Added KMessage to the runtime_loader (a bit hacky, though) - it will use
  it to deliver the above mentioned functionality.
* load_dependencies() did return the wrong status code in case a library
  was missing; now it returns B_MISSING_LIBRARY.
* load_dependencies() will now try to load all dependencies when a report
  message is requested; therefore, all missing libraries are listed.
* Renamed uspace_program_args to user_space_program_args.
* The kernel filled in various members of the user_space_program_args structure
  unsafely, ie. was not using user_memcpy().
* Renamed some local variables in team.c to better fit our style guide (ie.
  uargs to userArgs).
* Changed Tracker to use the new _kern_load_image() variant on Haiku to retrieve
  and report all missing libraries. This fixes bug #1324.
* Adapted kernel_cpp.cpp to the runtime loader as well; the latter will now
  compile with _LOADER_MODE defined.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21715 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-27 02:32:19 +00:00
Philippe Houdoin f4ac9a9693 DPC module interface is not binary compatible with Be's own DPC.
Make our DPC named differently to avoid this confusion.
Detected while testing our ACPI (which needs our DPC) under 
R5...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21703 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-25 23:44:00 +00:00
Axel Dörfler de52a13af7 Unconditionally enable all ASSERTs in the kernel for now; should obviously
be turned off for non-development releases later :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21691 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-23 00:59:30 +00:00
Axel Dörfler b69e38d84c * Added a small intro to what this file is about.
* Added a socklen_t typedef.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21690 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-23 00:57:45 +00:00
Stephan Aßmus 38287e02af * completed my changes to DrawState handling, the current DrawingState
of the active ViewLayer is now always mirrored in the Painter instance
  of a ServerWindow, so that it doesn't need to be synced on every drawing
  command, this was previously incomplete for font handling
* removed the DrawState parameter from all the DrawingEngine functions
* adjusted ServerWindow and ServerPicture accordingly
* made sure that string related functions used by non-drawing related
  parts (ServerApp, Decorator) don't interfere with the current drawing
  state
* moved AS_SYNC handling from _DispatchViewMessage to _DispatchMessage,
  it is actually a window message and doesn't require fCurrentLayer to
  be valid
* fixed bug #1300, fCurrentLayer was not updated when a ViewLayer was
  deleted by client request which happened to be fCurrentLayer (I am now
  handling it so that the parent becomes the current layer, could be
  wrong)
* AGGTextRenderer is no longer using it's own scanline, which should save
  a few bytes RAM, the Painter already had such an object
* StringWidth() in AGGTextRenderer is now taking the escapement_delta into
  account
* Painter::StrokeLine() doesn't need to check the clipping as much, since
  that is already done in DrawingEngine
* if a ServerWindow message is not handled because fCurrentLayer is NULL,
  a reply is sent in case the messages needs it (client window could
  freeze otherwise, waiting for the reply for ever)
* removed unused AS_SET_FONT and AS_SET_FONT_SIZE
* added automatic RGBColor -> rgb_color conversion to RGBColor.h
* minor cleanup for 80 char/line limit



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21685 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-22 19:48:27 +00:00
Ingo Weinhold 6d1c68155a axeld + bonefish:
* More conditional debug code (wrt page transitions between caches).
* Replaced debugger command cache_chain by a nicer cache_tree.
* While handling a soft fault: When we temporarily unlock a cache, it
  can theoretically become busy. One such occurrence is now handled
  properly, two more panic() ATM, though should be fixed.
* When merging caches, we do now always replace a dummy page in the
  upper cache, not only when the concurrent page fault is a read fault.
  This prevents a page from the lower (to be discarded) cache from still
  remaining mapped (causing a panic).
* When merging caches and replacing a dummy page, we were trying to
  remove the dummy page from the wrong cache (causing a panic).

The Haiku kernel seems now to run shockingly stable. ATM, we have more
than two hours uptime of a system booted and running over network. We
didn't manage to get it down by fully building Pe, downloading, unzipping,
and playing with various stuff. Someone should finally fix all those app
server drawing bugs, though (hint, hint! ;-)).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21672 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-19 22:52:23 +00:00
Stephan Aßmus 93a30169f3 * fix the build, forgot to commit this...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21667 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-19 17:22:53 +00:00
Stephan Aßmus ed2254308b * just realized a bug already when reading over the commit log...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21666 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-19 17:16:54 +00:00
Stephan Aßmus 582da17386 * complete reimplementation of BRegion and it's backend
I "ported" the region implementation from XOrg to work on BRegion data.

This resulted in pretty much the same code structure as before, with 
RegionSupport.cpp containing the messy details. Only now it _is_ really messy
from a code beauty point of view. I didn't exactly feel like cleaning it
up right now... but I guess I will have to.

So what does this mean - our BRegion implementation was very slow (no offense!),
and on top of that it scaled very badly with more and more rects. The new
implementation seems to be on par with the very fast R5 implementation and
the data looks exactly the same too. BRegion is very performance critical
for the app_server, and I cannot wait to try this on my slow computer...

Some changes are noteworthy: The right and bottom coordinates of
BRegion internal data are now exclusive! I inherited that from the
XOrg implementation and didn't feel like changing the code, seeing it
is probably tested quite well. The conversion is handled transparently.

Secondly, constructing a BRegion with just one rect is not invoking
malloc anymore for the member data, this makes it much more efficient
to use temporary BRegions with just one rect, both externally and internally
in the BRegion implementation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21665 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-19 17:06:28 +00:00
Ingo Weinhold aeb67bdb8f Increased kernel stack size by another page. The network boot is more
stack hungry and would previously hit the stack limit and thus cause a
double fault. Hopefully we'll be able to reduce the stack foot print at
some time.
PXE boot does now fully work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21663 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-19 14:03:49 +00:00
Ingo Weinhold 16f392da37 Missing in the previous commit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21656 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-19 13:33:41 +00:00
Axel Dörfler 58f6e8e5e4 * Merged vm_cache_ref and vm_cache to a single structure (Axel & Ingo).
* Renamed vm_cache.c to vm_cache.cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21642 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-18 00:16:27 +00:00
Michael Lotz 7ca97e3548 Patches by Salvatore Benedetto to fix changes made by me and also the underlaying problem that caused high CPU usage in the isochronous finisher thread. Also includes patches to support isochronous support through USBKit / usb_raw. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21636 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-17 20:00:53 +00:00
Jérôme Duval d57634f732 the keymap is now saved when key locks or key modifiers are changed
this fixes bug #1282


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21625 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-16 18:40:32 +00:00
Jérôme Duval 0de9b61d51 updated mesa to 7.0
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21622 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-15 22:28:49 +00:00
Jérôme Duval 2ff0a95e11 work from JiSheng Zhang : fwcontrol with firewire headers from FreeBSD current. Thanks!
clean up


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21616 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-15 17:43:02 +00:00
Ingo Weinhold 9e8dc2a9bb [Sorry, couldn't split this one up any further.]
* Images preloaded by the boot loader had to be modules to be of any use
  to the kernel. Extended the mechanism so that any images not accepted
  by the module code would later be tried to be added as drivers by the
  devfs. This is a little hacky ATM, since the devfs manages the drivers
  using a hash map keyed by the drivers inode ID, which those drivers
  obviously don't have.
* The devfs emulates read_pages() using read(), if the device driver
  doesn't implement the former (all old-style drivers), thus making it
  possible to BFS, which uses the file cache which in turn requires
  read_pages(), on the device. write_pages() emulation is still missing.
* Replaced the kernel_args::boot_disk structure by a KMessage, which can
  more flexibly be extended and deals more gracefully with
  arbitrarily-size data. The disk_identifier structure still exists,
  though. It is added as message field in cases where needed (non net
  boot). Moved the boot_drive_number field of the bios_ia32 platform
  specific args into the message.
* Made the stage 1 PXE boot loader superfluous. Moved the relevant
  initialization code into the stage 2 loader, which can now be loaded
  directly via PXE.
* The PXE boot loader does now download a boot tgz archive via TFTP. It
  does no longer use the RemoteDisk protocol (it could actually be
  removed from the boot loader). It also parses the DHCP options in the
  DHCPACK packet provided by PXE and extracts the root path to be
  mounted by the kernel.
* Reorganized the boot volume search in the kernel (vfs_boot.cpp) and
  added support for network boot. In this case the net stack is
  initialized and the network interface the boot loader used is brought
  up and configured. Since NBD and RemoteDisk are our only options for
  net boot (and those aren't really configurable dynamically) ATM, the
  the boot device is found automatically by the disk device manager.

Booting via PXE does work to some degree now. The most grievous problem
is that loading certain drivers or kernel modules (or related activity)
causes a reboot (likely a triple fault, though one wonders where our
double fault handler is on vacation). Namely the keyboard and mouse input
server add-ons need to be deactivated as well as the media server.
A smaller problem is the net server, which apparently tries to
(re-)configure the network interface we're using to boot, which
obviously doesn't work out that well. So, if all this stuff is disabled
Haiku does fully boot, when using the RemoteDisk protocol (not being
able to use keyboard or mouse doesn't make this a particular fascinating
experience, though ;-)). I had no luck with NBD -- it seemed to have
protocol problems with the servers I tried.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21611 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-15 02:10:15 +00:00
Ingo Weinhold 0274089508 Never include anything in an extern "C" block.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21607 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-15 00:35:10 +00:00
Ingo Weinhold 3532662e0c Added RemoveLeaf() leaf method. Very handy for recursive directory
iteration code using a single KPath object.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21606 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-15 00:34:17 +00:00
Ingo Weinhold dad631290c * Made header includable by C code. In this case a KMessage structure
with the same size as the class is defined.
* The SetTo() methods do now accept an unspecified (negative) bufferSize
  in case of being told to initialize from the given buffer.
* Added handy Get*() methods returning a field element value or a
  supplied default value, if the field element doesn't exist.
* Added also handy Set*() methods setting the value of first element of
  a field, i.e. adding it, if it didn't exist before, otherwise
  replacing the old value. Only for fixed size types.
* Moved _FindType() inline template method into the header.
* Made the source file fit for use in the boot loader. If the macro
  KMESSAGE_CONTAINER_ONLY is defined, the message sending/receiving part
  is omitted.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21605 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-15 00:32:37 +00:00
François Revol 60076b7199 Official place for socket.h is sys/
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21598 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-14 09:26:22 +00:00
Jérôme Duval 5d5a6848b5 added printf format attributes for gcc
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-11 18:55:27 +00:00
Ingo Weinhold 5519ed578c Added AutoDeleter::Get().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21582 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-07 01:41:55 +00:00
Axel Dörfler b463849f4d StorageKit.h still included the Alias.h header file I removed with the previous commit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-06 12:52:01 +00:00
Axel Dörfler 70fa61adbb * Removed the _IMPEXP* stuff from the headers Ingo clearly identified as ours.
* Removed storage/Alias.h as that stuff isn't even available on BeOS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21576 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-06 10:35:17 +00:00
Axel Dörfler d2d753669d * Renamed "EFI GUID Partition Table" to "EFI GUID Partition Map" to be consistent
with the other partition types.
* Added kPartitionTypeEFI to the constants.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-05 19:41:47 +00:00
Marcus Overhagen ca39427c4e cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21569 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-05 16:39:38 +00:00
Axel Dörfler 7a1b4ef3fd Obviously forgot to commit these; they were part of the mount_id/vnode_id to dev_t/ino_t
conversion.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21568 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-05 14:48:16 +00:00
Axel Dörfler f9d99406ae Fixed build under Dano (and probably Zeta, too); our headers used entry_ref resp.
BDirectory without declaring it first. Since that's an actual bug, I made the
changes in the Haiku headers, and copied them back to the build headers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21562 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-04 23:20:05 +00:00
Axel Dörfler 93a78ecaa4 * Adapted the path of "login" - eventually, telnetd should just use the standard
$PATH, though.
* Telnetting into Haiku is now finally working as expected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21559 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-04 22:11:24 +00:00
Stefano Ceccherini 99584ef9a2 Added _Show/_HideCaret() and used them in place of more bug-prone code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-04 20:20:09 +00:00
Ingo Weinhold d1e58a8ab0 Undefine ENOATTR. We redefine it below.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21545 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-03 14:15:15 +00:00
Stephan Aßmus c1071005c9 * moved R3 audio driver interface definition to private headers along
with R3MediaDefs.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21535 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-01 13:09:27 +00:00
Axel Dörfler eef8417e27 * Added (non-working) EFI module to the boot loader and its test application.
* Fixed a warning in efi_gpt.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-30 15:31:01 +00:00
Michael Lotz da0f338e87 * Ported over a simplified version (no message sending) of the current BMessage implementation to the build libbe
* Also ported over the new MessageAdapter class
* Removed old BMessage implementation prototypes that apparently were left in the private folder

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21515 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-27 20:33:51 +00:00
Michael Lotz 5dc45eb4fe * Unified handling of different BMessage formats into MessageAdapter.cpp
* Removed r5_message.cpp and dano_message.cpp accordingly
* Also moved out KMessage handling from Message.cpp to MessageAdapter.cpp
* Fixed some minor style issues in Message.cpp

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21514 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-27 20:22:53 +00:00
Axel Dörfler b418398455 * Removed _GetWindowList()
* _WindowAt() and _CountWindows() now have an individual version of that
  code which should be magnitudes faster.
* _WindowQuitLoop() no longer handles hidden windows specially - instead,
  it now walks the window list in the correct direction which should fix
  the issues.
* Also, it now uses WindowAt() and thus has an up-to-date view of the
  window list (it will no longer ignore new windows).
* And finally, it will no longer dereference an unsafe pointer (for
  BWindow::IsFilePanel()).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21505 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-25 23:38:45 +00:00
Michael Lotz ac9d119566 Commiting patch by Salvatore Benedetto. This adds isochronous handling to the USB bus manager and enables inbound isochronous support in the UHCI driver. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21503 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-25 19:51:12 +00:00
Axel Dörfler ca13bd31a7 * The Deskbar tray icon menu "Check Mail" and the status window "Check Now" button
are now only enabled if there are any inbound accounts.
* BMailSettings::StatusWindowFrame() now returns some useful defaults.
* Minor cleanup.
* The MDR kit needs some serious overhaul before it can be part of R1.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21493 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-22 00:15:17 +00:00
Axel Dörfler 4976138306 * Korli renamed the driver, but forgot to let the driver ask for the new accelerant name.
* Added a TRACE_S3SAVAGE macro that turns on debug output - should be set conditionally
  if DEBUG is defined (see DriverInterface.h), but is currently always on, as requested
  by Gerald.
* Some minor style fixes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-21 23:38:53 +00:00
Axel Dörfler 245aecda8a Got rid of vnode_id and mount_id, replaced with ino_t and dev_t.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21485 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-21 19:50:57 +00:00
Axel Dörfler 0cb94db539 Ingo and I fixed a couple of VM bugs in a late night debugging session:
* vm_copy_on_write_area() now does no longer overwrite the ref_count, but keeps
  it's reference to the cache until it has unlocked it.
* It now also locks its reference from the start, preventing any other thread
  to interfere.
* vm_cache_remove_consumer() now detects if it has to remove a foreign busy
  page itself in order to preserve a mapped page.
* vm_soft_fault() now keeps a reference to the cache that owns the page to be
  mapped until it has actually mapped it.
* vm_unmap_pages() removed the mappings of all pages of the area instead of only
  those that are within the requested range.
* Kept (disabled) debug output for convenience.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21482 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-21 13:57:46 +00:00
Travis Geiselbrecht c9788912f0 re-enable kernel asserts.
Disabled by default, but all kernel devs are *highly* recommended to turn them on for your builds and see if it trips anything, and then fix it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21477 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-21 05:37:46 +00:00
Jérôme Duval 2d6d529814 Passed GENERAL_ERROR_BASE from LONG_MIN to INT_MIN (errors are uint32).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21475 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-20 21:58:02 +00:00
Jérôme Duval 5c937cfa82 missing comment tokens
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21472 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-20 21:30:00 +00:00
Jérôme Duval 77112c06de missing comment tokens
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21471 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-20 21:20:11 +00:00
Ingo Weinhold b321303cf9 * Implemented Min/Max/PreferredSize().
* Reworked the internal layout. _ValidateLayoutData() computes and caches the
  layout related data and all other methods just use those values. Now, in
  layout-aware mode the class should properly work not only when using the
  layout items. And when using layout items, the class does actually do
  internal layout; it was basically good luck that it worked in the tests,
  before. Vertical resizing is supported, too. 
* We do a few mean tricks to get the probably mostly preferred layout behavior:
  By default our own explicit max width and that of the menu bar layout item is
  set to unlimited and the horizontal menu bar alignment to left aligned. This
  allows to horizontally resize a BMenuField beyond its preferred size,
  although both label and menu bar have a limited max width. The user can, of
  course, override those explicit sizes/alignments to get a different behavior,
  if desired.
* Fixed invalidation in SetDivider(). When having the focus, the left and top
  border of the blue frame were not invalidated.
* The label is no longer drawn at vertical position font ascent + descent
  + leading + 2 (not sure how this calculation was supposed to work), but
  vertically centers the label around the ascent. With big fonts the label is
  shown a bit too far to the bottom. Not sure how to fix this in a generic way.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21466 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-19 23:38:00 +00:00
Ingo Weinhold ec592aa9e5 Implement _BMCMenuBar_::MaxSize() to override BMenuBar::MaxSize() and limit
the maximum width. The latter supports unlimited maximum width. The
_BMCMenuBar_ draws fine when resized wider than its min/preferred width, but
not the complete "button" area will cause the menu to open when being pressed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21465 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-19 23:09:01 +00:00
Ingo Weinhold 23b9a91178 Also override MinSize() and PreferredSize().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21464 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-19 23:02:34 +00:00
Stephan Aßmus 45f929b494 * added BCommandPipe class (currently private API) kindly provided by
Ramshankar
* adopted to Haiku coding style


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21463 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-19 12:38:29 +00:00
Stefano Ceccherini ffcd67bc82 moved duplicate code to a common location.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21459 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-18 14:30:56 +00:00
Stefano Ceccherini 7f0898e76f bye bye ClientFontList.h
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21458 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-18 13:45:33 +00:00
Stefano Ceccherini ac2284ed8b Moved ZombieReplicantView.h to src/kits/interface
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21457 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-18 13:38:14 +00:00
Stefano Ceccherini 7c42f05d49 moved kZombieColor to ZombieReplicantView.h
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21456 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-18 13:37:42 +00:00
Stefano Ceccherini fab61b6237 Moved TextInput.h to src/kits/interface as it's only used there.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21455 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-18 13:31:46 +00:00
Stefano Ceccherini a24a5156f9 splitted SetActiveState() into 2 methods, since it was very messy
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21454 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-18 13:15:58 +00:00
Stefano Ceccherini 6a45488dd9 Used exceptions to handle errors on InitData(). I hope I didn't made
stupid errors, since I don't use exceptions usually. Feel free to beat 
me on this. Moved uninitialization to _DisposeData(). Corrected some 
styling issues pointed out by axel. Used fprintf instead of printf.
Turned off debugging.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21450 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-18 09:53:36 +00:00
Jérôme Duval f5390ac494 added atomic*64() for BeOS build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21440 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-17 17:04:29 +00:00
Jérôme Duval 913f680ea2 followed Ingo's suggestion and introduced HAIKU_HOST_PLATFORM_64_BIT macro
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21431 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-17 11:51:49 +00:00
Jérôme Duval a3ca7ebc40 x86_64 changes :
added atomic*64() functions
use int32 instead of long


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21430 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-17 10:50:18 +00:00
Ingo Weinhold 8000c5e973 * Added layout-friendly constructor.
* Fixed invalidation in FrameResized().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21427 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-17 01:17:49 +00:00
Ingo Weinhold 4fa167e12d * Added layout-related methods (Min/Max/PreferredSize(), InvalidateLayout(),
DoLayout()).
* Don't resize the view and the window anymore, when fResizeToFit is not
  set.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21426 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-17 01:15:05 +00:00
Ingo Weinhold cb968676d9 Defined B_SIZE_UNSET to -2. -1 is actually a valid size, meaning 0 pixels.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21424 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-17 01:10:12 +00:00
Jérôme Duval de050c6029 incorporated savage driver sources from Gerald Zajac. I hope it's the good place for this.
fixed warnings and code style. Please, from now on, provide *patches* to this version.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21421 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-15 21:02:08 +00:00
Stefano Ceccherini 8b7987023f Implemented needed methods to be able to clone the accelerant.
Implemented SetIndexedColors hook, although not really correct.
I don't know why the driver's 8 bit mode were disabled. They seem to 
work fine. I had to enable at least 640x480x8 to be able to test 
WindowScreen. There are some TODOs in the code. I'll look into them 
later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21410 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-14 14:41:45 +00:00
Ryan Leavengood b2a409507e Adding the header.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21403 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-13 02:36:18 +00:00
Ryan Leavengood 2660d61ad6 As I said I would:
1. Deleted headers/shared/
2. Added a Jamfile to src/shared to build it into a static library libshared.a.
3. Removed my changes in the build/jam directory.
4. Have ShowImage include libshared.a.

I forgot to add AboutWindow.h to headers/private/shared. I will do that next.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21402 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-13 02:35:29 +00:00
Stefano Ceccherini 37ddfd14ab Shortcut characters are aligned even if there's a submenu, like
discussed in the thread in haiku-development. I added a fSubmenus member 
to BMenu, to be able to tell from BMenuItem if there are other items 
with a submenu (maintained in BMenuItem::SetSuper()). If you don't like 
this solution, let's just revert.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21395 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-12 12:28:06 +00:00
Stefano Ceccherini fbe2f227ca Some work on menu layouts:
- Menus are generally a bit wider (BeIDE ones didn't look nice)
- The modifiers bitmap are drawn more centered vertically
- Splitted BMenu::ComputeLayout() into three methods
- Various minor changes.
The menuitems still don't look nice with bigger font sizes, but we'll 
try to fix this...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21394 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-12 09:10:08 +00:00
Ryan Leavengood 5a1210fbef Moved the BAboutWindow implementation to the shared source directory, which
despite being talked about repeatedly, does not currently exist.

Adding this required adding some new Jam rules to deal with this shared source
directory and headers. I had some fun figuring this out. Despite writing
articles about Jam in the Haiku newsletter a few years ago I still find Jam to
be a PITA at times.

But my solution seems to work pretty well. Basically you just call the rule
UseSharedSource and pass the name of the shared source file you want to use.
This rule sets up the header directories and the right Jam variables for the
source file. You then add the source file to the source list in the Application
rule like any other source file.

I also made the authors list sent to the about window constructor null
terminated instead of passing the size of the array, as suggested by Hugo.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21391 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-12 03:54:07 +00:00
Ryan Leavengood a8a83855b0 Initial implementation of the common BAboutWindow class. Of course I just
realized that calling it a window may not be strictly correct since it isn't a
decendent of BWindow, but just uses a BAlert. Oh well, it can be changed if
need be.

I'm also checking in the first use of it, in ShowImage. Since ShowImage can
still be compiled for R5 I've added a #ifdef around the new BAboutWindow
related code.

I'm open for suggestions for the interface for this class, well mostly the
constructor. I'm not a big fan of having to specify the number of authors.

For now I'm making the header private, but I don't think it would be a big deal
to expose it publically.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21389 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-11 00:14:32 +00:00
Ingo Weinhold 9eae7400a4 Implemented layout-friendly constructors. Also added MaxSize(), though it
only invokes the BView version. Didn't know what to do with MinSize() and
PreferredSize(). ATM they return fixed, hard-coded values. It might make
sense to compute something depending on the font size, for instance.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21380 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-10 16:52:42 +00:00