History log of /haiku/headers/posix/signal.h
Revision Date Author Comments
# efdfb840 30-Aug-2023 Augustin Cavalier <waddlesplash@gmail.com>

signal.h: Look for _DEFAULT_SOURCE not __USE_GNU for sighandler_t.

Our features.h does not define __USE_GNU, and so applications trying
to use this GNU-ism would have to define it for themselves, even if
_GNU_SOURCE had already been specified.


# 4ad7d95b 09-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Revert "Add sys/ucontext.h"

This reverts commit 6ddf93bfbec1ecec76cf119c50327f93f6d4fef8.

As pointed out by Ingo, those were moved to sugnal.h in the latest issue
(issue 7) of the POSIX spec. Sorry!


# 6ddf93bf 09-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Add sys/ucontext.h

* Move ucontext_t and mcontext_t there as that's where POSIX says they
should be.


# afaa6ed4 21-Sep-2013 Pawel Dziepak <pdziepak@quarnos.org>

x86[_64]: Randomize initial stack pointer on alternative signal stacks

If the alternate signal stack is used randomize the initial stack
pointer in the same way it is randomized on "normal" thread stacks.
Also, update MINSIGSTKSZ value so that regardless of where the new
stack pointer points to there is at least 4k of stack left.


# 02c3d9f5 31-Oct-2011 François Revol <revol@free.fr>

Rename some parameters to avoid "declaration of 'foo' shadows global declaration" warnings.


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


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

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


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


# 0fae8733 03-Nov-2010 Scott McCreary <scottmc2@gmail.com>

Updated posix headers to remove commas from copyright line, to match the preferred coding guidelines.
Cleaned up some header style violations, making sure there are two blank lines after the header guards.
This fixes the posix header part of #2191.


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


# 2222d055 24-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Introduced new header directory "config", which ATM contains HaikuConfig.h
and types.h. The idea is to provide a basic architecture/compiler
abstraction by defining types and macros that allow the posix/ and os/
headers to be mostly architecture/compiler agnostic.
* Adjusted the posix/ and os/ headers accordingly.
* <SupportDefs.h>: Introduced B_PRI* and B_SCN* macros similar to the PRI*
and SCN* macros defined in <inttypes.h>, just for the BeOS/Haiku [u]int*
types and some POSIX types (e.g. off_t, dev_t, ino_t) that don't have POSIX
macros. Also the B_PRI* and B_SCN* macros are available unconditionally,
unlike the <inttypes.h> macros, which require __STDC_FORMAT_MACROS to be
defined in C++ mode.


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


# 31a41b60 29-Jul-2009 Oliver Tappe <zooey@hirschkaefer.de>

Fixing #3460:
* resolved a couple of redundant function declaration in our public headers
* adjusted zipomatic accordingly - everything else built fine

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


# 9463ff4c 22-Jul-2009 François Revol <revol@free.fr>

[GSoC] [ARM] Patch by Johannes Wischert.
Add ARM defines.


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


# b7b78914 02-May-2009 Jonas Sundström <jonas@kirilla.com>

Adding mipsel arch.

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


# e38a38aa 14-Jan-2009 Axel Dörfler <axeld@pinc-software.de>

* I obviously forgot to commit this: adds siginterrupt() prototype, and
does some minor cleanup.


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


# d46a010c 28-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Vasilis Kaoutsis: Added sigpause().


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


# b9320128 10-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Andreas Faerber:
Replaced single-line comments by multi-line comments for ANSI C
compliance.


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


# 62319d06 18-Mar-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Commented out real-time signal related stuff (SA_SIGINFO, waitid()) to
prevent "configure" scripts from thinking we do actually support it.
Having real-time signals would be nice though (cf. #1935).


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


# f969977b 18-Nov-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Vasilis Kaoutsis (modified by myself): Implemented sigset().


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


# 99ed286c 09-Nov-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Vasilis Kaoutsis: Implemented sigrelse().


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


# 0a1968cf 06-Nov-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Vasilis Kaoutsis: Implemented sighold().


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


# 71544718 04-Nov-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed inline versions of sigismember(), sigaddset(), and sigdelset(). They
weren't in sync with the non-inline version in libroot anymore, and aren't
really performance-critical anyway.


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


# 74fa73ba 01-Nov-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Vasilis Kaoutsis: Implemented sigignore(). Small changes by myself.


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


# 82a9fd6a 24-Oct-2007 François Revol <revol@free.fr>

Add m68k to the big endian family.
Remove DOS CR from some files.
Add setjmp stuff for m68k (unfinished).
Moved arch specific stuff out of signal.h to arch/<arch>/signal.h
Added m68k vreg for signal.h (unfinished).


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


# 6bd2f399 24-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Vasilis Kaoutsis: Implemented killpg().


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


# a728651f 17-Aug-2007 Axel Dörfler <axeld@pinc-software.de>

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


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


# f1cea051 16-Aug-2007 Axel Dörfler <axeld@pinc-software.de>

Cleanup.


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


# 1ad334ed 15-Jun-2006 Jérôme Duval <korli@users.berlios.de>

uint => unsigned int


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


# ad6ada0b 21-Apr-2006 Jérôme Duval <korli@users.berlios.de>

removed struct _pthread* forward declarations, they're not needed
added some more posix definitions, though they might be never used in Haiku


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


# 758b1d0e 12-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixes that make Haiku build with gcc 4. Mainly out of the following
categories:
* Missing includes (like <stdlib.h> and <string.h>).
* Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so.
* Local variables shadowing parameters.
* Default parameters in function definitions (as opposed to function
declarations).
* All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported
explicitly from the std:: namespace now.
* "new (sometype)[...]" must read "new sometype[...]", even if sometype is
something like "const char *".
* __FUNCTION__ is no longer a string literal (but a string expression), i.e.
'printf(__FUNCTION__ ": ...\n")' is invalid code.
* A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes"
is an invalid expression.
* "friend class SomeClass" only works when SomeClass is known before.
Otherwise the an inner class with that name is considered as friend.
gcc 4 is much pickier about scopes.
* gcc 4 is generally stricter with respect to type conversions in C.



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


# 0e1358bd 30-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

Applied a patch from Alexander Deynichenko: added missing signal definitions.
That also includes some XSI signals, SIGPOLL and SIGVTALRM, dunno if we will every support
those in a useful way.


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


# e5ee1dad 02-Sep-2005 Jérôme Duval <korli@users.berlios.de>

added sigaddset, sigismember, sigdelset to libroot.so from inline versions in signal.h
moved static inline to extern inline to allow this change
please someone review this (ie are they platform dependent functions ?)
should fix bug #47


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


# c3d35103 06-Jul-2004 Axel Dörfler <axeld@pinc-software.de>

Added siginfo_t structure as required by ISO-C 99 - it's not yet used, though.
Smaller style cleanups.


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


# 14bc22fb 18-Nov-2002 Daniel Reinhold <danielre@nowhere.fake>

some cleanup and reorganization:
- the inline functions I introduced earlier have been removed
- the notes about non-Posix extensions to the sigaction struct have been
updated, enlarged, and moved out of the way (near the bottom of the file)
- all the function prototypes have been collected and placed together
- a few more items have been commented
- in general, the organization of the whole file should be more tidy now (I hope)


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


# c69a62db 16-Nov-2002 Daniel Reinhold <danielre@nowhere.fake>

several fixups:
a new typedef for signal handlers - sig_func_t
(the old one is kept around for backwards compatibility)

a new macro MAX_SIGNO to get rid of magic 32's all about

two more functions (sigemptyset and sigfillset) are now
defined inline as well


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


# 343b352f 26-Oct-2002 lillo <lillo@nowhere.fake>

Signals, 2nd pass: syscall restarting now only works on EINTR (removed other exotic retcodes like ERESTARTSYS); signal handlers now receive 3 args, and the vregs struct is used to save the signal context, making the system beos compatible.


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


# f510e6ce 23-Oct-2002 lillo <lillo@nowhere.fake>

posix signals support, 1st pass


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


# 4ad7d95bac481ad2c29b5ba200adceb18cf1575a 09-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Revert "Add sys/ucontext.h"

This reverts commit 6ddf93bfbec1ecec76cf119c50327f93f6d4fef8.

As pointed out by Ingo, those were moved to sugnal.h in the latest issue
(issue 7) of the POSIX spec. Sorry!


# 6ddf93bfbec1ecec76cf119c50327f93f6d4fef8 09-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Add sys/ucontext.h

* Move ucontext_t and mcontext_t there as that's where POSIX says they
should be.


# afaa6ed4b37c519afd3f593509fd490082d7b8d2 21-Sep-2013 Pawel Dziepak <pdziepak@quarnos.org>

x86[_64]: Randomize initial stack pointer on alternative signal stacks

If the alternate signal stack is used randomize the initial stack
pointer in the same way it is randomized on "normal" thread stacks.
Also, update MINSIGSTKSZ value so that regardless of where the new
stack pointer points to there is at least 4k of stack left.


# 02c3d9f5e6e7dbd7e6de9a6fd959cf5e934b583b 31-Oct-2011 François Revol <revol@free.fr>

Rename some parameters to avoid "declaration of 'foo' shadows global declaration" warnings.


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


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

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


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


# 0fae873352b02792db93f721c1a2ff6b240c8ecc 03-Nov-2010 Scott McCreary <scottmc2@gmail.com>

Updated posix headers to remove commas from copyright line, to match the preferred coding guidelines.
Cleaned up some header style violations, making sure there are two blank lines after the header guards.
This fixes the posix header part of #2191.


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


# 2222d0559df303a9846a2fad53741f8b20b14d7c 24-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Introduced new header directory "config", which ATM contains HaikuConfig.h
and types.h. The idea is to provide a basic architecture/compiler
abstraction by defining types and macros that allow the posix/ and os/
headers to be mostly architecture/compiler agnostic.
* Adjusted the posix/ and os/ headers accordingly.
* <SupportDefs.h>: Introduced B_PRI* and B_SCN* macros similar to the PRI*
and SCN* macros defined in <inttypes.h>, just for the BeOS/Haiku [u]int*
types and some POSIX types (e.g. off_t, dev_t, ino_t) that don't have POSIX
macros. Also the B_PRI* and B_SCN* macros are available unconditionally,
unlike the <inttypes.h> macros, which require __STDC_FORMAT_MACROS to be
defined in C++ mode.


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


# 31a41b605df6d6edf691fe3c620ee79366b94044 29-Jul-2009 Oliver Tappe <zooey@hirschkaefer.de>

Fixing #3460:
* resolved a couple of redundant function declaration in our public headers
* adjusted zipomatic accordingly - everything else built fine

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


# 9463ff4cb701d74a60fbd559f30063b05f0dc86a 22-Jul-2009 François Revol <revol@free.fr>

[GSoC] [ARM] Patch by Johannes Wischert.
Add ARM defines.


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


# b7b7891476af3099fdd23aae06fa18afbb9cedb0 02-May-2009 Jonas Sundström <jonas@kirilla.com>

Adding mipsel arch.

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


# e38a38aacfa0ee96456916a5bcaa01e293378dc1 14-Jan-2009 Axel Dörfler <axeld@pinc-software.de>

* I obviously forgot to commit this: adds siginterrupt() prototype, and
does some minor cleanup.


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


# d46a010c43680f56495b4d8afaf3f7d357f9c5ac 28-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Vasilis Kaoutsis: Added sigpause().


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


# b93201281504cee31f4186f7c6548815940c576e 10-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Andreas Faerber:
Replaced single-line comments by multi-line comments for ANSI C
compliance.


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


# 62319d069e19bcc45f06feb11d38d11dd42c6944 18-Mar-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Commented out real-time signal related stuff (SA_SIGINFO, waitid()) to
prevent "configure" scripts from thinking we do actually support it.
Having real-time signals would be nice though (cf. #1935).


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


# f969977bc1a8e5ec09baf170bd8d30b8a2a21f4f 18-Nov-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Vasilis Kaoutsis (modified by myself): Implemented sigset().


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


# 99ed286c9458a444b0346c760bdb6b5b5eaa0c65 09-Nov-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Vasilis Kaoutsis: Implemented sigrelse().


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


# 0a1968cf8f509527c7290d0415f481c155483653 06-Nov-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Vasilis Kaoutsis: Implemented sighold().


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


# 7154471870e09c8d6a1061e837f857b62b0e798c 04-Nov-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed inline versions of sigismember(), sigaddset(), and sigdelset(). They
weren't in sync with the non-inline version in libroot anymore, and aren't
really performance-critical anyway.


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


# 74fa73bac6e4a151a8423e76efc3b1f2e3262ade 01-Nov-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Vasilis Kaoutsis: Implemented sigignore(). Small changes by myself.


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


# 82a9fd6a48fba5919756476ab5dcd408ef76bcd1 24-Oct-2007 François Revol <revol@free.fr>

Add m68k to the big endian family.
Remove DOS CR from some files.
Add setjmp stuff for m68k (unfinished).
Moved arch specific stuff out of signal.h to arch/<arch>/signal.h
Added m68k vreg for signal.h (unfinished).


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


# 6bd2f399e8322230a6851e9908d8088d6cada447 24-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Vasilis Kaoutsis: Implemented killpg().


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


# a728651f04320792272030105dbdb10061a2278a 17-Aug-2007 Axel Dörfler <axeld@pinc-software.de>

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


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


# f1cea0512bfe5f6b73a7d1145eb90cd98927cccc 16-Aug-2007 Axel Dörfler <axeld@pinc-software.de>

Cleanup.


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


# 1ad334ed8907c0e9e2d8521a407f514fa0946ca2 15-Jun-2006 Jérôme Duval <korli@users.berlios.de>

uint => unsigned int


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


# ad6ada0be5b9fb1f589ce83a4e852aa0ba8789f8 21-Apr-2006 Jérôme Duval <korli@users.berlios.de>

removed struct _pthread* forward declarations, they're not needed
added some more posix definitions, though they might be never used in Haiku


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


# 758b1d0e05fe1042cce6e00d194a147802d4f9be 12-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixes that make Haiku build with gcc 4. Mainly out of the following
categories:
* Missing includes (like <stdlib.h> and <string.h>).
* Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so.
* Local variables shadowing parameters.
* Default parameters in function definitions (as opposed to function
declarations).
* All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported
explicitly from the std:: namespace now.
* "new (sometype)[...]" must read "new sometype[...]", even if sometype is
something like "const char *".
* __FUNCTION__ is no longer a string literal (but a string expression), i.e.
'printf(__FUNCTION__ ": ...\n")' is invalid code.
* A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes"
is an invalid expression.
* "friend class SomeClass" only works when SomeClass is known before.
Otherwise the an inner class with that name is considered as friend.
gcc 4 is much pickier about scopes.
* gcc 4 is generally stricter with respect to type conversions in C.



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


# 0e1358bd5c83835c5fe784bfd45866d205bf868b 30-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

Applied a patch from Alexander Deynichenko: added missing signal definitions.
That also includes some XSI signals, SIGPOLL and SIGVTALRM, dunno if we will every support
those in a useful way.


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


# e5ee1dad6ab3bffbd5525addb276077580c2a027 02-Sep-2005 Jérôme Duval <korli@users.berlios.de>

added sigaddset, sigismember, sigdelset to libroot.so from inline versions in signal.h
moved static inline to extern inline to allow this change
please someone review this (ie are they platform dependent functions ?)
should fix bug #47


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


# c3d35103c74dd774cc4bb0b38dfaace1802c2eb4 06-Jul-2004 Axel Dörfler <axeld@pinc-software.de>

Added siginfo_t structure as required by ISO-C 99 - it's not yet used, though.
Smaller style cleanups.


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


# 14bc22fb88bbae44abcdc45afdd28c9b8e8bd1b8 18-Nov-2002 Daniel Reinhold <danielre@nowhere.fake>

some cleanup and reorganization:
- the inline functions I introduced earlier have been removed
- the notes about non-Posix extensions to the sigaction struct have been
updated, enlarged, and moved out of the way (near the bottom of the file)
- all the function prototypes have been collected and placed together
- a few more items have been commented
- in general, the organization of the whole file should be more tidy now (I hope)


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


# c69a62db20a9ee20c05f7e3eb23c3c0f4f01342d 16-Nov-2002 Daniel Reinhold <danielre@nowhere.fake>

several fixups:
a new typedef for signal handlers - sig_func_t
(the old one is kept around for backwards compatibility)

a new macro MAX_SIGNO to get rid of magic 32's all about

two more functions (sigemptyset and sigfillset) are now
defined inline as well


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


# 343b352fe164af9bf4f481fb9dca952298cb6a6c 26-Oct-2002 lillo <lillo@nowhere.fake>

Signals, 2nd pass: syscall restarting now only works on EINTR (removed other exotic retcodes like ERESTARTSYS); signal handlers now receive 3 args, and the vregs struct is used to save the signal context, making the system beos compatible.


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


# f510e6ce601d2e7f3f88df110749a5bf02e79268 23-Oct-2002 lillo <lillo@nowhere.fake>

posix signals support, 1st pass


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