History log of /haiku/src/system/kernel/port.cpp
Revision Date Author Comments
# 00f1e7c5 03-Jun-2022 Augustin Cavalier <waddlesplash@gmail.com>

kernel: Rework iovec copying from userland.

Create a utility function which performs all necessary checks,
allocates memory, and copies the structures, and then make use of it
in the three places in the kernel which did all this manually.

None of them were previously complete: the fd and socket code only
checked iov_base and not iov_len, while the port code did not check
anything at all.

Part of #14961.


# 12ca3674 23-Nov-2019 Augustin Cavalier <waddlesplash@gmail.com>

kernel/port: Do not leave the main port pointer in the local scope.

Only the reference. No functional change intended.


# 072b9ed0 23-Nov-2019 Augustin Cavalier <waddlesplash@gmail.com>

kernel/port: Properly release the first reference to the Port object.

Creating a BReferenceable sets its reference count to 1.
create_port() was then acquiring 2 references for the two lists
it inserts the port object into, and subsequently delete_port()
releases those.

But that "reference 0" never was released anywhere, and so
despite being removed from hashes, etc. port objects were
just leaked, along with whatever messages remained in their
queue, never to be freed. This of course can add up pretty
quickly in systems that created and deleted ports frequently,
for instance, in long-running media playback, opening/closing
applications, etc.

As far as I can tell, this bug was introduced in the fix to
#8007 (7f64b301b1e78fb5a50c44a0cb2bb94a91e31d00), which introduced
the ref-counting system to the port heap, so it has been with us
since 2013 (!).

Fixes #15489, and probably some of the other "media playback
memory leak" tickets.


# 057719ef 23-Nov-2019 Augustin Cavalier <waddlesplash@gmail.com>

kernel/port: Handle mutex_lock returning an error status code.

This can occur if the mutex in question is destroyed while
we are waiting for it.


# 3c47c28a 23-Nov-2019 Augustin Cavalier <waddlesplash@gmail.com>

kernel/port: Let the mutex take care of cloning the name.

This way, we can just call mutex_destroy to take care of
freeing it. No functional change intended.


# 6e28d809 07-Jan-2018 Jérôme Duval <jerome.duval@gmail.com>

kernel: port: check USE_USER_COPY flag before masking it.

writev_port_etc() used memcpy() instead of user_memcpy() for user buffers.
The branch was even left out silently as an optimization on gcc5.


# c73d1301 08-Nov-2015 Michael Lotz <mmlr@mlotz.ch>

kernel: Use anonymous namespaces to avoid type collisions.

The anonymous namespace makes type definitions local to the translation
unit (like static does for objects). For pretty much any type not shared
across multiple files this is what one wants to happen (and might
erroneously expect to happen automatically).

This commit solves some actual collisions that were present:

* The VFS and the rootfs both used an incompatible VnodeHash struct for
their BOpenHashTable.
* XSI semaphores and message queues both used queued_thread, Ipc and
IpcHashTableDefinition.

For release builds these did not cause problems as the types were fully
inlined. Debug builds would crash at boot however because parts of a
BOpenHashTable<VnodeHash> from the rootfs meant to operate on struct
rootfs_vnode would be applied to one from the VFS expecting struct
vnode.

As such collisions are violations of the one definition rule, the code
is at fault and unfortunatley the compiler isn't required to diagnose
such problems across translation units (which isn't actually trivial).
This can lead to subtle and hard to debug problems and it's therefore
best to avoid leaking types into the global namespace whenever possible.


# d64c7086 05-Sep-2015 Michael Lotz <mmlr@mlotz.ch>

Various whitespace cleanup only.


# 748c0f30 11-May-2015 Axel Dörfler <axeld@pinc-software.de>

kernel: Fixed broken port tracing.

* Broken since the scheduler merge.


# 03fb2d88 07-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: Remove gSchedulerLock

* Thread::scheduler_lock protects thread state, priority, etc.
* sThreadCreationLock protects thread creation and removal and list of
threads in team.
* Team::signal_lock and Team::time_lock protect list of threads in team
as well.
* Scheduler uses its own internal locking.


# 7f64b301 26-Oct-2013 Julian Harnath <julian.harnath@rwth-aachen.de>

Reduce lock contention in kernel port subsystem.

* Replace ports list mutex with R/W-lock.

* Move team port list protection to separate array of mutexes.
Relieve contention on sPortsLock by removing Team::port_list from its
protected items. With this, set_port_owner() only needs to acquire the
sPortsLock for reading.

* Add another hash table holding the ports by name. Used by find_port()
so it doesn't have to iterate over the list anymore.

* Use slab-based memory allocator for port messages. sPortQuotaLock was
acquired on every message send or receive and was thus another point
of contention. The lock is not necessary anymore.

* Lock for port hashes and Port::lock are no longer locked in a nested
fashion to reduce chances of blocking other threads.

* Make operations concurrency-safe by adding an atomically accessed
Port::state which provides linearization points to port creation and
deletion. Both operations are now divided into logical and physical
parts, the logical part just updating the state and the physical part
adding/remove it to/from the port hash and team port list.

* set_port_owner() is the only remaining function which still locks
Port::lock and one or two of sTeamListLock[] in a nested fashion.
Since it needs to move the port from one team list to another and
change Port::owner, there's no way around.

* Ports are now reference counted to make accesses to already-deleted
ports safe.

* Should fix #8007.


# c24adb29 19-Apr-2013 Rene Gollent <anevilyak@gmail.com>

Rework DefaultNotificationService registration.

- Instead of implicitly registering and unregistering a service
instance on construction/destruction, DefaultNotificationService
now exports explicit Register()/Unregister() calls, which subclasses
are expected to call when they're ready.

- Adjust all implementing subclasses. Resolves an issue with deadlocks
when booting a DEBUG=1 build.


# 0e88a887 13-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

First round of 64-bit safety fixes in the kernel.

* Most of this is incorrect printf format strings. Changed all strings
causing errors to use the B_PRI* format string definitions, which
means the strings should be correct across all platforms.
* Some other fixes for errors, casts required, etc.


# fae2ce19 07-Nov-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Enlarge threads and ports KMessage notification stack buffers

They were too small for all the fields added. This is why the system
profiler skipped "thread added" notifications.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43216 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 961a96a9 29-Jun-2011 Michael Lotz <mmlr@mlotz.ch>

Optimize the configuration of the port heap. Previously the max bin size was
512 bytes with a heap page of 2048 bytes resulting in excessive waste for
allocations between 512 and 1023 bytes. Also tune the requested alignment so
that sizeof(port_message) (currently 28 bytes) can occupy one allocation unit
without waste.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42340 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2b861349 20-Jun-2011 Michael Lotz <mmlr@mlotz.ch>

* Actually include an offset to write to in writev_port_etc(). It would
previously just always write over the beginning of the buffer for each vector.
Since the writev version isn't exposed to userland by means of a syscall and
kernel internally nobody used it, nobody noticed so far.
* Merge the two loops for user and kernel copy to remove the code duplication.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42273 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cd3e02ca 20-Jun-2011 Michael Lotz <mmlr@mlotz.ch>

* Growing the port heap by adding new areas was broken in various ways. For one
the acquired quota in sTotalSpaceInUse wasn't released in all cases leading to
it eventually reaching the limit (after a _very_ long time though, so this is
more theoretical than anything else). The sAllocatingArea flag wasn't reset in
the case that an area was already added in the meantime, resulting in no
further growing being possible. Then there were race conditions between
waiting for space to become available and the situations which made that space
available (freeing port_messages and adding new areas).
* Fix these race conditions by using a mutex (sPortQuotaLock) to protect the
various quota and allocation related variables. Instead removed the atomic_*
operations that were previously used.
* Had to move some static functions around.

Should make port heap growing more robust, even though in normal use you'll
likely never encounter it...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42272 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 24df6592 11-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged signals-merge branch into trunk with the following changes:
* Reorganized the kernel locking related to threads and teams.
* We now discriminate correctly between process and thread signals. Signal
handlers have been moved to teams. Fixes #5679.
* Implemented real-time signal support, including signal queuing, SA_SIGINFO
support, sigqueue(), sigwaitinfo(), sigtimedwait(), waitid(), and the addition
of the real-time signal range. Closes #1935 and #2695.
* Gave SIGBUS a separate signal number. Fixes #6704.
* Implemented <time.h> clock and timer support, and fixed/completed alarm() and
[set]itimer(). Closes #5682.
* Implemented support for thread cancellation. Closes #5686.
* Moved send_signal() from <signal.h> to <OS.h>. Fixes #7554.
* Lots over smaller more or less related changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42116 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4535495d 10-Jan-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged the signals branch into trunk, with these changes:
* The team and thread kernel structures have been renamed to Team and Thread
respectively and moved into the new BKernel namespace.
* Several (kernel add-on) sources have been converted from C to C++ since
private kernel headers are included that are no longer C compatible.

Changes after merging:
* Fixed gcc 2 build (warnings mainly in the scary firewire bus manager).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40196 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a8ad734f 14-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Introduced structures {virtual,physical}_address_restrictions, which specify
restrictions for virtual/physical addresses.
* vm_page_allocate_page_run():
- Fixed conversion of base/limit to array indexes. sPhysicalPageOffset was not
taken into account.
- Takes a physical_address_restrictions instead of base/limit and also
supports alignment and boundary restrictions, now.
* map_backing_store(), VM[User,Kernel]AddressSpace::InsertArea()/
ReserveAddressRange() take a virtual_address_restrictions parameter, now. They
also support an alignment independent from the range size.
* create_area_etc(), vm_create_anonymous_area(): Take
{virtual,physical}_address_restrictions parameters, now.
* Removed no longer needed B_PHYSICAL_BASE_ADDRESS.
* DMAResources:
- Fixed potential overflows of uint32 when initializing from device node
attributes.
- Fixed bounce buffer creation TODOs: By using create_area_etc() with the
new restrictions parameters we can directly support physical high address,
boundary, and alignment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37131 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7198f765 05-May-2010 Axel Dörfler <axeld@pinc-software.de>

* During early kernel startup, we must not create areas without the
CREATE_AREA_DONT_WAIT flag; waiting at this point is not allowed.
* I hope I found all occurences, but there might be some areas left (note,
only those that don't use B_ALREADY_WIRED are problematic).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36624 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bf96cfdc 15-Feb-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Added TODO regarding the non-swappability of the initial port heap area.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35484 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a73382f7 19-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* uninit_port_locked(): Fixed incorrect use of ConditionVariable::NotifyAll().
Fixes #5152.
* _get_port_message_info_etc(): Check whether the port still exists and is not
closed and empty in the loop. Though actually it shouldn't be necessary
(same in the other functions), since Wait() would return an error, if the
port was closed/deleted. Well, paranoia... :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34713 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 410ba11f 16-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

read_port_etc():
* Also check whether the port is closed after waiting.
* Don't increment read_count after waiting failed. That should have been the
cause of #5119.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34687 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c3bc71d6 17-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed superfluous ConditionVariableEntry::WaitStatus() checks. Wait() always
returns the correct value.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34686 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3ffeff07 17-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

port_writev_etc(): Missing check whether the port has been closed after
waiting.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34685 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7d592ec4 15-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

* Fixed the bug that led to #5119. There was a race condition in the read path
as soon as a second thread got into the game: if a thread was notified that
a message is ready, another thread could call read_port() and steal it before
the previous thread could claim it. The "Extensions" menu still doesn't seem
to work, but I would guess that is unrelated.
* The threads of the test app never exited, as read_port() returns the number
of bytes it read, not just a status.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34681 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1c61ec1a 20-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed gcc 4 warning.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34151 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8cd9a524 29-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* delete_owned_ports() did not maintain the sUsedPorts variable, and thus led
to bug #4864.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33823 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 25028839 26-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Somehow, I forgot to update set_port_owner() for the new team port list.
* Now, killing a team shut properly cause the app_server to close the windows
of that team, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33777 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 86a999ad 26-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* delete_owned_ports() no longer scans the whole port array for ports belonging
to the owning team.
* Instead, the team now maintains a list containing the ports it owns.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33771 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f28dd36b 22-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* The alphabet is obviously hard, moved some tracing defines at their
(hopefully) correct place.
* It seems to be even harder to understand basic locking primitives: when you
think about it, it shouldn't surprise you that conditional variables never
return B_WOULD_BLOCK. This fixes gdb again.
* Added tracing support to the ports subsystem.
* get_port_message() will now resize the port heap if needed (but will also
take timeouts into account while doing so, more or less). The initial port
space is 4MB (as before), the growth rate is the same, and the system wide
limit is arbitrarily set to 64 MB (all swappable). A team limit has been set
to 8 MB, but is not enforced yet. Since ports are using up address space in
the kernel, those seems to be proper limits.
* This also fixes a strange, and rare lockup where the mouse cursor would still
move, but everything else would basically hang, but look perfectly normal from
KDL on the first look. As recently happened on Brecht's laptop, and debugged
by mmlr and me: the cbuf space got used up when lots of windows wanted to
redraw after a workspace switch. The app_server wouldn't answer anymore to
client requests, but thought it would have done so, as LinkSender::Flush()
doesn't care if it got a B_NO_MEMORY (the ports will now block until memory
is available if possible, so that should not be a problem anymore).
* Improved "port" KDL command, it now also prints the messages in the port.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33735 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e8885f20 22-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

Basically rewrote the ports subsystem to use:
* its own heap allocator instead of cbuf - this makes cbuf superfluous, and I
therefore removed it from the kernel. The heap is swappable, so lifts the
kernel's resource usage a bit. In the future, the heap should grow as well;
right now it should be at least as good as before.
* it no longer uses spinlocks, but just mutexes now for better scalability - it
was not usable with interrupts turned off anyway (due to its semaphore usage).
* it no longer uses semaphores, but condition variables.
* Needed to move the port initialization to a later point, as swappable memory
wasn't usable that early.
* All ports test are still passing, hopefully I didn't mess anything up :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33728 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c39ecc60 30-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* If getting a new port message failed, we must release the port's write sem
again, or else the port loses capacity.
* This fixes bug #2720.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30517 a95241bf-73f2-0310-859d-f6bbb57e9c96


# efd536ff 11-Apr-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Cleared up a misconception in the notification mechanism. We already had
methods that used an "event mask" field. There was no need to introduce
a "flags" field for the same purpose.
* Renamed protected DefaultNotificationService methods (removed "_" prefix).
* Adjusted the code providing a notification service accordingly.
* Changed the event message several notification services generated by renaming
the "opcode" field to "event".
* Implemented the TEAM_ADDED event and also added a TEAM_EXEC event.
* Added notifications for threads and images.
* Added visitor-like iteration functions for teams, threads, and images.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30126 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 51755cf8 15-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Added DefaultNotificationService and DefaultUserNotificationService
implementations that can be used by subsystems that want to have a pretty
standard service. Only the latter is really complete, though.
* The notification manager is now available earlier in the boot process.
* Added notifications to teams/ports (only add/remove).
* The network notification implementation is now using the
DefaultUserNotificationService.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29543 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5f87692c 16-Sep-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Increased the maximal port message size to 256 KB. The profiling
messages easily hit the previous limit. Maybe another solution should be
sought.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27591 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b4ec7b8e 14-Sep-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added (kernel private) B_PEEK_PORT_MESSAGE flag for read_port_etc().
When specified, the message is read but not removed from the port.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27527 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5e760150 07-Jun-2008 Michael Lotz <mmlr@mlotz.ch>

* Add read, write and total count to the ports KDL command so one can see
what the ports of a team are up to without having to go through each port
individually.
* Enlarge the port id column so even large ids fit nicely.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25857 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1c8de858 01-Jun-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added optional spinlock contention measurement feature. Enabled when
B_DEBUG_SPINLOCK_CONTENTION is defined to 1. It typedefs spinlock to a
structure (thus breaking BeOS binary compatibility), containing a
counter which is incremented whenever a thread has to wait for the
spinlock.
* Added macros for spinlock initialization and access and changed
code using spinlocks accordingly. This breaks compilation for BeOS --
the macros should be defined in the respective compatibility wrappers.
* Added generic syscall to get the spinlock counters for the thread and
the team spinlocks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25752 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 61de73e2 25-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Memory leak in error cases. CID 729.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25659 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7727e08e 17-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

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


# 4048494c 17-Feb-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

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


# 3cad4dae 28-Jan-2008 Marcus Overhagen <marcusoverhagen@gmail.com>

Print ids in decimal.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23780 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5aee691e 17-Jan-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

The "sem" and "port" debugger commands set some temporary variables,
now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23595 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ce637fda 17-Jan-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added usage (respectively more detailed usage) messages for "sem",
"sems", "port", and "ports" debugger commands.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23586 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 224aee3f 17-Jan-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

sem.c -> sem.cpp, port.c -> port.cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23585 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d64c7086d5482dd513e64d6f027106a955a704a7 05-Sep-2015 Michael Lotz <mmlr@mlotz.ch>

Various whitespace cleanup only.


# 748c0f3021d7a4bff20e59ceede5f9ad27fd863a 11-May-2015 Axel Dörfler <axeld@pinc-software.de>

kernel: Fixed broken port tracing.

* Broken since the scheduler merge.


# 03fb2d886830e4dd4b344c56725db59f96733216 07-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: Remove gSchedulerLock

* Thread::scheduler_lock protects thread state, priority, etc.
* sThreadCreationLock protects thread creation and removal and list of
threads in team.
* Team::signal_lock and Team::time_lock protect list of threads in team
as well.
* Scheduler uses its own internal locking.


# 7f64b301b1e78fb5a50c44a0cb2bb94a91e31d00 26-Oct-2013 Julian Harnath <julian.harnath@rwth-aachen.de>

Reduce lock contention in kernel port subsystem.

* Replace ports list mutex with R/W-lock.

* Move team port list protection to separate array of mutexes.
Relieve contention on sPortsLock by removing Team::port_list from its
protected items. With this, set_port_owner() only needs to acquire the
sPortsLock for reading.

* Add another hash table holding the ports by name. Used by find_port()
so it doesn't have to iterate over the list anymore.

* Use slab-based memory allocator for port messages. sPortQuotaLock was
acquired on every message send or receive and was thus another point
of contention. The lock is not necessary anymore.

* Lock for port hashes and Port::lock are no longer locked in a nested
fashion to reduce chances of blocking other threads.

* Make operations concurrency-safe by adding an atomically accessed
Port::state which provides linearization points to port creation and
deletion. Both operations are now divided into logical and physical
parts, the logical part just updating the state and the physical part
adding/remove it to/from the port hash and team port list.

* set_port_owner() is the only remaining function which still locks
Port::lock and one or two of sTeamListLock[] in a nested fashion.
Since it needs to move the port from one team list to another and
change Port::owner, there's no way around.

* Ports are now reference counted to make accesses to already-deleted
ports safe.

* Should fix #8007.


# c24adb29503ec78c6d076801e1d82d16140e3413 19-Apr-2013 Rene Gollent <anevilyak@gmail.com>

Rework DefaultNotificationService registration.

- Instead of implicitly registering and unregistering a service
instance on construction/destruction, DefaultNotificationService
now exports explicit Register()/Unregister() calls, which subclasses
are expected to call when they're ready.

- Adjust all implementing subclasses. Resolves an issue with deadlocks
when booting a DEBUG=1 build.


# 0e88a887b4a9ecaaf1062078d9ca9bfca78fcf3a 13-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

First round of 64-bit safety fixes in the kernel.

* Most of this is incorrect printf format strings. Changed all strings
causing errors to use the B_PRI* format string definitions, which
means the strings should be correct across all platforms.
* Some other fixes for errors, casts required, etc.


# fae2ce1945fb1f791d4ccbab8422bcc7d7de8a3f 07-Nov-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Enlarge threads and ports KMessage notification stack buffers

They were too small for all the fields added. This is why the system
profiler skipped "thread added" notifications.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43216 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 961a96a9875cac296e96dbc7246cd7435b5ed9b0 29-Jun-2011 Michael Lotz <mmlr@mlotz.ch>

Optimize the configuration of the port heap. Previously the max bin size was
512 bytes with a heap page of 2048 bytes resulting in excessive waste for
allocations between 512 and 1023 bytes. Also tune the requested alignment so
that sizeof(port_message) (currently 28 bytes) can occupy one allocation unit
without waste.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42340 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2b861349258dec8ab15cb2ca467071b0bec56381 20-Jun-2011 Michael Lotz <mmlr@mlotz.ch>

* Actually include an offset to write to in writev_port_etc(). It would
previously just always write over the beginning of the buffer for each vector.
Since the writev version isn't exposed to userland by means of a syscall and
kernel internally nobody used it, nobody noticed so far.
* Merge the two loops for user and kernel copy to remove the code duplication.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42273 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cd3e02ca1eeaa85da51b04ae0670dccb297c6f72 20-Jun-2011 Michael Lotz <mmlr@mlotz.ch>

* Growing the port heap by adding new areas was broken in various ways. For one
the acquired quota in sTotalSpaceInUse wasn't released in all cases leading to
it eventually reaching the limit (after a _very_ long time though, so this is
more theoretical than anything else). The sAllocatingArea flag wasn't reset in
the case that an area was already added in the meantime, resulting in no
further growing being possible. Then there were race conditions between
waiting for space to become available and the situations which made that space
available (freeing port_messages and adding new areas).
* Fix these race conditions by using a mutex (sPortQuotaLock) to protect the
various quota and allocation related variables. Instead removed the atomic_*
operations that were previously used.
* Had to move some static functions around.

Should make port heap growing more robust, even though in normal use you'll
likely never encounter it...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42272 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 24df65921befcd0ad0c5c7866118f922da61cb96 11-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged signals-merge branch into trunk with the following changes:
* Reorganized the kernel locking related to threads and teams.
* We now discriminate correctly between process and thread signals. Signal
handlers have been moved to teams. Fixes #5679.
* Implemented real-time signal support, including signal queuing, SA_SIGINFO
support, sigqueue(), sigwaitinfo(), sigtimedwait(), waitid(), and the addition
of the real-time signal range. Closes #1935 and #2695.
* Gave SIGBUS a separate signal number. Fixes #6704.
* Implemented <time.h> clock and timer support, and fixed/completed alarm() and
[set]itimer(). Closes #5682.
* Implemented support for thread cancellation. Closes #5686.
* Moved send_signal() from <signal.h> to <OS.h>. Fixes #7554.
* Lots over smaller more or less related changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42116 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4535495d80c86e19e2610e7444a4fcefe3e0f8e6 10-Jan-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged the signals branch into trunk, with these changes:
* The team and thread kernel structures have been renamed to Team and Thread
respectively and moved into the new BKernel namespace.
* Several (kernel add-on) sources have been converted from C to C++ since
private kernel headers are included that are no longer C compatible.

Changes after merging:
* Fixed gcc 2 build (warnings mainly in the scary firewire bus manager).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40196 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a8ad734f1c698917badb15e1641e0f38b3e9a013 14-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Introduced structures {virtual,physical}_address_restrictions, which specify
restrictions for virtual/physical addresses.
* vm_page_allocate_page_run():
- Fixed conversion of base/limit to array indexes. sPhysicalPageOffset was not
taken into account.
- Takes a physical_address_restrictions instead of base/limit and also
supports alignment and boundary restrictions, now.
* map_backing_store(), VM[User,Kernel]AddressSpace::InsertArea()/
ReserveAddressRange() take a virtual_address_restrictions parameter, now. They
also support an alignment independent from the range size.
* create_area_etc(), vm_create_anonymous_area(): Take
{virtual,physical}_address_restrictions parameters, now.
* Removed no longer needed B_PHYSICAL_BASE_ADDRESS.
* DMAResources:
- Fixed potential overflows of uint32 when initializing from device node
attributes.
- Fixed bounce buffer creation TODOs: By using create_area_etc() with the
new restrictions parameters we can directly support physical high address,
boundary, and alignment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37131 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7198f76564e4b062401bb95f6ddf540bbf9e8625 05-May-2010 Axel Dörfler <axeld@pinc-software.de>

* During early kernel startup, we must not create areas without the
CREATE_AREA_DONT_WAIT flag; waiting at this point is not allowed.
* I hope I found all occurences, but there might be some areas left (note,
only those that don't use B_ALREADY_WIRED are problematic).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36624 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bf96cfdcbeee173c464fa91d6a0b2569fbe17d9e 15-Feb-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Added TODO regarding the non-swappability of the initial port heap area.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35484 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a73382f7bbbb9164aee9ef0fb3ddffa968b88e7e 19-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* uninit_port_locked(): Fixed incorrect use of ConditionVariable::NotifyAll().
Fixes #5152.
* _get_port_message_info_etc(): Check whether the port still exists and is not
closed and empty in the loop. Though actually it shouldn't be necessary
(same in the other functions), since Wait() would return an error, if the
port was closed/deleted. Well, paranoia... :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34713 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 410ba11f8c8a24ef483eafb3bcb638223e1ef44b 16-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

read_port_etc():
* Also check whether the port is closed after waiting.
* Don't increment read_count after waiting failed. That should have been the
cause of #5119.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34687 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c3bc71d6e23aef3299cc021cc53b271d3e885b4c 17-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed superfluous ConditionVariableEntry::WaitStatus() checks. Wait() always
returns the correct value.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34686 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3ffeff07708b7d4c6bbb1dce071860ace6995880 17-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

port_writev_etc(): Missing check whether the port has been closed after
waiting.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34685 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7d592ec4d20e77818a090c3a0c43b6f3c4a6cd27 15-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

* Fixed the bug that led to #5119. There was a race condition in the read path
as soon as a second thread got into the game: if a thread was notified that
a message is ready, another thread could call read_port() and steal it before
the previous thread could claim it. The "Extensions" menu still doesn't seem
to work, but I would guess that is unrelated.
* The threads of the test app never exited, as read_port() returns the number
of bytes it read, not just a status.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34681 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1c61ec1aad1c6daf84afe1bfe0930bf242363b9b 20-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed gcc 4 warning.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34151 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8cd9a52477b4cffdbd73d0eb872e8187c76ce053 29-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* delete_owned_ports() did not maintain the sUsedPorts variable, and thus led
to bug #4864.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33823 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 250288397d3270c5653c449d5564dc3cb4fdb460 26-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Somehow, I forgot to update set_port_owner() for the new team port list.
* Now, killing a team shut properly cause the app_server to close the windows
of that team, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33777 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 86a999adfb7b2ef2261c913a6f91880175c736ec 26-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* delete_owned_ports() no longer scans the whole port array for ports belonging
to the owning team.
* Instead, the team now maintains a list containing the ports it owns.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33771 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f28dd36b8271a80746985faef453afee6526f416 22-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* The alphabet is obviously hard, moved some tracing defines at their
(hopefully) correct place.
* It seems to be even harder to understand basic locking primitives: when you
think about it, it shouldn't surprise you that conditional variables never
return B_WOULD_BLOCK. This fixes gdb again.
* Added tracing support to the ports subsystem.
* get_port_message() will now resize the port heap if needed (but will also
take timeouts into account while doing so, more or less). The initial port
space is 4MB (as before), the growth rate is the same, and the system wide
limit is arbitrarily set to 64 MB (all swappable). A team limit has been set
to 8 MB, but is not enforced yet. Since ports are using up address space in
the kernel, those seems to be proper limits.
* This also fixes a strange, and rare lockup where the mouse cursor would still
move, but everything else would basically hang, but look perfectly normal from
KDL on the first look. As recently happened on Brecht's laptop, and debugged
by mmlr and me: the cbuf space got used up when lots of windows wanted to
redraw after a workspace switch. The app_server wouldn't answer anymore to
client requests, but thought it would have done so, as LinkSender::Flush()
doesn't care if it got a B_NO_MEMORY (the ports will now block until memory
is available if possible, so that should not be a problem anymore).
* Improved "port" KDL command, it now also prints the messages in the port.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33735 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e8885f2097350aad05676d1d4af009375fe06a9b 22-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

Basically rewrote the ports subsystem to use:
* its own heap allocator instead of cbuf - this makes cbuf superfluous, and I
therefore removed it from the kernel. The heap is swappable, so lifts the
kernel's resource usage a bit. In the future, the heap should grow as well;
right now it should be at least as good as before.
* it no longer uses spinlocks, but just mutexes now for better scalability - it
was not usable with interrupts turned off anyway (due to its semaphore usage).
* it no longer uses semaphores, but condition variables.
* Needed to move the port initialization to a later point, as swappable memory
wasn't usable that early.
* All ports test are still passing, hopefully I didn't mess anything up :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33728 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c39ecc608fa5c0494f64f0977fd451ad45490003 30-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* If getting a new port message failed, we must release the port's write sem
again, or else the port loses capacity.
* This fixes bug #2720.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30517 a95241bf-73f2-0310-859d-f6bbb57e9c96


# efd536ff89954302f42c59e2c71fba45e5cb4c25 11-Apr-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Cleared up a misconception in the notification mechanism. We already had
methods that used an "event mask" field. There was no need to introduce
a "flags" field for the same purpose.
* Renamed protected DefaultNotificationService methods (removed "_" prefix).
* Adjusted the code providing a notification service accordingly.
* Changed the event message several notification services generated by renaming
the "opcode" field to "event".
* Implemented the TEAM_ADDED event and also added a TEAM_EXEC event.
* Added notifications for threads and images.
* Added visitor-like iteration functions for teams, threads, and images.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30126 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 51755cf83253c3ebc37694505611eb82189c3b4d 15-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Added DefaultNotificationService and DefaultUserNotificationService
implementations that can be used by subsystems that want to have a pretty
standard service. Only the latter is really complete, though.
* The notification manager is now available earlier in the boot process.
* Added notifications to teams/ports (only add/remove).
* The network notification implementation is now using the
DefaultUserNotificationService.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29543 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5f87692c6668c49396d5e5d99be8d7ad9dfdcd9d 16-Sep-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Increased the maximal port message size to 256 KB. The profiling
messages easily hit the previous limit. Maybe another solution should be
sought.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27591 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b4ec7b8ee52c34fb6edce3e9cf2806f5c04a25c9 14-Sep-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added (kernel private) B_PEEK_PORT_MESSAGE flag for read_port_etc().
When specified, the message is read but not removed from the port.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27527 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5e760150c229c63d7fcea7252a41ad72b84d8755 07-Jun-2008 Michael Lotz <mmlr@mlotz.ch>

* Add read, write and total count to the ports KDL command so one can see
what the ports of a team are up to without having to go through each port
individually.
* Enlarge the port id column so even large ids fit nicely.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25857 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1c8de8581b66c14ea94bccd7ddcea99291955796 01-Jun-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added optional spinlock contention measurement feature. Enabled when
B_DEBUG_SPINLOCK_CONTENTION is defined to 1. It typedefs spinlock to a
structure (thus breaking BeOS binary compatibility), containing a
counter which is incremented whenever a thread has to wait for the
spinlock.
* Added macros for spinlock initialization and access and changed
code using spinlocks accordingly. This breaks compilation for BeOS --
the macros should be defined in the respective compatibility wrappers.
* Added generic syscall to get the spinlock counters for the thread and
the team spinlocks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25752 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 61de73e29c36ace1accce6304eec291dd8b42d52 25-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Memory leak in error cases. CID 729.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25659 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7727e08e5f055aef8db4f3920ba5a4c8769d1fa8 17-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

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


# 4048494ce44a925d3d1e40e4ffb9abe670b4b827 17-Feb-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

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


# 3cad4dae710330a157a006d3215dfdbf44a558a5 28-Jan-2008 Marcus Overhagen <marcusoverhagen@gmail.com>

Print ids in decimal.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23780 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5aee691ed843815dab1736dc5eb77d9cd20ea1ef 17-Jan-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

The "sem" and "port" debugger commands set some temporary variables,
now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23595 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ce637fda24b5c07f99236db30b2f9086d77317bb 17-Jan-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added usage (respectively more detailed usage) messages for "sem",
"sems", "port", and "ports" debugger commands.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23586 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 224aee3ffc83a306629696fe4cf45cad9efa4349 17-Jan-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

sem.c -> sem.cpp, port.c -> port.cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23585 a95241bf-73f2-0310-859d-f6bbb57e9c96