summaryrefslogtreecommitdiffstats
path: root/sys/sys/_sigset.h
Commit message (Collapse)AuthorAgeFilesLines
* /* -> /*- for license, minor formatting changesimp2005-01-071-1/+1
|
* Remove advertising clause from University of California Regent's license,imp2004-04-071-4/+0
| | | | | | per letter dated July 22, 1999. Approved by: core
* Split 4.x and 5.x signal handling so that we can keep 4.x signalpeter2002-10-251-0/+4
| | | | | | | | | | | | | | | | handling clean and functional as 5.x evolves. This allows some of the nasty bandaids in the 5.x codepaths to be unwound. Encapsulate 4.x signal handling under COMPAT_FREEBSD4 (there is an anti-foot-shooting measure in place, 5.x folks need this for a while) and finish encapsulating the older stuff under COMPAT_43. Since the ancient stuff is required on alpha (longjmp(3) passes a 'struct osigcontext *' to the current sigreturn(2), instead of the 'ucontext_t *' that sigreturn is supposed to take), add a compile time check to prevent foot shooting there too. Add uniform COMPAT_43 stubs for ia64/sparc64/powerpc. Tested on: i386, alpha, ia64. Compiled on sparc64 (a few days ago). Approved by: re
* Change <sys/_sigset.h> to typedef __sigset_t instead of sigset_t, somike2002-10-051-1/+1
| | | | that headers that include it can conditionalize sigset_t's visibility.
* Quick fix for the type of the bitmap in sigset_t. It was an array ofbde2002-06-201-3/+3
| | | | | | | | | | | 4 u_ints but needs to be an array of 4 uint32_t's to work, at least if unsigned ints have less than 32 bits. It should be a non-array of 1 uint128_t on 128-bit machines, especially if u_int has 128 bits. The headers that declare uint32_t (actually __uint32_t) are intentionally not included here since this header should only be included by other headers. Fixed some style bugs (space instead of tab after #ifndef and #endif).
* Delete everything except the sigset_t definitions (subsequent towollman2002-06-161-252/+3
| | | | repo-copy).
* Remove __Palfred2002-03-191-6/+5
|
* Use struct __ucontext in prototypes and associated functions instead ofdeischen2002-02-171-2/+5
| | | | | | | | | | ucontext_t. Forward declare struct __ucontext in <sys/signal.h> and remove reliance on <sys/ucontext.h> being included. While I'm here, also hide osigcontext types from userland; suggested by bde. Namespace pollution noticed by: Kevin Day <toasty@shell.dragondata.com>
* _SIG_MAXSIG (128) is the highest legal signal. The arrays are offsetpeter2001-11-031-1/+1
| | | | | | by one - see _SIG_IDX(). Revert part of my mis-correction in kern_sig.c (but signal 0 still has to be allowed) and fix _SIG_VALID() (it was rejecting ignal 128).
* style(9) the structure definitions.obrien2001-09-051-3/+3
|
* Check validity of signal callback requested via aio routines.alfred2001-04-181-0/+1
| | | | | | | | | | | | | Also move the insertion of the request to after the request is validated, there's still looks like there may be some problems if an invalid address is passed to the aio routines, basically a possible leak or having a not completely initialized structure on the queue may still be possible. A new sig macro was made _SIG_VALID to check the validity of a signal, it would be advisable to use it from now on (in kern/kern_sig.c) rather than rolling your own. PR: kern/17152
* Provide a new interface for the user of aio_read() and aio_write() to requestalc2000-11-211-1/+7
| | | | | | | | | | | | | | | a kevent upon completion of the I/O. Specifically, introduce a new type of sigevent notification, SIGEV_EVENT. If sigev_notify is SIGEV_EVENT, then sigev_notify_kqueue names the kqueue that should receive the event and sigev_value contains the "void *" is copied into the kevent's udata field. In contrast to the existing interface, this one: 1) works on the Alpha 2) avoids the extra copyin() call for the kevent because all of the information needed is in the sigevent and 3) could be applied to request a single kevent upon completion of an entire lio_listio(). Reviewed by: jlemon
* Make MINSIGSTKSZ machine dependent, and have the sigaltstackmarcel2000-11-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | syscall compare against a variable sv_minsigstksz in struct sysentvec as to properly take the size of the machine- and ABI dependent struct sigframe into account. The SVR4 and iBCS2 modules continue to have a minsigstksz of 8192 to preserve behavior. The real values (if different) are not known at this time. Other ABI modules use the real values. The native MINSIGSTKSZ is now defined as follows: Arch MINSIGSTKSZ ---- ----------- alpha 4096 i386 2048 ia64 12288 Reviewed by: mjacob Suggested by: bde
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-291-1/+1
| | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* Properly fix building posix sources this time.marcel1999-10-161-12/+10
| | | | Reported by: markm
* Move SIG_HOLD back to signalvar.h.marcel1999-10-121-5/+3
| | | | | | Fix style bugs and comments while I'm here. Submitted by: bde
* I don't know if this is the correct fix, but my kernel can compile with it.phk1999-10-101-1/+1
|
* Use the proper #ifdef around union sigval and siginfo_t. This fixesmarcel1999-10-101-2/+2
| | | | | | the breakage of POSIX sources (such as XFree86). Reviewed by: bde
* Re-introduction of sigcontext.marcel1999-10-041-48/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | struct sigcontext and ucontext_t/mcontext_t are defined in such a way that both (ie struct sigcontext and ucontext_t) can be passed on to sigreturn. The signal handler is still given a ucontext_t for maximum flexibility. For backward compatibility sigreturn restores the state for the alternate signal stack from sigcontext.sc_onstack and not from ucontext_t.uc_stack. A good way to determine which value the application has set and thus which value to use, is still open for discussion. NOTE: This change should only affect those binaries that use sigcontext and/or ucontext_t. In the source tree itself this is only doscmd. Recompilation is required for those applications. This commit also fixes a lot of style bugs without hopefully adding new ones. NOTE: struct sigaltstack.ss_size now has type size_t again. For some reason I changed that into unsigned int. Parts submitted by: bde sigaltstack bug found by: bde
* sigset_t change (part 2 of 5)marcel1999-09-291-107/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ----------------------------- The core of the signalling code has been rewritten to operate on the new sigset_t. No methodological changes have been made. Most references to a sigset_t object are through macros (see signalvar.h) to create a level of abstraction and to provide a basis for further improvements. The NSIG constant has not been changed to reflect the maximum number of signals possible. The reason is that it breaks programs (especially shells) which assume that all signals have a non-null name in sys_signame. See src/bin/sh/trap.c for an example. Instead _SIG_MAXSIG has been introduced to hold the maximum signal possible with the new sigset_t. struct sigprop has been moved from signalvar.h to kern_sig.c because a) it is only used there, and b) access must be done though function sigprop(). The latter because the table doesn't holds properties for all signals, but only for the first NSIG signals. signal.h has been reorganized to make reading easier and to add the new and/or modified structures. The "old" structures are moved to signalvar.h to prevent namespace polution. Especially the coda filesystem suffers from the change, because it contained lines like (p->p_sigmask == SIGIO), which is easy to do for integral types, but not for compound types. NOTE: kdump (and port linux_kdump) must be recompiled. Thanks to Garrett Wollman and Daniel Eischen for pressing the importance of changing sigreturn as well.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Implement SA_SIGINFO for i386. Thanks to Bruce Evans for much morecracauer1999-07-061-17/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | than a review, this was a nice puzzle. This is supposed to be binary and source compatible with older applications that access the old FreeBSD-style three arguments to a signal handler. Except those applications that access hidden signal handler arguments bejond the documented third one. If you have applications that do, please let me know so that we take the opportunity to provide the functionality they need in a documented manner. Also except application that use 'struct sigframe' directly. You need to recompile gdb and doscmd. `make world` is recommended. Example program that demonstrates how SA_SIGINFO and old-style FreeBSD handlers (with their three args) may be used in the same process is at http://www3.cons.org/tmp/fbsd-siginfo.c Programs that use the old FreeBSD-style three arguments are easy to change to SA_SIGINFO (although they don't need to, since the old style will still work): Old args to signal handler: void handler_sn(int sig, int code, struct sigcontext *scp) New args: void handler_si(int sig, siginfo_t *si, void *third) where: old:code == new:second->si_code old:scp == &(new:si->si_scp) /* Passed by value! */ The latter is also pointed to by new:third, but accessing via si->si_scp is preferred because it is type-save. FreeBSD implementation notes: - This is just the framework to make the interface POSIX compatible. For now, no additional functionality is provided. This is supposed to happen now, starting with floating point values. - We don't use 'sigcontext_t.si_value' for now (POSIX meant it for realtime-related values). - Documentation will be updated when new functionality is added and the exact arguments passed are determined. The comments in sys/signal.h are meant to be useful. Reviewed by: BDE
* Define ss_size in struct sigaltstack as size_t instead of int.dfr1998-08-051-2/+7
|
* Finish _POSIX_PRIORITY_SCHEDULING. Needs P1003_1B anddufault1998-03-281-1/+28
| | | | | | | | | | | | | | | | _KPOSIX_PRIORITY_SCHEDULING options to work. Changes: Change all "posix4" to "p1003_1b". Misnamed files are left as "posix4" until I'm told if I can simply delete them and add new ones; Add _POSIX_PRIORITY_SCHEDULING system calls for FreeBSD and Linux; Add man pages for _POSIX_PRIORITY_SCHEDULING system calls; Add options to LINT; Minor fixes to P1003_1B code during testing.
* Implement SA_NOCLDWAIT.joerg1997-09-131-1/+2
| | | | | | | | | | | | | | | | | | | | The implementation is done (unlike what i've originally been contemplating) by reparenting kids of processes that have the appropriate bit set to PID 1, and let PID 1 handle the zombie. This is far less problematical than what would seem to be ``doing it right'', for a number of reasons. Of our currently shipping PID-1-intended programs, 50 % fail the above assumption. ;-) (Read this: sysinstall doesn't do it right. This is no problem as long as no program called by sysinstall actually uses SA_NOCLDWAIT.) ToDo: . clarify the correct SA_* flag inheritance, compared to other systems, . decide whether the compat cruft (osigvec(9)) should deal with new system additions or not, . merge OpenBSD's SA_SIGINFO implementation. ;) Reviewed by: bde
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Add a SV_NODEFER and SV_RESETHAND #define, after Bruce pointed out thatpeter1996-03-301-1/+3
| | | | | a program that was saving and restoring a signal via sigvec() was not doing the complete job if either of these bits had been set via sigaction.
* Merge in Lite2: no changes necessary. Just update CSRG id.hsu1996-03-111-2/+2
| | | | Reviewed by: davidg & bde
* Mega-commit for Linux emulator update.. This has been stress tested underpeter1996-03-021-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | netscape-2.0 for Linux running all the Java stuff. The scrollbars are now working, at least on my machine. (whew! :-) I'm uncomfortable with the size of this commit, but it's too inter-dependant to easily seperate out. The main changes: COMPAT_LINUX is *GONE*. Most of the code has been moved out of the i386 machine dependent section into the linux emulator itself. The int 0x80 syscall code was almost identical to the lcall 7,0 code and a minor tweak allows them to both be used with the same C code. All kernels can now just modload the lkm and it'll DTRT without having to rebuild the kernel first. Like IBCS2, you can statically compile it in with "options LINUX". A pile of new syscalls implemented, including getdents(), llseek(), readv(), writev(), msync(), personality(). The Linux-ELF libraries want to use some of these. linux_select() now obeys Linux semantics, ie: returns the time remaining of the timeout value rather than leaving it the original value. Quite a few bugs removed, including incorrect arguments being used in syscalls.. eg: mixups between passing the sigset as an int, vs passing it as a pointer and doing a copyin(), missing return values, unhandled cases, SIOC* ioctls, etc. The build for the code has changed. i386/conf/files now knows how to build linux_genassym and generate linux_assym.h on the fly. Supporting changes elsewhere in the kernel: The user-mode signal trampoline has moved from the U area to immediately below the top of the stack (below PS_STRINGS). This allows the different binary emulations to have their own signal trampoline code (which gets rid of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so that the emulator can provide the exact "struct sigcontext *" argument to the program's signal handlers. The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which have the same values as the re-used SA_DISABLE and SA_ONSTACK which are intended for sigaction only. This enables the support of a SA_RESETHAND flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal semantics where the signal handler is reset when it's triggered. makesyscalls.sh no longer appends the struct sysentvec on the end of the generated init_sysent.c code. It's a lot saner to have it in a seperate file rather than trying to update the structure inside the awk script. :-) At exec time, the dozen bytes or so of signal trampoline code are copied to the top of the user's stack, rather than obtaining the trampoline code the old way by getting a clone of the parent's user area. This allows Linux and native binaries to freely exec each other without getting trampolines mixed up.
* Changed the description of SIGSYS to better reflect whatmpp1996-01-221-2/+2
| | | | it means when that signal is received. Closes PR# 686.
* Implement SA_NODEFER sa_flag for sigaction():swallace1995-10-191-1/+2
| | | | | | | | | | | Add SA_NODEFER define to signal.h Add ps_nodefer field to struct sigacts in signalvar.h. Add code to kern_sig.c to handle SA_NODEFER. If flag is set, when the signal is delivered, it is not masked automatically from receiving the same signal again. Reviewed by: wollman, bde
* Fix standards conformance bugs in <signal.h>:bde1995-06-281-23/+30
| | | | | | | | | | | | | | | | | | | | | include/signal.h: There was massive namespace pollution from including <sys/types.h>. POSIX functions were declared even when _ANSI_SOURCE is defined. sys.sys/signal.h: NSIG was declared even if _ANSI_SOURCE or _POSIX_SOURCE is defined. sig_atomic_t wasn't declared if _POSIX_SOURCE is defined. Declare a typedef for signal handling functions and use it to unobfuscate declarations and to avoid half-baked function types that cause unwanted compiler warnings at certain warning levels. Fix confusing comment about SA_RESTART. sys/i386/include/signal.h: This has to be included to get the declaration of sig_atomic_t even when _ANSI_SOURCE is defined, so be more careful about polluting the ANSI namespace. Uniformize idempotency ifdefs.
* Correct a name of one structure member in the sigaltstack structure.ats1995-01-291-2/+2
| | | | | | Now it matches the man page and also the only other commercial implementation i have found so far ( Solaris 2.x). Changed the name from ss_base to ss_sp.
* Added $Id$dg1994-08-021-0/+1
|
* BSD 4.4 Lite Kernel Sourcesrgrimes1994-05-241-0/+194
OpenPOWER on IntegriCloud