Commit Graph

24069 Commits

Author SHA1 Message Date
Axel Dörfler
2909d9dc26 * Factored a delete_notification() that is now used in three places.
* remove_transaction_listeners() was checking the events_pending field without
  holding the sNotificatonLock - that should have been harmless (as we're in the
  middle of deleting the transaction), but it now looks better.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25130 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 16:23:10 +00:00
Ingo Weinhold
dcc3839464 Check the shadow password under Haiku, when available. ftpd works again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25129 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 16:07:59 +00:00
Ingo Weinhold
d1dc42cc73 "/bin/bash" is a valid shell, too. ftpd doesn't allow anyone to login,
who has a shell not returned by getusershell().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25128 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 16:07:02 +00:00
Ingo Weinhold
9afa8bc573 Small test that repeatedly connects to a server. Under Haiku after
several iterations the connect()s start to fail -- first occasionally,
later quite often.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25127 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 15:18:05 +00:00
Ingo Weinhold
2838616b17 Translate connect()s to INADDR_ANY to INADDR_LOOPBACK. Not sure, if that
is required, but Linux seems to do it. It also allows us to create
AF_INET socketpair()s -- not really needed, but probably nice for
testing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25126 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 14:19:58 +00:00
Axel Dörfler
701d196668 * Inode::_GrowStream() did not make the double indirect block writable before
adding a block to its array. This could cause all kinds of trouble, and
  fixes at least a part of #2148.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25125 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 11:28:41 +00:00
Axel Dörfler
89eb861a3e * Large cleanup. Removed inconsistent usage of errno in instantiate_object();
instead, it will now use the image_id parameter to store errors in.
* find_instantiation_func() and validate_instantiation() will no longer
  overwrite errno with B_OK.
* Made private functions static, and moved them to the top.
* If the class name starts with '_', it will now try to add a BPrivate namespace
  in case it could not find the class. This should help with the compatibility
  issues Shinta reported (also part of ticket #2086).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25124 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 09:56:03 +00:00
Axel Dörfler
991c062ff3 * Made the archive version of BTextControl::_InitData() more resistant against
a broken archive - it will now create a new _BTextInput_ child, if it couldn't
  find one. This fixes #2086.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25123 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 09:52:27 +00:00
Ingo Weinhold
cfb0e47367 Fixed the write behavior: Blocking writes should write what they can
and loop until everything has been written. Non-blocking writes should
write as much as they can and return B_WOULD_BLOCK, if that wasn't the
whole request.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25122 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 02:23:24 +00:00
Ingo Weinhold
5843f17cb8 When splitting the send request into multiple buffers, we must
succeed after we have successfully sent the first buffer, even if not a
single byte of some following buffer could be sent. We should probably
even succeed whatever the error code -- not sure what is the reason
for only doing that for B_WOULD_BLOCK and B_INTERRUPTED.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25121 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 02:20:00 +00:00
Karsten Heimrich
ccf92546c4 * remove and delete listview items
* removed unmaintained fNode var from listview
* don't exit just in case we can't load the icons,
  instead draw an string what the default printer is
* call create_directory only if the printers dir does not exist



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25120 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-23 22:32:14 +00:00
Stephan Aßmus
0babd6b999 Applied patch by Philippe Saint-Pierre:
* Add spacing around the tab view.

Thanks, Philippe! BTW, the tab view will come in handy again, now with the
additional options that sub-pixel rendering is going to offer... :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25119 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-23 20:40:23 +00:00
Ingo Weinhold
f0a15ccac2 * When appending/prepending data to a buffer we kept the initial
reference to a newly created header. It would thus not be deleted when
  the new node (which also has a reference) was removed again.
* Added debugger command "net_buffer_stats" which prints the allocation
  counts of net buffers and data headers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25118 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-23 18:41:49 +00:00
Ingo Weinhold
5b29b956f3 Replaced the reader/writer blocking semaphores by condition variables.
This fixes race conditions. The OpenSSH tests don't hang anymore --
instead they run the system out of memory, apparently due to a net
buffer/data node leak.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25117 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-23 17:10:30 +00:00
Axel Dörfler
74a7b3ff69 * Wrote a test application that tries to fragment your disk by creating many
small files, and then deleting every other.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25116 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-23 12:44:00 +00:00
Stephan Aßmus
2d581f8d95 Forgot to commit this, added Pairs to the image in the Demos folder. Sorry!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25115 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-23 09:51:22 +00:00
Stephan Aßmus
69e62e48b9 Added Pairs game contributed by Ralf Schuelke to the image! (Demo folder)
Thanks a lot, Ralf!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25114 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-23 09:06:05 +00:00
Rene Gollent
291b899af6 When saving its state, BShelf was erroneously saving the BMessage
given to it when the replicant was first added. This had the net 
effect that any on the fly changes such as the color drops allowed
by the Activity Monitor replicant were discarded. Fixed.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25113 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 22:44:40 +00:00
Axel Dörfler
32bcfcf6a9 Some more changes towards a working prototype:
* The "net" driver is now also loaded.
* The node tree is now dumped.
* If registering fails, the node is now removed from its parent again 
  (for now, correct would be to release it).
* device_node::_RegisterDynamic() now also checks for the driver path.
* _RegisterFixed() no longer calls supports_device() - since it has been
  directly specified, we will assume the user knows what he is doing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25112 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 21:52:10 +00:00
Ingo Weinhold
71a49db6b6 Use the thread blocking functions instead of a condition variable for
read request. Can probably be done for writers as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25111 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 21:47:54 +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
Karsten Heimrich
a017bfe8de * use HVIF icon on HAIKU, resolves ticket #1802
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25108 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 21:40:15 +00:00
Karsten Heimrich
4aa5d96613 * invalidate only the items in question, should fix ticket #1803
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25107 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 21:31:28 +00:00
Jérôme Duval
9fdd497614 * typo in Control
* layout the view even in the case of an unarchived one
* this should finally fix #2121


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25106 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 21:26:10 +00:00
Axel Dörfler
cd81456e14 Just a minor bug that caught my attention while glancing at the code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25105 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 19:55:33 +00:00
Ingo Weinhold
60222c8bac * Made thread_block_with_timeout_lock() more user-friendly. It allows
passing 0 as timeout flags or B_INFINITE_TIMEOUT as timeout, in which
  case no timer will be used.
* Implemented missing thread_block_with_timeout().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25104 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 19:46:08 +00:00
Jérôme Duval
d5b26be18c restores the text controls before using SetValue() since this one uses them
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25103 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 19:13:00 +00:00
Ingo Weinhold
c2d96d4500 Added back accidentally removed check for B_THREAD_SUSPENDED when
delivering a kill signal.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25102 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 19:01:23 +00:00
Axel Dörfler
43bae01508 * Made waiting for a timer handler more power usage friendly.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25101 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 18:46:34 +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
Axel Dörfler
1201d52e6c * Color drops for the data source color are now only accepted on the colored
box, added a new method _LegendColorFrameAt() that returns that area, and
  is also used when drawing it.
* Fixed changing the history background color; it accidently changed the color
  of the wrong view. This fixes bug #2115.
* If the history gets too dark, it will now lighten up the scale, instead of
  drawing it even darker.
* Changing the color of a data source now immediately redraws the colored box,
  too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25097 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 15:14:51 +00:00
Ingo Weinhold
0970b97bed Added support_kit_config.h configuration header. ATM it only contains a
setting to force BLockers to be semaphore style. This may help with
debugging deadlocks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25096 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 15:04:01 +00:00
Ingo Weinhold
93027f442f Added "straced" debugger command which basically works like "traced",
but also prints post syscall entries not matching the filter, if the
respective pre syscall entry matched. This way one also sees the syscall
return values. Works only in forward direction ATM.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25095 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 14:57:50 +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
Ryan Leavengood
0039ad59fa Committing patch from Alex Roman, with a few small changes. This updates the NFS file system to the latest file system interface. Untested.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25093 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 04:41:30 +00:00
Jérôme Duval
157c0ced17 don't try to archive BHandler::fName when it is null
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25092 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-21 20:52:00 +00:00
Axel Dörfler
f4103e2b13 Reverted r25084, and fixed bug #1762 again as suggested by Korli on the mailing
list.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25091 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 21:22:16 +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
Michael Pfeiffer
7ca9a33b59 Highlight selected menu item with > ... <.
Moved global variables on the stack.
Hide cursor while menu is displayed.
Print error message at correct location.
Reboot on error.
Display "Loading <name>".

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25089 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 18:42:59 +00:00
Michael Pfeiffer
7b51470a32 When writing the MBR, don't overwrite disk signature and the reserved word.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25088 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 18:29:48 +00:00
Ingo Weinhold
ccce5afa3c Added simple test that demonstrates that unblocking threads waiting on a
semaphore after an interrupted one is broken.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25087 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 17:49:45 +00:00
Jérôme Duval
c4157c8ddb as noticed by Axel, InitObject is also used by other constructors: we init fStyle in the BArchive constructor instead.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25086 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 17:47:11 +00:00
Jérôme Duval
9091f4469b added pthread_sigmask based on sigprocmask()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25085 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 16:56:39 +00:00
Jérôme Duval
727f8f30c8 _QuitAllWindows()) calls _WindowQuitLoop() twice but we don't want to check two times a window (hence the use of the xor operator)
this fixes bug #1762 (Installer: trying to close it via alt+q shows warning twice)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25084 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 16:47:30 +00:00
François Revol
0efb25854a - login window should be visible on all workspaces
- add a DesktopWindow that can show replicants. To edit the shelf run Login --edit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25083 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 16:14:53 +00:00
Jérôme Duval
3d9c0d7c37 Patch from Shinta: fStyle defaults to B_FANCY_BORDER
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25082 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 16:04:45 +00:00
Jérôme Duval
27ec8243b2 fixed bug #2101 : normalize user paths, use localType for links
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25081 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 15:57:54 +00:00