Searched +hist:24 +hist:df6592 (Results 76 - 100 of 101) sorted by relevance

12345

/haiku/headers/private/kernel/
H A Duser_debugger.hdiff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff e988d660 Thu Feb 24 09:07:19 MST 2005 Ingo Weinhold <ingo_weinhold@gmx.de> * Added B_TEAM_DEBUG_DEFAULT_FLAGS and B_THREAD_DEBUG_DEFAULT_FLAGS for
convenience.
* Added/implemented callbacks for almost all missing debug events (team,
thread, image creation/deletion, exceptions/faults, signals).
* The debugger can now specify how to deal with the event that stopped an
event (ignore or handle signals, exceptions/faults).
* Implemented B_DEBUGGED_THREAD_GET_WHY_STOPPED debugger message.
* The cpu_state is now passed to the debugger with
B_DEBUGGER_MESSAGE_THREAD_STOPPED notifications.
* Completed _user_debugger() implementation.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11474 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 24df65921befcd0ad0c5c7866118f922da61cb96 Sat Jun 11 18:00:23 MDT 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
diff e988d660225608f53ba8bc7db8758ac04581befd Thu Feb 24 09:07:19 MST 2005 Ingo Weinhold <ingo_weinhold@gmx.de> * Added B_TEAM_DEBUG_DEFAULT_FLAGS and B_THREAD_DEBUG_DEFAULT_FLAGS for
convenience.
* Added/implemented callbacks for almost all missing debug events (team,
thread, image creation/deletion, exceptions/faults, signals).
* The debugger can now specify how to deal with the event that stopped an
event (ignore or handle signals, exceptions/faults).
* Implemented B_DEBUGGED_THREAD_GET_WHY_STOPPED debugger message.
* The cpu_state is now passed to the debugger with
B_DEBUGGER_MESSAGE_THREAD_STOPPED notifications.
* Completed _user_debugger() implementation.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11474 a95241bf-73f2-0310-859d-f6bbb57e9c96
H A Dthread.hdiff 03f7d3d1 Sun Nov 24 14:51:07 MST 2013 Pawel Dziepak <pdziepak@quarnos.org> kernel: Restore logical processor disabling
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff badc7b67 Sun Feb 18 17:11:24 MST 2007 Travis Geiselbrecht <geist@foobox.com> yet another fix for #1018, which has at this point blossomed into a reorg of how AP cpus are initialized.
the new cpuid stuff was apparently exacerbating an existing problem where various bits of low level
cpu code (specifically get_current_cpu) weren't really initialized before being used. Changed the
order to set up a fake set of threads to point each cpu at really early in boot to make sure that at
all points in code it can get the current 'thread' and thus the current cpu.
A probably better solution would be to have dr3 point to the current cpu which would then point to the
current thread, but that has a race condition that would require an int disable, etc.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20160 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff f3cadd05 Tue Jan 25 07:24:01 MST 2005 Axel Dörfler <axeld@pinc-software.de> Improved header - struct kernel_args was only defined in arch headers.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11019 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 52a38012 Mon Jul 08 18:24:59 MDT 2002 ejakowatz <ejakowatz@nowhere.fake> It is accomplished ...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 03f7d3d1db10c0a467bea944fb3230ee70c6e015 Sun Nov 24 14:51:07 MST 2013 Pawel Dziepak <pdziepak@quarnos.org> kernel: Restore logical processor disabling
diff 24df65921befcd0ad0c5c7866118f922da61cb96 Sat Jun 11 18:00:23 MDT 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
diff badc7b674eca3e33d1c5f865a626966110790f8f Sun Feb 18 17:11:24 MST 2007 Travis Geiselbrecht <geist@foobox.com> yet another fix for #1018, which has at this point blossomed into a reorg of how AP cpus are initialized.
the new cpuid stuff was apparently exacerbating an existing problem where various bits of low level
cpu code (specifically get_current_cpu) weren't really initialized before being used. Changed the
order to set up a fake set of threads to point each cpu at really early in boot to make sure that at
all points in code it can get the current 'thread' and thus the current cpu.
A probably better solution would be to have dr3 point to the current cpu which would then point to the
current thread, but that has a race condition that would require an int disable, etc.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20160 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff f3cadd05dddd7e0781ae57e6f33b1d33123dacd6 Tue Jan 25 07:24:01 MST 2005 Axel Dörfler <axeld@pinc-software.de> Improved header - struct kernel_args was only defined in arch headers.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11019 a95241bf-73f2-0310-859d-f6bbb57e9c96
H A Dthread_types.hdiff a959262c Sat Dec 14 04:24:38 MST 2019 Adrien Destugues <pulkomandy@pulkomandy.tk> implement mlock(), munlock()

Change-Id: I2f04b8986d2ed32bb4d30d238d668e21a1505778
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1991
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
diff 467fe4ca Sun Apr 24 10:22:14 MDT 2016 Ingo Weinhold <ingo_weinhold@gmx.de> kernel: Add core dump facility

* Add function core_dump_write_core_file(). It writes a core file for
the current thread's team. The file format is similar to that of
other OSs (i.e. ELF with PT_LOAD segments and a PT_NOTE segment), but
most of the notes are Haiku specific (infos for team, areas, images,
threads). More data will probably need to be added.
* Add team flag TEAM_FLAG_DUMP_CORE, thread flag
THREAD_FLAGS_TRAP_FOR_CORE_DUMP, and Team property coreDumpCondition,
a condition variable available while a core dump is progress. A
thread that finds its flag THREAD_FLAGS_TRAP_FOR_CORE_DUMP set before
exiting the kernel to userland calls core_dump_trap_thread(), which
blocks on the condition variable until the core dump has finished. We
need the team's threads to stop so we can get their CPU state (and
have a generally unchanging team state while writing the core file).
* Add user debugger message B_DEBUG_WRITE_CORE_FILE. It causes
core_dump_write_core_file() to be called for the team.
* Dumping core as an immediate effect of a terminal signal has not been
implemented yet, but that should be fairly straight forward.
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24bcf559 Mon Aug 27 21:29:14 MDT 2007 Ingo Weinhold <ingo_weinhold@gmx.de> * 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
diff 6961cdf6 Thu Aug 24 16:58:48 MDT 2006 Axel Dörfler <axeld@pinc-software.de> Process groups are no longer searched via their team/session, but by using a separate
hash. This also allows them to stay valid after the group leader died when there are
other teams left in it. This closes bug #1.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18622 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 24df65921befcd0ad0c5c7866118f922da61cb96 Sat Jun 11 18:00:23 MDT 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
diff 24bcf55926212cfc26ffbed2cb71fe3ca2b99c68 Mon Aug 27 21:29:14 MDT 2007 Ingo Weinhold <ingo_weinhold@gmx.de> * 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
diff 6961cdf6f2a3f128c2a89160b1ab1534ca5819e9 Thu Aug 24 16:58:48 MDT 2006 Axel Dörfler <axeld@pinc-software.de> Process groups are no longer searched via their team/session, but by using a separate
hash. This also allows them to stay valid after the group leader died when there are
other teams left in it. This closes bug #1.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18622 a95241bf-73f2-0310-859d-f6bbb57e9c96
/haiku/src/system/kernel/lib/
H A DJamfilediff ddde98b0 Mon Jul 24 14:23:41 MDT 2023 Augustin Cavalier <waddlesplash@gmail.com> kernel: Move some source files around.

* stack_protector.cpp now lives with other files in "lib".

* Notifications.cpp, wait_for_objects.cpp go to a new "events" directory,
which will soon contain more files related to the event_queue.

No functional change.
diff d9e730c8 Sun Jul 24 08:55:10 MDT 2022 PulkoMandy <pulkomandy@pulkomandy.tk> libroot: generate a name for nameless volumes

Generate a name indicating the volume size and filesystem.

Remove code that was doing that or similar things in various
filesystems.

Change-Id: I6b993735e58cdfaf1f19af575e918614c7fe5679
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5381
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df65921befcd0ad0c5c7866118f922da61cb96 Sat Jun 11 18:00:23 MDT 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
/haiku/src/system/kernel/
H A Dsignal.cppdiff 467fe4ca Sun Apr 24 10:22:14 MDT 2016 Ingo Weinhold <ingo_weinhold@gmx.de> kernel: Add core dump facility

* Add function core_dump_write_core_file(). It writes a core file for
the current thread's team. The file format is similar to that of
other OSs (i.e. ELF with PT_LOAD segments and a PT_NOTE segment), but
most of the notes are Haiku specific (infos for team, areas, images,
threads). More data will probably need to be added.
* Add team flag TEAM_FLAG_DUMP_CORE, thread flag
THREAD_FLAGS_TRAP_FOR_CORE_DUMP, and Team property coreDumpCondition,
a condition variable available while a core dump is progress. A
thread that finds its flag THREAD_FLAGS_TRAP_FOR_CORE_DUMP set before
exiting the kernel to userland calls core_dump_trap_thread(), which
blocks on the condition variable until the core dump has finished. We
need the team's threads to stop so we can get their CPU state (and
have a generally unchanging team state while writing the core file).
* Add user debugger message B_DEBUG_WRITE_CORE_FILE. It causes
core_dump_write_core_file() to be called for the team.
* Dumping core as an immediate effect of a terminal signal has not been
implemented yet, but that should be fairly straight forward.
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 6bf15ffc Sun Apr 27 08:24:18 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> * Changed macros that enable tracing for individual components from
defined/undefined to numeric values (0 for undefined). This allows for
trace levels.
* Set SYSCALL_TRACING_IGNORE_KTRACE_OUTPUT default to 1, since this is
what one usually wants.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25213 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff ab23dfa7 Sat Jan 19 10:24:34 MST 2008 Ingo Weinhold <ingo_weinhold@gmx.de> Moved tracing macro definitions into separate tracing_config.h header.
So now there's a central place to enable tracing in general and for
individual components.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23645 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff d0c2af77 Mon Oct 01 16:24:42 MDT 2007 Ingo Weinhold <ingo_weinhold@gmx.de> Addressed a deadlock race condition: Acquiration of condition variable
and thread spinlock was reverse in Wait() and Notify(). The thread lock
is now the outer lock -- this way it is still possible to call Notify()
with the thread lock being held.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22401 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 33f0dbe4 Mon Sep 03 15:35:24 MDT 2007 Ingo Weinhold <ingo_weinhold@gmx.de> * Resolved TODO: waitpid() clears pending SIGCHLD, if the signal is
blocked and no other child status is available.
* Respect SA_NOCLDWAIT and ignored SIGCHLD in waitpid(): Unless a child
status is available immediately, the thread shall block until all
children are gone.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22161 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff e8b3ee81 Tue Aug 28 08:24:34 MDT 2007 Ingo Weinhold <ingo_weinhold@gmx.de> SIGCHLD also needs to be sent when a child is stopped. The shell now
properly realized when a job has been stopped.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22093 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 24bcf559 Mon Aug 27 21:29:14 MDT 2007 Ingo Weinhold <ingo_weinhold@gmx.de> * 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
diff 24df65921befcd0ad0c5c7866118f922da61cb96 Sat Jun 11 18:00:23 MDT 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
H A Dmain.cppdiff 04be20a7 Sat May 01 07:24:28 MDT 2021 Jérôme Duval <jerome.duval@gmail.com> Implement stack protection support

this adds kernel & libroot stack protector hooks. it uses /dev/random in userspace.
A configure option --enable-stack-protector is added to activate -fstack-protector
on selected system components (ATM apps, kits, servers).

Change-Id: If3a2920ba9aa0a85eaff4ba6778947f8c76ade31
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3895
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff e8885f20 Thu Oct 22 07:24:12 MDT 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
diff fab1c05c Wed Jun 24 07:53:58 MDT 2009 Ingo Weinhold <ingo_weinhold@gmx.de> Split the commpage initialization into two parts. The second part is executed
after all CPUs have been queried for their features. On SMP machines
sysenter/sysexit weren't used before due to the non-boot CPUs appearing not
to have the feature.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31226 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff c586076d Thu Jul 24 17:33:38 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> Patch by Zhao Shuai with changes by myself:
* Init swap support in main().
* Added "bool swappable" parameter to
VMCacheFactory::CreateAnonymousCache(). A cache supporting swapping
is created when true. Adjusted invocations accordingly.
* The page writer does now write non-locked swappable pages (when
memory is low).
* Fixed header guard of VMAnonymousNoSwapCache.h.
* Swap support is compiled conditionally, controlled by the
ENABLE_SWAP_SUPPORT in src/system/kernel/vm/VMAnonymousCache.h. It is
disabled ATM. Since no swap files are added, it wouldn't have much
effect anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26625 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 24df65921befcd0ad0c5c7866118f922da61cb96 Sat Jun 11 18:00:23 MDT 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
diff e8885f2097350aad05676d1d4af009375fe06a9b Thu Oct 22 07:24:12 MDT 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
diff fab1c05c0521518ed89f3ed4ebc176dfe1cdbf70 Wed Jun 24 07:53:58 MDT 2009 Ingo Weinhold <ingo_weinhold@gmx.de> Split the commpage initialization into two parts. The second part is executed
after all CPUs have been queried for their features. On SMP machines
sysenter/sysexit weren't used before due to the non-boot CPUs appearing not
to have the feature.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31226 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff c586076dcafe59a79b7f3073f2471497d62b29af Thu Jul 24 17:33:38 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> Patch by Zhao Shuai with changes by myself:
* Init swap support in main().
* Added "bool swappable" parameter to
VMCacheFactory::CreateAnonymousCache(). A cache supporting swapping
is created when true. Adjusted invocations accordingly.
* The page writer does now write non-locked swappable pages (when
memory is low).
* Fixed header guard of VMAnonymousNoSwapCache.h.
* Swap support is compiled conditionally, controlled by the
ENABLE_SWAP_SUPPORT in src/system/kernel/vm/VMAnonymousCache.h. It is
disabled ATM. Since no swap files are added, it wouldn't have much
effect anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26625 a95241bf-73f2-0310-859d-f6bbb57e9c96
H A Dsem.cppdiff c83bde41 Thu Apr 05 09:35:59 MDT 2012 Ingo Weinhold <ingo_weinhold@gmx.de> switch_sem_etc(): Unbreak the actual switch case

The scheduler lock was still being held when release_sem_etc() was
called. The bug was introduced in
24df65921befcd0ad0c5c7866118f922da61cb96. Fixes #8448.
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 59dbd26f Mon Oct 20 08:24:46 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> * Moved more debug macros to kernel_debug_config.h.
* Turned the checks for all those macros to "#if"s instead of "#ifdef"s.
* Introduced macro KDEBUG_LEVEL which serves as a master setting.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28248 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff e225a906 Thu Apr 24 14:04:43 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> With my recent changes release_sem_etc() accidentally lost the
cleverness to reschedule only, if it actually unblocked another thread.
Should have been the reason for #2152 (overall slowdown).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25131 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff c83bde410aa07480175ab2b0743c35da9a0572bb Thu Apr 05 09:35:59 MDT 2012 Ingo Weinhold <ingo_weinhold@gmx.de> switch_sem_etc(): Unbreak the actual switch case

The scheduler lock was still being held when release_sem_etc() was
called. The bug was introduced in
24df65921befcd0ad0c5c7866118f922da61cb96. Fixes #8448.
diff 24df65921befcd0ad0c5c7866118f922da61cb96 Sat Jun 11 18:00:23 MDT 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
diff 59dbd26f5f41a6c1272f6cac9c8cda4b19b79097 Mon Oct 20 08:24:46 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> * Moved more debug macros to kernel_debug_config.h.
* Turned the checks for all those macros to "#if"s instead of "#ifdef"s.
* Introduced macro KDEBUG_LEVEL which serves as a master setting.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28248 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff e225a906d2ac4e4f4a22d3787265c5124ed8e2b4 Thu Apr 24 14:04:43 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> With my recent changes release_sem_etc() accidentally lost the
cleverness to reschedule only, if it actually unblocked another thread.
Should have been the reason for #2152 (overall slowdown).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25131 a95241bf-73f2-0310-859d-f6bbb57e9c96
H A Delf.cppdiff f83058d1 Sun Sep 24 20:44:29 MDT 2023 X512 <danger_mail@list.ru> elf: add PT_RISCV_ATTRIBUTES program header

Attribute is ignored for now.

It is supposed to check ABI compatiblity and reject loading incompatible images.
Haiku currently do not use multiple ABIs for RISC-V so it is safe to ignore attributes.

PT_RISCV_ATTRIBUTES program header is produced by default in GCC 13 and Clang 17.

Change-Id: I4659e9bacbf34a2a0bc16b34c2aaa37232d700fa
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6948
Reviewed-by: David Karoly <karolyd577@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
diff ef593f61 Sat Nov 24 19:08:31 MST 2018 Augustin Cavalier <waddlesplash@gmail.com> ELF: Ignore PT_EH_FRAME and PT_STACK.

This allows Clang builds (linked with our cross binutils) to
at least start runtime_loader and then try to load launch_daemon.
That fails with an infinite loop somewhere...
diff f1244978 Fri Jun 22 12:24:51 MDT 2012 Alex Smith <alex@alex-smith.me.uk> Added an ELF64 version of preloaded_image.

* There is now 2 structures, preloaded_elf32_image and preloaded_elf64_image,
which both inherit from preloaded_image.
* For now I've just hardcoded in use of preloaded_elf32_image, but the
bootloader ELF code will shortly be converted to use templates which use
the appropriate structure. The kernel will be changed later when I add
ELF64 support to it.
* All kernel_args data is now compatible between 32-bit and 64-bit kernels.
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff c07db2ec Fri Nov 26 06:32:24 MST 2010 Ingo Weinhold <ingo_weinhold@gmx.de> * elf_find_symbol(): Skip undefined symbols and symbols with the wrong binding.
* Implemented missing handling of symbolically linked images and of weak
symbols.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39646 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff bbd97b4b Thu Dec 03 07:18:24 MST 2009 Ingo Weinhold <ingo_weinhold@gmx.de> Made the VMArea fields base and size private and added accessors instead.
This makes it more explicit where the fields are modified.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34464 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff f2d4d6f6 Sun May 24 17:10:55 MDT 2009 Michael Lotz <mmlr@mlotz.ch> Invalidate the elfHeader variable when the image struct is deleted on error, as
they share the same pointer. Should fix bug #3955.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30848 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff e6e76e14 Tue Nov 11 14:24:09 MST 2008 Axel Dörfler <axeld@pinc-software.de> * elf_find_symbol() now checks if the hashtable section is greater than 0.
* Whatever is the cause of #2733, this should at least not make it crash.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28615 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff fec47a57 Wed Sep 24 08:40:24 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> Added functions elf_create_memory_image() and
elf_add_memory_image_symbol(). The former creates and registers a new
image that has not been loaded from a file. The latter adds a symbol to
its symbol table. This is mainly a debug feature, allowing to name code
or data in memory regions that aren't associated with loaded ELF
objects.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27721 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff fec47a57 Wed Sep 24 08:40:24 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> Added functions elf_create_memory_image() and
elf_add_memory_image_symbol(). The former creates and registers a new
image that has not been loaded from a file. The latter adds a symbol to
its symbol table. This is mainly a debug feature, allowing to name code
or data in memory regions that aren't associated with loaded ELF
objects.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27721 a95241bf-73f2-0310-859d-f6bbb57e9c96
H A DJamfilediff ddde98b0 Mon Jul 24 14:23:41 MDT 2023 Augustin Cavalier <waddlesplash@gmail.com> kernel: Move some source files around.

* stack_protector.cpp now lives with other files in "lib".

* Notifications.cpp, wait_for_objects.cpp go to a new "events" directory,
which will soon contain more files related to the event_queue.

No functional change.
diff c00a982d Thu Oct 28 13:24:53 MDT 2021 PulkoMandy <pulkomandy@pulkomandy.tk> kernel: do not allow undefined symbols

If there are undefined symbols, we can't load the kernel (the bootloader
complains about missing relocations). It makes sense to not allow that
at compile time.

Change-Id: I430bebada16544ffa8be293cd6c075338970d8ce
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4668
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
diff 04be20a7 Sat May 01 07:24:28 MDT 2021 Jérôme Duval <jerome.duval@gmail.com> Implement stack protection support

this adds kernel & libroot stack protector hooks. it uses /dev/random in userspace.
A configure option --enable-stack-protector is added to activate -fstack-protector
on selected system components (ATM apps, kits, servers).

Change-Id: If3a2920ba9aa0a85eaff4ba6778947f8c76ade31
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3895
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24fde47c Sat Mar 21 18:39:51 MDT 2009 Rene Gollent <anevilyak@gmail.com> Introduce an experimental new scheduler intended to work fundamentally the same as our existing one, but with various optimizations to better handle the SMP case:
1) We now maintain a runqueue per CPU, rather than a single global shared queue. Idle threads are segregated into their own queue for simplicity.
2) Enqueueing threads is now somewhat more intelligent - if the thread is pinned, it is always enqueued onto that core. Otherwise we enqueue it on whichever CPU it previously ran, unless it either hasn't run before, or that core has been disabled via ProcessController. If so, we try to enqueue it on whichever core has been the most idle recently.
3) The above allow various simplifications to thread scheduling. Pinned threads and/or disabled cores are now no longer special cases that need to be dealt with. If a CPU has no threads ready, it looks for another one to steal a thread from, though that part still needs some tuning along with enqueueing for load balancing purposes.

The chief aim here is better load balancing and support for soft affinity. However, at the moment the overall behavior still exhibits some regressions compared to the old scheduler, so it's disabled by default. If you wish to experiment/debug with it, instructions for enabling it can be found in scheduler.cpp. Much thanks to Ingo, Axel and everyone who's helped with either code review/advice or testing so far.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29643 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 6bbe7eb8 Tue Oct 07 15:14:24 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> * smp.c -> smp.cpp
* Added smp_send_multicast_ici(), which sends the message to all CPUs
specified via a mask.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27910 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff a6d2523e Thu Jul 24 17:19:51 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> Removed superfluous whitespace.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26624 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 81423c91 Wed Apr 25 21:41:24 MDT 2007 Hugo Santos <hugosantos@nowhere.fake> added initial slab code to the kernel. It is still unused, and there is still no VM interaction.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20832 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 24df65921befcd0ad0c5c7866118f922da61cb96 Sat Jun 11 18:00:23 MDT 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
H A Dteam.cppdiff 1f2e9ca2 Sat Jun 24 11:26:18 MDT 2023 Niels Sascha Reedijk <niels.reedijk@gmail.com> kernel: ignore overflow warnings in teams.cpp and threads.cpp

GCC's overflow checker gives a warning about the potential that the atomic
functions called in teams.cpp and threads.cpp will write to a null-pointer.
In this case, it is safe to assume that the values will never be null,
therefore these warnings can be safely ignored.

Relates to/fixes #17734

Change-Id: I777ff96f2812ed7d3ba57a46cad89ef6994cb08f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6643
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
diff 4986a9a3 Sun May 24 14:14:09 MDT 2020 Michael Lotz <mmlr@mlotz.ch> Revert "kernel: Remove the B_KERNEL_AREA protection flag."

This reverts parts of hrev52546 that removed the B_KERNEL_AREA
protection flag and replaced it with an address space comparison.

Checking for areas in the kernel address space inside a user address
space does not work, as areas can only ever belong to one address space.
This rendered these checks ineffective and allowed to unmap, delete or
resize kernel managed areas from their respective userland teams.

That protection was meant to be applied to the team user data area which
was introduced to reduce the kernel to userland overhead by directly
sharing some data between the two. It was intended to be set up in such
a manner that this is safe on the kernel side and the B_KERNEL_AREA flag
was introduced specifically for this purpose.

Incidentally the actual application of the B_KERNEL_AREA flag on the
team user data area was apparently forgotten in the original commit.

The absence of that protection allowed applications to induce KDLs by
modifying the user area and generating a signal for example.

This change restores the B_KERNEL_AREA flag and also applies it to the
team user data area.

Change-Id: I993bb1cf7c6ae10085100db7df7cc23fe66f4edd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2836
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
diff 467fe4ca Sun Apr 24 10:22:14 MDT 2016 Ingo Weinhold <ingo_weinhold@gmx.de> kernel: Add core dump facility

* Add function core_dump_write_core_file(). It writes a core file for
the current thread's team. The file format is similar to that of
other OSs (i.e. ELF with PT_LOAD segments and a PT_NOTE segment), but
most of the notes are Haiku specific (infos for team, areas, images,
threads). More data will probably need to be added.
* Add team flag TEAM_FLAG_DUMP_CORE, thread flag
THREAD_FLAGS_TRAP_FOR_CORE_DUMP, and Team property coreDumpCondition,
a condition variable available while a core dump is progress. A
thread that finds its flag THREAD_FLAGS_TRAP_FOR_CORE_DUMP set before
exiting the kernel to userland calls core_dump_trap_thread(), which
blocks on the condition variable until the core dump has finished. We
need the team's threads to stop so we can get their CPU state (and
have a generally unchanging team state while writing the core file).
* Add user debugger message B_DEBUG_WRITE_CORE_FILE. It causes
core_dump_write_core_file() to be called for the team.
* Dumping core as an immediate effect of a terminal signal has not been
implemented yet, but that should be fairly straight forward.
diff 2872aba0 Sun Dec 04 12:14:24 MST 2011 Michael Lotz <mmlr@mlotz.ch> Fix missing reference to the old group with lock still held.

Removing the team from the group may have released the last reference
to the group and freed it. Since we still have a locker on that group
it would later crash on unlock, therefore we need a reference to the
old group before removing the team from it.
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff b327a1bc Wed May 20 17:10:13 MDT 2009 Oliver Tappe <zooey@hirschkaefer.de> * when forking a team, not only the signal mask, but also the sig_actions
and the signal stack must be copied into the new thread (at least that's
what I could make of IEEE Std 1003.1-2001 regarding the expected behaviour
of fork)
This brings down the failures of the rsync test suite from 24 to 18 ...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30807 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff cdc6ad72 Thu Jul 24 17:03:59 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> Don't clone the user thread area on fork(), just create a new one for
the new team. Otherwise it would lose it's properties (full lock,
B_KERNEL_AREA).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26622 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff a1e3759f Sat May 24 10:17:56 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> Memory leak in error cases. CID 808.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25644 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 6bf15ffc Sun Apr 27 08:24:18 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> * Changed macros that enable tracing for individual components from
defined/undefined to numeric values (0 for undefined). This allows for
trace levels.
* Set SYSCALL_TRACING_IGNORE_KTRACE_OUTPUT default to 1, since this is
what one usually wants.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25213 a95241bf-73f2-0310-859d-f6bbb57e9c96
H A Dthread.cppdiff 1f2e9ca2 Sat Jun 24 11:26:18 MDT 2023 Niels Sascha Reedijk <niels.reedijk@gmail.com> kernel: ignore overflow warnings in teams.cpp and threads.cpp

GCC's overflow checker gives a warning about the potential that the atomic
functions called in teams.cpp and threads.cpp will write to a null-pointer.
In this case, it is safe to assume that the values will never be null,
therefore these warnings can be safely ignored.

Relates to/fixes #17734

Change-Id: I777ff96f2812ed7d3ba57a46cad89ef6994cb08f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6643
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
diff d86a240a Wed Mar 29 09:24:17 MDT 2023 Augustin Cavalier <waddlesplash@gmail.com> kernel/thread: Refactor thread-local-storage initialization and updating.

* TLS slots are not in any way architecture-specific; we do not even
have a mechanism by which they could be made so at present.
Thus, the initialization of them can be moved to common code, and
out of the per-architecture implementations.

* When dealing with a fork()ed thread, it will already have a TLS array
with values set in it. Therefore, do not overwrite the whole array,
but instead only update the specific values which have changed on fork.
This fixes at least part of #17896.
diff aa083651 Sat Nov 24 19:07:18 MST 2018 Augustin Cavalier <waddlesplash@gmail.com> kernel: thread->name is never NULL as it is an array.

Spotted by Clang (-Wtautological-pointer-compare.)
diff 03f7d3d1 Sun Nov 24 14:51:07 MST 2013 Pawel Dziepak <pdziepak@quarnos.org> kernel: Restore logical processor disabling
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 210199c5 Thu Apr 24 19:08:07 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> * Resolved {g,s}etrlimit() TODO's, i.e. moved the implementation into
separate functions and made the set errno correctly.
* Added RLIMIT_CORE case. We don't support core dumps, but setting them
to disabled shouldn't fail anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25141 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 24bcf559 Mon Aug 27 21:29:14 MDT 2007 Ingo Weinhold <ingo_weinhold@gmx.de> * 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
diff 03f7d3d1db10c0a467bea944fb3230ee70c6e015 Sun Nov 24 14:51:07 MST 2013 Pawel Dziepak <pdziepak@quarnos.org> kernel: Restore logical processor disabling
diff 24df65921befcd0ad0c5c7866118f922da61cb96 Sat Jun 11 18:00:23 MDT 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
/haiku/build/jam/
H A DMainBuildRulesdiff 7a617f59 Sun May 03 11:24:26 MDT 2020 Augustin Cavalier <waddlesplash@gmail.com> configure & build: Add basic support for building with MSYS.

Also remove the MINGW support, as it was far too incomplete.

This *should* work under case-sensitive NTFS, but instead,
it seems #14963 occurs. So perhaps there is a GCC bug
related to case-sensitive vs. case-insensitivity after all.
diff f6fe3824 Sat Nov 24 12:35:10 MST 2018 Augustin Cavalier <waddlesplash@gmail.com> MainBuildRules: Fail if the generated struct-offsets header is empty.

In some LTO-related experiments, it came out empty due to GCC
not generating actual assembly but rather intermediate code,
resulting in various later targets failing with quite literally
thousands of errors.
diff 88d51506 Fri Oct 31 09:24:24 MDT 2014 François Revol <revol@free.fr> Move ARM device tree files to an arch-specific subfolder

FDT are also used on PPC at least, and at least skeleton.dtsi
might clash since there is a different one for PPC.
diff 88d51506 Fri Oct 31 09:24:24 MDT 2014 François Revol <revol@free.fr> Move ARM device tree files to an arch-specific subfolder

FDT are also used on PPC at least, and at least skeleton.dtsi
might clash since there is a different one for PPC.
diff 6b40edde Wed Apr 24 12:27:55 MDT 2013 Jérôme Duval <jerome.duval@gmail.com> build: switch from link option -nostart to -shared for addons and libs.

* they are interchangeable in GCC 2 and 4.6.
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 51b3b53e Sat Apr 22 10:51:24 MDT 2006 Jérôme Duval <korli@users.berlios.de> now links against libroot.so after user link objects
this avoids linking against libroot.so's glob symbol when user lib provides it
fixes bug #535. this implies libroot.so's glob implementation could need a review.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17202 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 88d51506d0f23af02f95b881c85a2aba204c1e23 Fri Oct 31 09:24:24 MDT 2014 François Revol <revol@free.fr> Move ARM device tree files to an arch-specific subfolder

FDT are also used on PPC at least, and at least skeleton.dtsi
might clash since there is a different one for PPC.
diff 88d51506d0f23af02f95b881c85a2aba204c1e23 Fri Oct 31 09:24:24 MDT 2014 François Revol <revol@free.fr> Move ARM device tree files to an arch-specific subfolder

FDT are also used on PPC at least, and at least skeleton.dtsi
might clash since there is a different one for PPC.
/haiku/src/system/kernel/arch/x86/
H A Darch_debug.cppdiff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff bbd97b4b Thu Dec 03 07:18:24 MST 2009 Ingo Weinhold <ingo_weinhold@gmx.de> Made the VMArea fields base and size private and added accessors instead.
This makes it more explicit where the fields are modified.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34464 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 6a1f462e Wed Jun 24 05:49:35 MDT 2009 Ingo Weinhold <ingo_weinhold@gmx.de> * arch_debug_get_interrupt_pc() does now optionally return whether the iframe
is a syscall iframe.
* User debugger support: Don't to call BreakpointManager::PrepareToContinue(),
if the thread returns from a syscall. We don't want to skip breakpoints in
that case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31223 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 18f2a9c1 Sun Aug 24 17:01:43 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> Added support for architecture specific debug variables, e.g. for
referencing iframe registers. Their prefix is "$". E.g. "$eax" refers to
the eax register of the current iframe. The features cooperates with the
"in_context" command, i.e. "in_context 92 $eip = 0" will set the eip
register of thread 92 to 0 (thus sealing its fate ;-)).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27192 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 1b20a9a5 Sun Aug 24 15:46:10 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> arch_debug_get_interrupt_pc() does now also support the currently
debugged thread, if set. This makes "dis" without specified address work
when used with "in_context".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27190 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 24df65921befcd0ad0c5c7866118f922da61cb96 Sat Jun 11 18:00:23 MDT 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
diff bbd97b4bb41cc03735528962ff53d89a2a2d7ff2 Thu Dec 03 07:18:24 MST 2009 Ingo Weinhold <ingo_weinhold@gmx.de> Made the VMArea fields base and size private and added accessors instead.
This makes it more explicit where the fields are modified.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34464 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 6a1f462e722992471836c74232c6eb8c8125751b Wed Jun 24 05:49:35 MDT 2009 Ingo Weinhold <ingo_weinhold@gmx.de> * arch_debug_get_interrupt_pc() does now optionally return whether the iframe
is a syscall iframe.
* User debugger support: Don't to call BreakpointManager::PrepareToContinue(),
if the thread returns from a syscall. We don't want to skip breakpoints in
that case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31223 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 18f2a9c17d2b2439b9acbcca4cf99069b9b17e6e Sun Aug 24 17:01:43 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> Added support for architecture specific debug variables, e.g. for
referencing iframe registers. Their prefix is "$". E.g. "$eax" refers to
the eax register of the current iframe. The features cooperates with the
"in_context" command, i.e. "in_context 92 $eip = 0" will set the eip
register of thread 92 to 0 (thus sealing its fate ;-)).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27192 a95241bf-73f2-0310-859d-f6bbb57e9c96
H A Darch_thread.cppdiff d86a240a Wed Mar 29 09:24:17 MDT 2023 Augustin Cavalier <waddlesplash@gmail.com> kernel/thread: Refactor thread-local-storage initialization and updating.

* TLS slots are not in any way architecture-specific; we do not even
have a mechanism by which they could be made so at present.
Thus, the initialization of them can be moved to common code, and
out of the per-architecture implementations.

* When dealing with a fork()ed thread, it will already have a TLS array
with values set in it. Therefore, do not overwrite the whole array,
but instead only update the specific values which have changed on fork.
This fixes at least part of #17896.
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff c3e021e8 Sat Jun 05 16:09:24 MDT 2010 Ingo Weinhold <ingo_weinhold@gmx.de> x86:
* Renamed i386_context_switch() to x86_context_switch().
* x86_context_switch() no longer sets the page directory.
arch_thread_context_switch() does that explicitly, now. This allows to solve
the TODO by reordering releasing the previous paging structures reference and
setting the new page directory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37024 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 2cf60f90 Wed Feb 24 12:50:20 MST 2010 Ingo Weinhold <ingo_weinhold@gmx.de> * Moved the syscall stuff from arch_commpage.cpp to x86_syscalls.{cpp,h}.
* On context switches we do now set the IA32_MSR_SYSENTER_ESP. This saves us
setting esp at the beginning of x86_sysenter(). More importantly when
entering it in single-step mode, this no longer causes a double fault
(cf. #3487). We still don't handle the resulting debug exception correctly,
so that we still get a (continuable) panic().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35609 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 24df65921befcd0ad0c5c7866118f922da61cb96 Sat Jun 11 18:00:23 MDT 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
diff c3e021e8629592850fecb7cf98a0cc2cf055a0d9 Sat Jun 05 16:09:24 MDT 2010 Ingo Weinhold <ingo_weinhold@gmx.de> x86:
* Renamed i386_context_switch() to x86_context_switch().
* x86_context_switch() no longer sets the page directory.
arch_thread_context_switch() does that explicitly, now. This allows to solve
the TODO by reordering releasing the previous paging structures reference and
setting the new page directory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37024 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 2cf60f9070b06681ff0c4cf04d3ffbda2ca7805f Wed Feb 24 12:50:20 MST 2010 Ingo Weinhold <ingo_weinhold@gmx.de> * Moved the syscall stuff from arch_commpage.cpp to x86_syscalls.{cpp,h}.
* On context switches we do now set the IA32_MSR_SYSENTER_ESP. This saves us
setting esp at the beginning of x86_sysenter(). More importantly when
entering it in single-step mode, this no longer causes a double fault
(cf. #3487). We still don't handle the resulting debug exception correctly,
so that we still get a (continuable) panic().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35609 a95241bf-73f2-0310-859d-f6bbb57e9c96
H A DJamfilediff 24eb3d5a Wed Apr 13 07:46:34 MDT 2022 X512 <danger_mail@list.ru> kernel: do not use assembly code for commpage signal handler

Unify with x86 and riscv64 implementation.

Change-Id: I2f44575768628eb3a2d4eaaa86f020de582ecd0b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5203
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
diff 26e0b0c8 Sat Aug 24 13:32:24 MDT 2019 Augustin Cavalier <waddlesplash@gmail.com> kernel/x86_64: Add errata patching.

The patched errata are only the AMD ones FreeBSD patches
(it seems there are no Intel errata that can be patched
this way, they are all in microcode updates ... or can't
be patched in the CPU at all.)

This also seems to be roughly the point in the boot that
FreeBSD patches these, too, despite how "critical" some
of them seem.

Change-Id: I9065f8d025332418a21c2cdf39afd7d29405edcc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1740
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
diff 26e0b0c8 Sat Aug 24 13:32:24 MDT 2019 Augustin Cavalier <waddlesplash@gmail.com> kernel/x86_64: Add errata patching.

The patched errata are only the AMD ones FreeBSD patches
(it seems there are no Intel errata that can be patched
this way, they are all in microcode updates ... or can't
be patched in the CPU at all.)

This also seems to be roughly the point in the boot that
FreeBSD patches these, too, despite how "critical" some
of them seem.

Change-Id: I9065f8d025332418a21c2cdf39afd7d29405edcc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1740
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
diff c1517626 Fri Jul 06 08:24:02 MDT 2012 Alex Smith <alex@alex-smith.me.uk> Compile APIC and timer code for x86_64, and create an area for the IDT.
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 2cf60f90 Wed Feb 24 12:50:20 MST 2010 Ingo Weinhold <ingo_weinhold@gmx.de> * Moved the syscall stuff from arch_commpage.cpp to x86_syscalls.{cpp,h}.
* On context switches we do now set the IA32_MSR_SYSENTER_ESP. This saves us
setting esp at the beginning of x86_sysenter(). More importantly when
entering it in single-step mode, this no longer causes a double fault
(cf. #3487). We still don't handle the resulting debug exception correctly,
so that we still get a (continuable) panic().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35609 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff c15176264b7fa5b4e20b4692d30ed9403fd9c71b Fri Jul 06 08:24:02 MDT 2012 Alex Smith <alex@alex-smith.me.uk> Compile APIC and timer code for x86_64, and create an area for the IDT.
diff 24df65921befcd0ad0c5c7866118f922da61cb96 Sat Jun 11 18:00:23 MDT 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
diff 2cf60f9070b06681ff0c4cf04d3ffbda2ca7805f Wed Feb 24 12:50:20 MST 2010 Ingo Weinhold <ingo_weinhold@gmx.de> * Moved the syscall stuff from arch_commpage.cpp to x86_syscalls.{cpp,h}.
* On context switches we do now set the IA32_MSR_SYSENTER_ESP. This saves us
setting esp at the beginning of x86_sysenter(). More importantly when
entering it in single-step mode, this no longer causes a double fault
(cf. #3487). We still don't handle the resulting debug exception correctly,
so that we still get a (continuable) panic().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35609 a95241bf-73f2-0310-859d-f6bbb57e9c96
H A Darch_int.cppdiff 9268c3d7 Fri Sep 27 14:24:49 MDT 2019 Kacper Kasper <kacperkasper@gmail.com> x86: Reorder ifs in page fault handler

* If interrupts were disabled, SMAP and SMEP violation message was
shadowed by confusing "page fault but interrupts disabled" panic.

Change-Id: I7470329984e55330f35fdca9b7c253fc4684e0c8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1891
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff a56cbb2a Wed May 11 12:05:05 MDT 2011 Michael Lotz <mmlr@mlotz.ch> * When initializing MSI support, don't assume a single 24 entry IO-APIC. Instead
mark the ISA interrupts as unusable and then use ioapic_is_interrupt_available
to determine if that vector is possibly taken by an IO-APIC. If IO-APICs are
not used, this will simply always return false, leaving all vectors free for
MSI use.
* The msi_init() now has to be done after a potential IO-APIC init, so it is now
done after ioapic_init() instead of inside apic_init().
* Add apic_disable_local_ints() to clear the local ints on the local APIC once
we are in APIC mode (i.e. the IO-APIC is set up and we don't need the external
routing anymore).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41445 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 24df65921befcd0ad0c5c7866118f922da61cb96 Sat Jun 11 18:00:23 MDT 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
diff a56cbb2afbf4dbfb4a07dfdd95f10637a195a053 Wed May 11 12:05:05 MDT 2011 Michael Lotz <mmlr@mlotz.ch> * When initializing MSI support, don't assume a single 24 entry IO-APIC. Instead
mark the ISA interrupts as unusable and then use ioapic_is_interrupt_available
to determine if that vector is possibly taken by an IO-APIC. If IO-APICs are
not used, this will simply always return false, leaving all vectors free for
MSI use.
* The msi_init() now has to be done after a potential IO-APIC init, so it is now
done after ioapic_init() instead of inside apic_init().
* Add apic_disable_local_ints() to clear the local ints on the local APIC once
we are in APIC mode (i.e. the IO-APIC is set up and we don't need the external
routing anymore).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41445 a95241bf-73f2-0310-859d-f6bbb57e9c96
/haiku/src/apps/terminal/
H A DTermApp.cppdiff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 70f7a8ad Fri Nov 20 12:47:24 MST 2009 Stefano Ceccherini <stefano.ceccherini@gmail.com> Cleanup: removed unused messages constant and classes, merged AppearPrefView
with PrefView, moved main from Terminal.cpp to TermApp.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34163 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff cd2b8867 Fri Jul 27 15:43:24 MDT 2007 Stefano Ceccherini <stefano.ceccherini@gmail.com> Removed weird code in TermWindow::WindowActivated. Added basic
Archive(), Instantiate(), and unarchiving constructor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21724 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 0d5dea62 Tue Jan 03 07:24:43 MST 2006 Axel Dörfler <axeld@pinc-software.de> * Setting the window title via "-t" now works.
* Improved error message in case the initial shell couldn't be executed.
* Disabled setting the colors via arguments, mostly because it just did quit
the app in case there were any arguments and no /etc/rgb.txt file. This
allows Terminal to be used by the debug_server instead of MiniTerminal.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15820 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 24df65921befcd0ad0c5c7866118f922da61cb96 Sat Jun 11 18:00:23 MDT 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
diff 70f7a8ad0f5ae85b18c2ae9ad9b0d45f7f87522c Fri Nov 20 12:47:24 MST 2009 Stefano Ceccherini <stefano.ceccherini@gmail.com> Cleanup: removed unused messages constant and classes, merged AppearPrefView
with PrefView, moved main from Terminal.cpp to TermApp.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34163 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff cd2b8867e1d331be8bfb4f0db30f659c82e30907 Fri Jul 27 15:43:24 MDT 2007 Stefano Ceccherini <stefano.ceccherini@gmail.com> Removed weird code in TermWindow::WindowActivated. Added basic
Archive(), Instantiate(), and unarchiving constructor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21724 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 0d5dea62de02f705791d0e3ca15f9a50e53ffea3 Tue Jan 03 07:24:43 MST 2006 Axel Dörfler <axeld@pinc-software.de> * Setting the window title via "-t" now works.
* Improved error message in case the initial shell couldn't be executed.
* Disabled setting the colors via arguments, mostly because it just did quit
the app in case there were any arguments and no /etc/rgb.txt file. This
allows Terminal to be used by the debug_server instead of MiniTerminal.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15820 a95241bf-73f2-0310-859d-f6bbb57e9c96
/haiku/src/system/kernel/debug/
H A Duser_debugger.cppdiff 24f7b647 Sun Aug 04 13:52:01 MDT 2019 Augustin Cavalier <waddlesplash@gmail.com> kernel/user_debugger: Initialize the condition variables.

Should (actually) fix #15223 and #15226. After things settle
down a bit, I'll refactor our ConditionVariable constructors
to detect this at compile time instead of creating obscure
KDLs...
diff 467fe4ca Sun Apr 24 10:22:14 MDT 2016 Ingo Weinhold <ingo_weinhold@gmx.de> kernel: Add core dump facility

* Add function core_dump_write_core_file(). It writes a core file for
the current thread's team. The file format is similar to that of
other OSs (i.e. ELF with PT_LOAD segments and a PT_NOTE segment), but
most of the notes are Haiku specific (infos for team, areas, images,
threads). More data will probably need to be added.
* Add team flag TEAM_FLAG_DUMP_CORE, thread flag
THREAD_FLAGS_TRAP_FOR_CORE_DUMP, and Team property coreDumpCondition,
a condition variable available while a core dump is progress. A
thread that finds its flag THREAD_FLAGS_TRAP_FOR_CORE_DUMP set before
exiting the kernel to userland calls core_dump_trap_thread(), which
blocks on the condition variable until the core dump has finished. We
need the team's threads to stop so we can get their CPU state (and
have a generally unchanging team state while writing the core file).
* Add user debugger message B_DEBUG_WRITE_CORE_FILE. It causes
core_dump_write_core_file() to be called for the team.
* Dumping core as an immediate effect of a terminal signal has not been
implemented yet, but that should be fairly straight forward.
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 6f33e728 Tue Apr 06 14:24:23 MDT 2010 Ingo Weinhold <ingo_weinhold@gmx.de> Handle sigaction[_etc]() return value correctly (it's not an error code).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36056 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 6a1f462e Wed Jun 24 05:49:35 MDT 2009 Ingo Weinhold <ingo_weinhold@gmx.de> * arch_debug_get_interrupt_pc() does now optionally return whether the iframe
is a syscall iframe.
* User debugger support: Don't to call BreakpointManager::PrepareToContinue(),
if the thread returns from a syscall. We don't want to skip breakpoints in
that case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31223 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 24df65921befcd0ad0c5c7866118f922da61cb96 Sat Jun 11 18:00:23 MDT 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
diff 6f33e7286f0f1e9c8af24913cd1e00dce6223d72 Tue Apr 06 14:24:23 MDT 2010 Ingo Weinhold <ingo_weinhold@gmx.de> Handle sigaction[_etc]() return value correctly (it's not an error code).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36056 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 6a1f462e722992471836c74232c6eb8c8125751b Wed Jun 24 05:49:35 MDT 2009 Ingo Weinhold <ingo_weinhold@gmx.de> * arch_debug_get_interrupt_pc() does now optionally return whether the iframe
is a syscall iframe.
* User debugger support: Don't to call BreakpointManager::PrepareToContinue(),
if the thread returns from a syscall. We don't want to skip breakpoints in
that case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31223 a95241bf-73f2-0310-859d-f6bbb57e9c96
/haiku/src/system/kernel/vm/
H A DVMCache.cppdiff 484bf053 Wed Apr 26 13:34:24 MDT 2023 Augustin Cavalier <waddlesplash@gmail.com> VMCache: Use THREAD_BLOCK_TYPE_OTHER_OBJECT.

This would have assisted in debugging #18390.
diff 36a1e12f Tue Dec 07 19:24:00 MST 2021 Augustin Cavalier <waddlesplash@gmail.com> kernel/vm: Cast temporary to uint32.

It is defined as a uint32:1, which apparently becomes an "int" on
newer GCC versions, which thus triggers a -Werror=format. So,
convert it explicitly in order to prevent the error.
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff ad6ad0f1 Sun Jan 24 17:21:12 MST 2010 Ingo Weinhold <ingo_weinhold@gmx.de> VMCache::Init(): Initialize the debug_* members before allocating the
VMCacheRef object, since that can fail, in which case the subsequently called
Delete() would use uninitialized pointers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35279 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 66896bba Tue Jan 05 15:04:24 MST 2010 Ingo Weinhold <ingo_weinhold@gmx.de> RemovePage() + InsertPage() == MovePage()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34913 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 24df65921befcd0ad0c5c7866118f922da61cb96 Sat Jun 11 18:00:23 MDT 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
diff ad6ad0f124076a9afce022ed4d5bb850089b78f8 Sun Jan 24 17:21:12 MST 2010 Ingo Weinhold <ingo_weinhold@gmx.de> VMCache::Init(): Initialize the debug_* members before allocating the
VMCacheRef object, since that can fail, in which case the subsequently called
Delete() would use uninitialized pointers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35279 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 66896bba13361874e677c96fc90690b9e75c2aeb Tue Jan 05 15:04:24 MST 2010 Ingo Weinhold <ingo_weinhold@gmx.de> RemovePage() + InsertPage() == MovePage()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34913 a95241bf-73f2-0310-859d-f6bbb57e9c96
H A Dvm_page.cppdiff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 83bc49d0 Thu May 06 07:42:24 MDT 2010 Ingo Weinhold <ingo_weinhold@gmx.de> vm_page_requeue(): Disabled DEBUG_PAGE_ACCESS_CHECK(). Since r36155
idle_scan_active_pages() cannot satisfy this assertion anymore. Added TODO
for a better fix which can wait until after the release.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36649 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 24244d3c Sat Feb 20 10:24:14 MST 2010 Ingo Weinhold <ingo_weinhold@gmx.de> idle_scan_active_pages(): vm_page_requeue() requires the caller to mark the
page accessed for the access debugging feature.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35542 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 59dbd26f Mon Oct 20 08:24:46 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> * Moved more debug macros to kernel_debug_config.h.
* Turned the checks for all those macros to "#if"s instead of "#ifdef"s.
* Introduced macro KDEBUG_LEVEL which serves as a master setting.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28248 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff c586076d Thu Jul 24 17:33:38 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> Patch by Zhao Shuai with changes by myself:
* Init swap support in main().
* Added "bool swappable" parameter to
VMCacheFactory::CreateAnonymousCache(). A cache supporting swapping
is created when true. Adjusted invocations accordingly.
* The page writer does now write non-locked swappable pages (when
memory is low).
* Fixed header guard of VMAnonymousNoSwapCache.h.
* Swap support is compiled conditionally, controlled by the
ENABLE_SWAP_SUPPORT in src/system/kernel/vm/VMAnonymousCache.h. It is
disabled ATM. Since no swap files are added, it wouldn't have much
effect anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26625 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 6bf15ffc Sun Apr 27 08:24:18 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> * Changed macros that enable tracing for individual components from
defined/undefined to numeric values (0 for undefined). This allows for
trace levels.
* Set SYSCALL_TRACING_IGNORE_KTRACE_OUTPUT default to 1, since this is
what one usually wants.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25213 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff f98d60ae Wed Sep 26 18:12:24 MDT 2007 Axel Dörfler <axeld@pinc-software.de> * Removed the automatic release of the "modified_pages_available" semaphore
in enqueue_page() - it doesn't really belong there.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22328 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 24df65921befcd0ad0c5c7866118f922da61cb96 Sat Jun 11 18:00:23 MDT 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
diff 83bc49d051ab7b13365f9865ae57d337313101a2 Thu May 06 07:42:24 MDT 2010 Ingo Weinhold <ingo_weinhold@gmx.de> vm_page_requeue(): Disabled DEBUG_PAGE_ACCESS_CHECK(). Since r36155
idle_scan_active_pages() cannot satisfy this assertion anymore. Added TODO
for a better fix which can wait until after the release.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36649 a95241bf-73f2-0310-859d-f6bbb57e9c96
/haiku/src/system/kernel/fs/
H A Dfd.cppdiff 831abecd Fri Oct 24 16:23:37 MDT 2014 Michael Lotz <mmlr@mlotz.ch> kernel: Fix unbalanced release of sync object in FD select race.

When a file descriptor is closed between being selected and adding the
select info to its IO context, the select info needs to be cleaned up.
This is done by deselect_select_infos() which unconditionally also put
the select_sync associated with the infos. In this special case we do
not yet hold a reference to the select_sync however, so avoid putting
the corresponding sync object.

Fixes #11098, #10763 and #10230.
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 9d570af7 Mon May 24 15:04:22 MDT 2010 Ingo Weinhold <ingo_weinhold@gmx.de> Changed the type of the "op" parameter of the fs_vnode_ops::ioctl() hook and
the _kern_ioctl() syscall from ulong to uint32.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36927 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff cb734bee Sun May 04 18:24:14 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> Added get_open_fd() function which gets the descriptor and also
increments its open count.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25317 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 831abecd6a3f7296f54de2492d33dbc4b60bc657 Fri Oct 24 16:23:37 MDT 2014 Michael Lotz <mmlr@mlotz.ch> kernel: Fix unbalanced release of sync object in FD select race.

When a file descriptor is closed between being selected and adding the
select info to its IO context, the select info needs to be cleaned up.
This is done by deselect_select_infos() which unconditionally also put
the select_sync associated with the infos. In this special case we do
not yet hold a reference to the select_sync however, so avoid putting
the corresponding sync object.

Fixes #11098, #10763 and #10230.
diff 24df65921befcd0ad0c5c7866118f922da61cb96 Sat Jun 11 18:00:23 MDT 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
diff 9d570af7c878ba30043b23e6dce5f3ae5578aa7c Mon May 24 15:04:22 MDT 2010 Ingo Weinhold <ingo_weinhold@gmx.de> Changed the type of the "op" parameter of the fs_vnode_ops::ioctl() hook and
the _kern_ioctl() syscall from ulong to uint32.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36927 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff cb734beeee7c27c72d7464d429fa67805619ba84 Sun May 04 18:24:14 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> Added get_open_fd() function which gets the descriptor and also
increments its open count.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25317 a95241bf-73f2-0310-859d-f6bbb57e9c96
H A Dvfs.cppdiff 38c4c8bf Wed Feb 20 19:13:24 MST 2019 François Revol <revol@free.fr> kernel: fix mount arguments checks from userland

Since NULL is not considered a user address anymore, we must check for
it first.

This fixes the "mount: Bad address" error after hrev52905.

Change-Id: If60ea58bb81b6c35c6bf27ecfa9b29bd7a25d8aa
diff e7e7a552 Wed Dec 12 17:24:59 MST 2018 Augustin Cavalier <waddlesplash@gmail.com> kernel/fs: Account for vnode being NULL in vfs_release_posix_lock.

When the FD is put() but not freed while O_DISCONNECTED, its "ops"
and "vnode" are cleared. Thus it is entirely valid for a non-NULL
file FD to have a NULL vnode, so we should just treat such FDs
as if the locks had already been cleared (which they should have.)

Fixes #14294.
diff 26740b28 Thu Aug 24 09:46:45 MDT 2017 Jérôme Duval <jerome.duval@gmail.com> POSIX: F_DUPFD_CLOEXEC support (POSIX.1-2008).

* fix #12187.
diff 2d4d0f0a Wed Jul 12 09:36:24 MDT 2017 Jérôme Duval <jerome.duval@gmail.com> Revert "vfs.cpp: Fix gcc6 crash."

This reverts commit 5b55f6dba9d905e26729961a146de825277c9d79.
diff 1e6dd3fe Fri Apr 24 17:08:00 MDT 2015 Murai Takashi <tmurai01@gmail.com> Fix GCC 5 maybe-uninitialized warnings.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes #12020
diff 38b150a9 Sun Nov 24 16:44:33 MST 2013 Ingo Weinhold <ingo_weinhold@gmx.de> VFS FIFO: Add "fifo" KDL command

Prints information about a FIFO node and, optionally, its data buffer
content.
diff 8855625e Tue Jun 21 15:24:23 MDT 2011 Ingo Weinhold <ingo_weinhold@gmx.de> fix_dirent(): Fix ref count leaks

* Only get an additional parent reference, when going to call
vnode_path_to_vnode().
* Put the reference of the vnode vnode_path_to_vnode() returns.
diff 19c48aa4 Tue Jun 21 15:24:23 MDT 2011 Ingo Weinhold <ingo_weinhold@gmx.de> fix_dirent(): Fix ref count leaks

* Only get an additional parent reference, when going to call
vnode_path_to_vnode().
* Put the reference of the vnode vnode_path_to_vnode() returns.
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
/haiku/headers/private/system/
H A Dsyscalls.hdiff a959262c Sat Dec 14 04:24:38 MST 2019 Adrien Destugues <pulkomandy@pulkomandy.tk> implement mlock(), munlock()

Change-Id: I2f04b8986d2ed32bb4d30d238d668e21a1505778
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1991
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 9d570af7 Mon May 24 15:04:22 MDT 2010 Ingo Weinhold <ingo_weinhold@gmx.de> Changed the type of the "op" parameter of the fs_vnode_ops::ioctl() hook and
the _kern_ioctl() syscall from ulong to uint32.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36927 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 24df65921befcd0ad0c5c7866118f922da61cb96 Sat Jun 11 18:00:23 MDT 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
diff 9d570af7c878ba30043b23e6dce5f3ae5578aa7c Mon May 24 15:04:22 MDT 2010 Ingo Weinhold <ingo_weinhold@gmx.de> Changed the type of the "op" parameter of the fs_vnode_ops::ioctl() hook and
the _kern_ioctl() syscall from ulong to uint32.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36927 a95241bf-73f2-0310-859d-f6bbb57e9c96
/haiku/headers/private/kernel/arch/x86/
H A Darch_cpu.hdiff 26e0b0c8 Sat Aug 24 13:32:24 MDT 2019 Augustin Cavalier <waddlesplash@gmail.com> kernel/x86_64: Add errata patching.

The patched errata are only the AMD ones FreeBSD patches
(it seems there are no Intel errata that can be patched
this way, they are all in microcode updates ... or can't
be patched in the CPU at all.)

This also seems to be roughly the point in the boot that
FreeBSD patches these, too, despite how "critical" some
of them seem.

Change-Id: I9065f8d025332418a21c2cdf39afd7d29405edcc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1740
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
diff 26e0b0c8 Sat Aug 24 13:32:24 MDT 2019 Augustin Cavalier <waddlesplash@gmail.com> kernel/x86_64: Add errata patching.

The patched errata are only the AMD ones FreeBSD patches
(it seems there are no Intel errata that can be patched
this way, they are all in microcode updates ... or can't
be patched in the CPU at all.)

This also seems to be roughly the point in the boot that
FreeBSD patches these, too, despite how "critical" some
of them seem.

Change-Id: I9065f8d025332418a21c2cdf39afd7d29405edcc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1740
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
diff 0e94a12f Sun Nov 24 16:35:15 MST 2013 Pawel Dziepak <pdziepak@quarnos.org> kernel: Make CACHE_LINE_ALIGN visible in the whole kernel
diff 45cf3294 Tue Apr 03 08:02:24 MDT 2012 Yongcong Du <ycdu.vmcore@gmail.com> x86: add cpuid feature 6 flags

Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
diff d387f54a Mon Apr 09 07:18:24 MDT 2012 Alexander von Gluck IV <kallisti5@unixzen.com> x86: Change cpu feature flags to shifts

* No functional change
* Added missing ia64 emulation flag
* More closely matches AMD_EXT defines
* Easier to read compared to CPU documentation
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff c3e021e8 Sat Jun 05 16:09:24 MDT 2010 Ingo Weinhold <ingo_weinhold@gmx.de> x86:
* Renamed i386_context_switch() to x86_context_switch().
* x86_context_switch() no longer sets the page directory.
arch_thread_context_switch() does that explicitly, now. This allows to solve
the TODO by reordering releasing the previous paging structures reference and
setting the new page directory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37024 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff dfb5375d Tue Feb 13 23:24:59 MST 2007 Travis Geiselbrecht <geist@foobox.com> clean up TSS initialization.

Now two complete tss structures exist within the per-cpu structure. Instead
of having to create a seperate area per each one, initialize them in place.
Also, the old mechanism to getting all of the cpus to get initialized was
subtly broken, but still managed to work. Now, just force all the cpus to
initialize at boot, which makes the actual swapping of esp0 somewhat simpler.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20131 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff edb55663 Mon Apr 04 08:07:24 MDT 2005 Axel Dörfler <axeld@pinc-software.de> Fixed struct tss; there is no ss3/sp3.
Moved ptentry/pdentry to arch_vm_translation_map.c and renamed them to
page_table_entry and page_directory_entry.
Fixed a race condition that happened when memory was remapped (which
can currently happen because lock_memory() does not work correctly, and
there might be other conditions as well, like certain vm_store fault
handlers). Now, page table and directory entries are updated atomically.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12229 a95241bf-73f2-0310-859d-f6bbb57e9c96
/haiku/headers/os/kernel/
H A DOS.hdiff 1c2d7d3a Thu Jun 16 11:58:24 MDT 2011 Ingo Weinhold <ingo_weinhold@gmx.de> Fixed x86_64 handling by the build system.

* Map build variables HOST_CPU and HOST_ARCH to x86_64, if it they are
* x86 and
64 bit and define the __x86_64__ C macro instead of __INTEL__ in that
case.
* <OS.h>: Also handle __x86_64__.
diff f1eeb323 Thu Jun 16 11:58:24 MDT 2011 Ingo Weinhold <ingo_weinhold@gmx.de> Fixed x86_64 handling by the build system.

* Map build variables HOST_CPU and HOST_ARCH to x86_64, if it they are
* x86 and
64 bit and define the __x86_64__ C macro instead of __INTEL__ in that
case.
* <OS.h>: Also handle __x86_64__.
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 24df6592 Sat Jun 11 18:00:23 MDT 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
diff 9c7b2520 Sat Nov 07 01:19:24 MST 2009 Ingo Weinhold <ingo_weinhold@gmx.de> Added get_pthread_thread_id() function returning the Haiku thread_id of a
pthread.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33927 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 1e8adb7d Thu Aug 24 04:33:50 MDT 2006 Jérôme Duval <korli@users.berlios.de> added core and core 2 ids


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18603 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 06e37d1e Mon May 10 07:24:14 MDT 2004 Axel Dörfler <axeld@pinc-software.de> Fix missing identation.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7488 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff afa70266 Fri Oct 24 08:50:15 MDT 2003 Axel Dörfler <axeld@pinc-software.de> Fixed set_real_time_clock() - its time parameter is now uint32 not int32,
that's what real_time_clock() returns as well. I don't know why Be made
it int32, but I don't care too much either.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5144 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 52a38012 Mon Jul 08 18:24:59 MDT 2002 ejakowatz <ejakowatz@nowhere.fake> It is accomplished ...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 1c2d7d3a86c79828aff76b35b2dd4085c72bfb2f Thu Jun 16 11:58:24 MDT 2011 Ingo Weinhold <ingo_weinhold@gmx.de> Fixed x86_64 handling by the build system.

* Map build variables HOST_CPU and HOST_ARCH to x86_64, if it they are
* x86 and
64 bit and define the __x86_64__ C macro instead of __INTEL__ in that
case.
* <OS.h>: Also handle __x86_64__.

Completed in 1059 milliseconds

12345