Skip site navigation (1)Skip section navigation (2)

CVS log for src/sys/sys/signal.h

[BACK] Up to [FreeBSD] / src / sys / sys

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.67: download - view: text, markup, annotated - select for diffs
Wed Feb 1 02:53:06 2012 UTC (8 days, 17 hours ago) by davidxu
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +2 -0 lines
SVN rev 230857 on 2012-02-01 02:53:06Z by davidxu

If multiple threads call kevent() to get AIO events on same kqueue fd,
it is possible that a single AIO event will be reported to multiple
threads, it is not threading friendly, and the existing API can not
control this behavior.
Allocate a kevent flags field sigev_notify_kevent_flags for AIO event
notification in sigevent, and allow user to pass EV_CLEAR, EV_DISPATCH
or EV_ONESHOT to AIO kernel code, user can control whether the event
should be cleared once it is retrieved by a thread. This change should
be comptaible with existing application, because the field should have
already been zero-filled, and no additional action will be taken by
kernel.

PR:	kern/156567

Revision 1.66.2.1.2.1: download - view: text, markup, annotated - select for diffs
Fri Nov 11 04:20:22 2011 UTC (2 months, 4 weeks ago) by kensmith
Branches: RELENG_9_0
CVS tags: RELENG_9_0_0_RELEASE
Diff to: previous 1.66.2.1: preferred, colored; next MAIN 1.67: preferred, colored
Changes since revision 1.66.2.1: +0 -0 lines
SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)

Revision 1.66.2.1: download - view: text, markup, annotated - select for diffs
Fri Sep 23 00:51:37 2011 UTC (4 months, 2 weeks ago) by kensmith
Branches: RELENG_9
CVS tags: RELENG_9_0_BP
Branch point for: RELENG_9_0
Diff to: previous 1.66: preferred, colored; next MAIN 1.67: preferred, colored
Changes since revision 1.66: +0 -0 lines
SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)

Revision 1.58.2.5: download - view: text, markup, annotated - select for diffs
Mon Feb 28 23:28:35 2011 UTC (11 months, 1 week ago) by rwatson
Branches: RELENG_8
Diff to: previous 1.58.2.4: preferred, colored; branchpoint 1.58: preferred, colored; next MAIN 1.59: preferred, colored
Changes since revision 1.58.2.4: +1 -0 lines
SVN rev 219107 on 2011-02-28 23:28:35Z by rwatson

Merge userspace DTrace support from head to stable/8:

r209721:

  Merge from vendor-sys/opensolaris:
  * add fasttrap files

r209731:

  Introduce USD_{SET,GET}{BASE,LIMIT}. These help setting up the user
  segment descriptor hi and lo values. Idea from Solaris.

  Reviewed by:  kib

r209763:

  Fix style issues with the previous commit, namely
  use-tab-instead-of-space and don't use underscores in macro variables.

  Pointed out by:       bde

r210292:

  Fix typo in comment.

r210357:

  MFamd64:
    Add USD_GETBASE(), USD_SETBASE(), USD_GETLIMIT() and USD_SETLIMIT().

r210611:

  Bump the witness pendlist to 768 to accomodate the increased number of
  spinlocks.

r211553:

  Add sysname to struct opensolaris_utsname. This is needed by one DTrace
  test.

r211566:

  Add a sysname char * to struct opensolaris_utsname.

r211606:

  Add the FreeBSD definition for the fasttrap ioctls.

r211607:

  Add a function compatibility function dtrace_instr_size_isa() that on
  FreeBSD does the same as dtrace_dis_isize().

r211608:

  Kernel DTrace support for:
  o uregs  (sson@)
  o ustack (sson@)
  o /dev/dtrace/helper device (needed for USDT probes)

r211610:

  Add more compatibility structure members needed by the upcoming fasttrap
  DTrace device.

r211611:

  Destroy the helper device when unloading.

r211613:

  Fix style issues.

r211614:

  Bump KDTRACE_THREAD_ZERO and use M_ZERO as a malloc flag instead of
  calling bzero.

r211615:

  Remove an elif and add an or-clause.

r211616:

  Add an extra comment to the SDT probes definition. This allows us to get
  use '-' in probe names, matching the probe names in Solaris.

  Add userland SDT probes definitions to sys/sdt.h.

r211617:

  Call the systrace_probe_func() when the error value.

r211618:

  Port this to FreeBSD. We miss some suword functions, so we use copyout.

r211738:

  Port the fasttrap provider to FreeBSD. This provider is responsible for
  injecting debugging probes in the userland programs and is the basis for
  the pid provider and the usdt provider.

r211744:

  MD fasttrap implementation.

r211745:

  Replace a pksignal() call with tdksignal().

  Pointed out by:       kib

r211746:

  Update for the recent location of the fasttrap code.

r211747:

  Replace structure assignments with explicity memcpy calls. This allows
  Clang to compile this file: it was using the builtin memcpy and we want
  to use the memcpy defined in gptboot.c. (Clang can't compile boot2 yet).

  Submitted by: Dimitry Andric <dimitry at andric.com>
  Reviewed by:  jhb

r211751:

  Add a trap code for DTrace induced traps.

r211752:

  Add two DTrace trap type values. Used by fasttrap.

r211753:

  Enable fasttrap and make dtraceall depend on fasttrap when building i386
  or amd64.

r211804:

  Call the necessary DTrace function pointers when we have different kinds
  of traps.

r211813:

  Add the necessary DTrace function pointers.

r211839:

  Sync DTrace bits with amd64 and fix the build.

r211924:

  Register an interrupt vector for DTrace return probes. There is some
  code missing in lapic to make sure that we don't overwrite this entry,
  but this will be done on a sequent commit.

r211925:

  Replace a memory barrier with a mutex barrier.

r211926:

  Add the path necessary to find fasttrap_isa.h to CFLAGS.

r211929:

  Remove debugging.

r212004:

  When DTrace is enabled, make sure we don't overwrite the IDT_DTRACE_RET
  entry with an IRQ for some hardware component.

  Reviewed by:  jhb

r212093:

  Make the /dev/dtrace/helper node have the mode 0660. This allows
  programs that refuse to run as root (pgsql) to install probes when their
  user is part of the wheel group.

r212357:

  Fix two bugs in DTrace:
  * when the process exits, remove the associated USDT probes
  * when the process forks, duplicate the USDT probes.

r212465:

  Avoid a LOR (sleepable after non-sleepable) in
  fasttrap_tracepoint_enable().

r212494:

  Revamp locking a bit. This fixes three problems:
  * processes now can't go away while we are inserting probes (fixes a panic)
  * if a trap happens, we won't be holding the process lock (fixes a hang)
  * fix a LOR between the process lock and the fasttrap bucket list lock

  Thanks to kib for pointing some problems.

r212568:

  Bump __FreeBSD_version to reflect the userland DTrace changes

Sponsored by:                   The FreeBSD Foundation
Userspace DTrace work by:       rpaulo

Revision 1.56.2.1.10.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:10:29 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_7_4
CVS tags: RELENG_7_4_0_RELEASE
Diff to: previous 1.56.2.1: preferred, colored; next MAIN 1.57: preferred, colored
Changes since revision 1.56.2.1: +0 -0 lines
SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)

Revision 1.58.2.4.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:09:25 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_8_2
CVS tags: RELENG_8_2_0_RELEASE
Diff to: previous 1.58.2.4: preferred, colored; next MAIN 1.58.2.5: preferred, colored
Changes since revision 1.58.2.4: +0 -0 lines
SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)

Revision 1.58.2.4: download - view: text, markup, annotated - select for diffs
Sat Nov 20 16:46:16 2010 UTC (14 months, 2 weeks ago) by jilles
Branches: RELENG_8
CVS tags: RELENG_8_2_BP
Branch point for: RELENG_8_2
Diff to: previous 1.58.2.3: preferred, colored; branchpoint 1.58: preferred, colored
Changes since revision 1.58.2.3: +1 -1 lines
SVN rev 215572 on 2010-11-20 16:46:16Z by jilles

MFC r215183: Make POLL_ERR and POLL_HUP different.

The kernel currently does not generate any of the POLL_* constants, but
some applications use them and break if they are not all distinct.

PR:		kern/126076

Revision 1.66: download - view: text, markup, annotated - select for diffs
Fri Nov 12 15:30:49 2010 UTC (14 months, 4 weeks ago) by jilles
Branches: MAIN
CVS tags: RELENG_9_BP
Branch point for: RELENG_9
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +1 -1 lines
SVN rev 215183 on 2010-11-12 15:30:49Z by jilles

Make POLL_ERR and POLL_HUP different.

The kernel currently does not generate any of the POLL_* constants, but
some applications use them and break if they are not all distinct.

PR:		kern/126076
MFC after:	1 week

Revision 1.65: download - view: text, markup, annotated - select for diffs
Tue Aug 24 13:11:24 2010 UTC (17 months, 2 weeks ago) by rpaulo
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +1 -0 lines
SVN rev 211751 on 2010-08-24 13:11:24Z by rpaulo

Add a trap code for DTrace induced traps.

Sponsored by:	The FreeBSD Foundation

Revision 1.64: download - view: text, markup, annotated - select for diffs
Tue Aug 24 07:22:24 2010 UTC (17 months, 2 weeks ago) by davidxu
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +1 -0 lines
SVN rev 211732 on 2010-08-24 07:22:24Z by davidxu

- According to specification, SI_USER code should only be generated by
  standard kill(). On other systems, SI_LWP is generated by lwp_kill().
  This will allow conforming applications to differentiate between
  signals generated by standard events and those generated by other
  implementation events in a manner compatible with existing practice.
- Bump __FreeBSD_version

Revision 1.63: download - view: text, markup, annotated - select for diffs
Thu Jul 22 05:42:29 2010 UTC (18 months, 2 weeks ago) by trasz
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +1 -1 lines
SVN rev 210365 on 2010-07-22 05:42:29Z by trasz

Remove spurious '/*-' marks and fix some other style problems.

Submitted by:	bde@

Revision 1.62: download - view: text, markup, annotated - select for diffs
Sun Jul 18 20:57:53 2010 UTC (18 months, 3 weeks ago) by trasz
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +1 -1 lines
SVN rev 210226 on 2010-07-18 20:57:53Z by trasz

Revert r210225 - turns out I was wrong; the "/*-" is not license-only
thing; it's also used to indicate that the comment should not be automatically
rewrapped.

Explained by:	cperciva@

Revision 1.61: download - view: text, markup, annotated - select for diffs
Sun Jul 18 20:23:10 2010 UTC (18 months, 3 weeks ago) by trasz
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +1 -1 lines
SVN rev 210225 on 2010-07-18 20:23:10Z by trasz

The "/*-" comment marker is supposed to denote copyrights.  Remove non-copyright
occurences from sys/sys/ and sys/kern/.

Revision 1.58.2.3.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 14 02:09:06 2010 UTC (19 months, 3 weeks ago) by kensmith
Branches: RELENG_8_1
CVS tags: RELENG_8_1_0_RELEASE
Diff to: previous 1.58.2.3: preferred, colored; next MAIN 1.58.2.4: preferred, colored
Changes since revision 1.58.2.3: +0 -0 lines
SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)

Revision 1.56.2.1.8.1: download - view: text, markup, annotated - select for diffs
Wed Feb 10 00:26:20 2010 UTC (23 months, 4 weeks ago) by kensmith
Branches: RELENG_7_3
CVS tags: RELENG_7_3_0_RELEASE
Diff to: previous 1.56.2.1: preferred, colored; next MAIN 1.57: preferred, colored
Changes since revision 1.56.2.1: +0 -0 lines
SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)

Revision 1.58.2.3: download - view: text, markup, annotated - select for diffs
Sun Jan 31 18:38:03 2010 UTC (2 years ago) by kib
Branches: RELENG_8
CVS tags: RELENG_8_1_BP
Branch point for: RELENG_8_1
Diff to: previous 1.58.2.2: preferred, colored; branchpoint 1.58: preferred, colored
Changes since revision 1.58.2.2: +2 -3 lines
SVN rev 203298 on 2010-01-31 18:38:03Z by kib

MFC r199827:
Implement sighold, sigignore, sigpause, sigrelse, sigset functions.

MFC r200881 (by cognet):
Don't name parameters.

Revision 1.58.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 19 12:06:12 2009 UTC (2 years, 1 month ago) by kib
Branches: RELENG_8
Diff to: previous 1.58.2.1: preferred, colored; branchpoint 1.58: preferred, colored
Changes since revision 1.58.2.1: +1 -0 lines
SVN rev 200729 on 2009-12-19 12:06:12Z by kib

MFC r199355:
Add SI_KERNEL.

MFC r199418:
Fix pgsignal() call after signature change in r199355.

Revision 1.60: download - view: text, markup, annotated - select for diffs
Thu Nov 26 13:49:37 2009 UTC (2 years, 2 months ago) by kib
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +2 -3 lines
SVN rev 199827 on 2009-11-26 13:49:37Z by kib

Implement sighold, sigignore, sigpause, sigrelse, sigset functions
from SUSv4 XSI. Note that the functions are obsoleted, and only
provided to ease porting from System V-like systems. Since sigpause
already exists in compat with different interface, XSI sigpause is
named xsi_sigpause.

Reviewed by:	davidxu
MFC after:	3 weeks

Revision 1.59: download - view: text, markup, annotated - select for diffs
Tue Nov 17 11:39:15 2009 UTC (2 years, 2 months ago) by kib
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +1 -0 lines
SVN rev 199355 on 2009-11-17 11:39:15Z by kib

Among signal generation syscalls, only sigqueue(2) is allowed by POSIX
to fail due to lack of resources to queue siginfo. Add KSI_SIGQ flag
that allows sigqueue_add() to fail while trying to allocate memory for
new siginfo. When the flag is not set, behaviour is the same as for
KSI_TRAP: if memory cannot be allocated, set bit in sq_kill. KSI_TRAP is
kept to preserve KBI.

Add SI_KERNEL si_code, to be used in siginfo.si_code when signal is
generated by kernel. Deliver siginfo when signal is generated by kill(2)
family of syscalls (SI_USER with properly filled si_uid and si_pid), or
by kernel (SI_KERNEL, mostly job control or SIGIO). Since KSI_SIGQ flag
is not set for the ksi, low memory condition cause old behaviour.

Keep psignal(9) KBI intact, but modify it to generate SI_KERNEL
si_code. Pgsignal(9) and gsignal(9) now take ksi explicitely. Add
pksignal(9) that behaves like psignal but takes ksi, and ddb kill
command implemented as pksignal(..., ksi = NULL) to not do allocation
while in debugger.

While there, remove some register specifiers and use ANSI C prototypes.

Reviewed by:	davidxu
MFC after:	1 month

Revision 1.58.2.1.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 25 01:10:29 2009 UTC (2 years, 3 months ago) by kensmith
Branches: RELENG_8_0
CVS tags: RELENG_8_0_0_RELEASE
Diff to: previous 1.58.2.1: preferred, colored; next MAIN 1.58.2.2: preferred, colored
Changes since revision 1.58.2.1: +0 -0 lines
SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)

Revision 1.58.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 3 08:13:06 2009 UTC (2 years, 6 months ago) by kensmith
Branches: RELENG_8
CVS tags: RELENG_8_0_BP
Branch point for: RELENG_8_0
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +0 -0 lines
SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)

Revision 1.56.2.1.6.1: download - view: text, markup, annotated - select for diffs
Wed Apr 15 03:14:26 2009 UTC (2 years, 9 months ago) by kensmith
Branches: RELENG_7_2
CVS tags: RELENG_7_2_0_RELEASE
Diff to: previous 1.56.2.1: preferred, colored; next MAIN 1.57: preferred, colored
Changes since revision 1.56.2.1: +0 -0 lines
SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)

Revision 1.56.2.1.4.1: download - view: text, markup, annotated - select for diffs
Tue Nov 25 02:59:29 2008 UTC (3 years, 2 months ago) by kensmith
Branches: RELENG_7_1
CVS tags: RELENG_7_1_0_RELEASE
Diff to: previous 1.56.2.1: preferred, colored; next MAIN 1.57: preferred, colored
Changes since revision 1.56.2.1: +0 -0 lines
SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)

Revision 1.45.8.1.8.1: download - view: text, markup, annotated - select for diffs
Thu Oct 2 02:57:24 2008 UTC (3 years, 4 months ago) by kensmith
Branches: RELENG_6_4
CVS tags: RELENG_6_4_0_RELEASE
Diff to: previous 1.45.8.1: preferred, colored; next MAIN 1.46: preferred, colored
Changes since revision 1.45.8.1: +0 -0 lines
SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)

Revision 1.58: download - view: text, markup, annotated - select for diffs
Sat Jan 19 21:41:31 2008 UTC (4 years ago) by das
Branches: MAIN
CVS tags: RELENG_8_BP
Branch point for: RELENG_8
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +1 -1 lines
Correct the visibility macro surrounding SIGSYS.

Submitted by:	Andriy Gapon <avg@icyb.net.ua>

Revision 1.56.2.1: download - view: text, markup, annotated - select for diffs
Mon Dec 17 03:05:56 2007 UTC (4 years, 1 month ago) by davidxu
Branches: RELENG_7
CVS tags: RELENG_7_4_BP, RELENG_7_3_BP, RELENG_7_2_BP, RELENG_7_1_BP, RELENG_7_0_BP, RELENG_7_0_0_RELEASE, RELENG_7_0
Branch point for: RELENG_7_4, RELENG_7_3, RELENG_7_2, RELENG_7_1
Diff to: previous 1.56: preferred, colored; next MAIN 1.57: preferred, colored
Changes since revision 1.56: +3 -0 lines
MFC revision 1.57:
	unbreaks compilation of some old programs.

Approved by: re (kensmith)

Revision 1.57: download - view: text, markup, annotated - select for diffs
Wed Nov 28 02:11:17 2007 UTC (4 years, 2 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +3 -0 lines
Restore member fields sigval_int and sigval_ptr, this unbreaks compilation
of some old programs. Since sigval is union type, this change will not have
binary compatibility problem.

MFC: after 3 days
Discussed with: rwatson, glebius

Revision 1.56: download - view: text, markup, annotated - select for diffs
Fri May 12 05:04:46 2006 UTC (5 years, 9 months ago) by jhb
Branches: MAIN
CVS tags: RELENG_7_BP
Branch point for: RELENG_7
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +1 -1 lines
Remove various bits of conditional Alpha code and fixup a few comments.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Thu Dec 8 09:00:54 2005 UTC (6 years, 2 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +1 -1 lines
o Remove SI_KERNEL until I really implemented it.
o Add definition SI_NOINFO for zero si_code.

Revision 1.54: download - view: text, markup, annotated - select for diffs
Tue Dec 6 06:02:35 2005 UTC (6 years, 2 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +14 -2 lines
o Add some pad fields into struct sigevent for future extension.
  (suggested by alfred@)
o Reuse si_band field in struct __siginfo, add a mqd member which will
  be used by mqueue.
o Add code SI_KERNEL to indicate a signal is queued by kernel.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Wed Nov 30 23:47:31 2005 UTC (6 years, 2 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +1 -1 lines
Avoid using signal 127 and 128 as RT signals, these two signals confuse
wait4 interfaces, see PR: kern/19402.

Revision 1.45.8.1: download - view: text, markup, annotated - select for diffs
Wed Nov 16 12:44:10 2005 UTC (6 years, 2 months ago) by davidxu
Branches: RELENG_6
CVS tags: RELENG_6_4_BP, RELENG_6_3_BP, RELENG_6_3_0_RELEASE, RELENG_6_3, RELENG_6_2_BP, RELENG_6_2_0_RELEASE, RELENG_6_2, RELENG_6_1_BP, RELENG_6_1_0_RELEASE, RELENG_6_1
Branch point for: RELENG_6_4
Diff to: previous 1.45: preferred, colored; next MAIN 1.46: preferred, colored
Changes since revision 1.45: +2 -1 lines
MFC Revsion 1.50:
	Update SIGTHR's comment.
MFC Revision 1.52:
	Define SIGLWP.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Sun Nov 13 09:57:44 2005 UTC (6 years, 2 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +1 -0 lines
Define SIGLWP which is an alias for SIGTHR, the reason why I did this
is that gdb knows SIGLWP and will pass it to program, otherwise gdb
will print out "unknown signal" and discard it, and then thread
cancellation won't work for libthr under gdb.

MFC: 3 days

Revision 1.51: download - view: text, markup, annotated - select for diffs
Fri Nov 4 09:39:17 2005 UTC (6 years, 3 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +3 -3 lines
Fix name compatible problem with POSIX standard. the sigval_ptr and
sigval_int really should be sival_ptr and sival_int.
Also sigev_notify_function accepts a union sigval value but not a
pointer.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Tue Nov 1 03:14:39 2005 UTC (6 years, 3 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +1 -1 lines
Update SIGTHR's comment.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Sun Oct 30 02:12:48 2005 UTC (6 years, 3 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +18 -15 lines
Fix sigevent's POSIX incompatible problem by adding member fields
sigev_notify_function and sigev_notify_attributes. AIO syscalls
use sigevent, so they have to be adjusted.

Reviewed by:	alc

Revision 1.48: download - view: text, markup, annotated - select for diffs
Sun Oct 23 03:59:52 2005 UTC (6 years, 3 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +6 -0 lines
Add member fields for POSIX timer.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Fri Oct 14 03:01:13 2005 UTC (6 years, 3 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +73 -9 lines
Add POSIX siginfo_t's si_code, this is for upcoming POSIX realtime signal
support in kernel.

Earlier patch reviewed by: jhb, deischen

Revision 1.46: download - view: text, markup, annotated - select for diffs
Sat Aug 20 16:44:41 2005 UTC (6 years, 5 months ago) by stefanf
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +2 -0 lines
Move MINSIGSTKSZ from <machine/signal.h> to <machine/_limits.h> and rename
it to __MINSIGSTKSZ.  Define MINSIGSTKSZ in <sys/signal.h>.

This is done in order to use MINSIGSTKSZ for the macro PTHREAD_STACK_MIN
in <pthread.h> (soon <limits.h>) without having to include the whole
<sys/signal.h> header.

Discussed with:		bde

Revision 1.45: download - view: text, markup, annotated - select for diffs
Fri Jun 11 11:43:46 2004 UTC (7 years, 8 months ago) by phk
Branches: MAIN
CVS tags: RELENG_6_BP, RELENG_6_0_BP, RELENG_6_0_0_RELEASE, RELENG_6_0, RELENG_5_BP, RELENG_5_5_BP, RELENG_5_5_0_RELEASE, RELENG_5_5, RELENG_5_4_BP, RELENG_5_4_0_RELEASE, RELENG_5_4, RELENG_5_3_BP, RELENG_5_3_0_RELEASE, RELENG_5_3, RELENG_5
Branch point for: RELENG_6
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +0 -3 lines
Make this look less dubious :-)

Spotted by:	ru

Revision 1.44: download - view: text, markup, annotated - select for diffs
Fri Jun 11 11:16:26 2004 UTC (7 years, 8 months ago) by phk
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +0 -3 lines
Deorbit COMPAT_SUNOS.

We inherited this from the sparc32 port of BSD4.4-Lite1.  We have neither
a sparc32 port nor a SunOS4.x compatibility desire these days.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Wed Apr 7 04:19:49 2004 UTC (7 years, 10 months ago) by imp
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +0 -4 lines
Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core

Revision 1.42: download - view: text, markup, annotated - select for diffs
Mon Mar 31 23:31:50 2003 UTC (8 years, 10 months ago) by jeff
Branches: MAIN
CVS tags: RELENG_5_2_BP, RELENG_5_2_1_RELEASE, RELENG_5_2_0_RELEASE, RELENG_5_2, RELENG_5_1_BP, RELENG_5_1_0_RELEASE, RELENG_5_1
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +2 -3 lines
 - According to mike@FreeBSD.org SIGTHR should be hiden by
   #ifdef __BSD_VISIBLE

Revision 1.41: download - view: text, markup, annotated - select for diffs
Mon Mar 31 22:30:08 2003 UTC (8 years, 10 months ago) by jeff
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +4 -0 lines
 - Add a signal for thread synchronization.  Add an XXX so that maybe
   someone more knowledgeable on standards defined namespaces may ifdef
   this out.

Revision 1.38.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 31 19:35:41 2002 UTC (9 years, 1 month ago) by mike
Branches: RELENG_5_0
CVS tags: RELENG_5_0_0_RELEASE
Diff to: previous 1.38: preferred, colored; next MAIN 1.39: preferred, colored
Changes since revision 1.38: +3 -2 lines
MFC rev 1.39 & 1.40:
  sa_handler is in the POSIX namespace.

Approved by:	re

Revision 1.40: download - view: text, markup, annotated - select for diffs
Sun Dec 29 19:34:37 2002 UTC (9 years, 1 month ago) by mike
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +1 -1 lines
Fix drift of the comment about sa_sigaction away from its code.
Fix English in this comment.

Submitted by:	bde

Revision 1.39: download - view: text, markup, annotated - select for diffs
Sun Dec 29 01:50:22 2002 UTC (9 years, 1 month ago) by mike
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +3 -2 lines
sa_handler is in the POSIX namespace (5.0-R candidate).

Revision 1.38: download - view: text, markup, annotated - select for diffs
Thu Nov 28 15:32:49 2002 UTC (9 years, 2 months ago) by mike
Branches: MAIN
CVS tags: RELENG_5_0_BP
Branch point for: RELENG_5_0
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +1 -0 lines
Remove the <sys/types.h> prerequisite for <ucontext.h> by including
<sys/_types.h> in <sys/signal.h>.

Approved by:	re

Revision 1.37: download - view: text, markup, annotated - select for diffs
Fri Oct 25 19:10:58 2002 UTC (9 years, 3 months ago) by peter
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +8 -0 lines
Split 4.x and 5.x signal handling so that we can keep 4.x signal
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

Revision 1.36: download - view: text, markup, annotated - select for diffs
Mon Oct 14 14:28:46 2002 UTC (9 years, 3 months ago) by mike
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +29 -28 lines
style(9)

Submitted by: bde (partially)

Revision 1.35: download - view: text, markup, annotated - select for diffs
Mon Oct 14 14:12:16 2002 UTC (9 years, 3 months ago) by mike
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +40 -18 lines
1) Although C99 allows implementations to define additional SIG*
   constants in scope, C90 does not; so, add namespace visibility
   conditionals to SIG*.
2) Define the extended __sighandler_t type only in BSD namespace.
3) Don't forward declare a struct for a prototype in <signal.h>.
4) Move location of SIG_* constants.
5) Move a forward declare into the correct namespace conditional.

Requested by:	bde (1)
Submitted by:	bde (2 thru 5)

Revision 1.34: download - view: text, markup, annotated - select for diffs
Sun Oct 13 00:33:52 2002 UTC (9 years, 4 months ago) by mike
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +70 -49 lines
o Fix a silly requirement for <machine/signal.h> to be included in the
  middle of this header.
o Remove unneeded conditionals to hide SIG* in the POSIX case.
  (C allows implementations to define additional SIG* constants.)
o Add comments about missing features.
o Move the location of the sigset_t typedef.
o Update standards visibility conditionals.
o Fix some assumptions about what pid_t and uid_t are defined as.
o Remove size_t typedef and use __size_t in struct sigaltstack
  instead.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Sat Oct 5 05:40:48 2002 UTC (9 years, 4 months ago) by mike
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +6 -0 lines
Change <sys/_sigset.h> to typedef __sigset_t instead of sigset_t, so
that headers that include it can conditionalize sigset_t's visibility.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Wed Aug 21 16:20:01 2002 UTC (9 years, 5 months ago) by mike
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +3 -3 lines
o Merge <machine/ansi.h> and <machine/types.h> into a new header
  called <machine/_types.h>.
o <machine/ansi.h> will continue to live so it can define MD clock
  macros, which are only MD because of gratuitous differences between
  architectures.
o Change all headers to make use of this.  This mainly involves
  changing:
    #ifdef _BSD_FOO_T_
    typedef	_BSD_FOO_T_	foo_t;
    #undef _BSD_FOO_T_
    #endif
  to:
    #ifndef _FOO_T_DECLARED
    typedef	__foo_t	foo_t;
    #define	_FOO_T_DECLARED
    #endif

Concept by:	bde
Reviewed by:	jake, obrien

Revision 1.31: download - view: text, markup, annotated - select for diffs
Sun Jun 16 18:35:24 2002 UTC (9 years, 7 months ago) by wollman
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +3 -16 lines
Use <sys/_sigset.h> to get declaration of sigset_t, which has been moved
to a separate header to facilitate its declaration in more than one
place.  Namespace issues not fixed.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Tue Mar 19 20:18:41 2002 UTC (9 years, 10 months ago) by alfred
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +5 -6 lines
Remove __P

Revision 1.29: download - view: text, markup, annotated - select for diffs
Sun Feb 17 17:40:34 2002 UTC (9 years, 11 months ago) by deischen
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +5 -2 lines
Use struct __ucontext in prototypes and associated functions instead of
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>

Revision 1.28: download - view: text, markup, annotated - select for diffs
Sat Nov 3 13:26:15 2001 UTC (10 years, 3 months ago) by peter
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +2 -2 lines
_SIG_MAXSIG (128) is the highest legal signal.  The arrays are offset
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).

Revision 1.27: download - view: text, markup, annotated - select for diffs
Wed Sep 5 01:22:14 2001 UTC (10 years, 5 months ago) by obrien
Branches: MAIN
CVS tags: KSE_PRE_MILESTONE_2, KSE_MILESTONE_2
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +4 -4 lines
style(9) the structure definitions.

Revision 1.23.2.2: download - view: text, markup, annotated - select for diffs
Thu Apr 19 01:38:35 2001 UTC (10 years, 9 months ago) by alfred
Branches: RELENG_4
CVS tags: RELENG_4_9_BP, RELENG_4_9_0_RELEASE, RELENG_4_9, RELENG_4_8_BP, RELENG_4_8_0_RELEASE, RELENG_4_8, RELENG_4_7_BP, RELENG_4_7_0_RELEASE, RELENG_4_7, RELENG_4_6_BP, RELENG_4_6_2_RELEASE, RELENG_4_6_1_RELEASE, RELENG_4_6_0_RELEASE, RELENG_4_6, RELENG_4_5_BP, RELENG_4_5_0_RELEASE, RELENG_4_5, RELENG_4_4_BP, RELENG_4_4_0_RELEASE, RELENG_4_4, RELENG_4_3_BP, RELENG_4_3_0_RELEASE, RELENG_4_3, RELENG_4_11_BP, RELENG_4_11_0_RELEASE, RELENG_4_11, RELENG_4_10_BP, RELENG_4_10_0_RELEASE, RELENG_4_10
Diff to: previous 1.23.2.1: preferred, colored; branchpoint 1.23: preferred, colored; next MAIN 1.24: preferred, colored
Changes since revision 1.23.2.1: +2 -1 lines
MFC: do not allow user applications to give aio bogus signals, fix some
     possible memory leakage of aio structures
PR: kern/17152
Approved by: jkh

Revision 1.26: download - view: text, markup, annotated - select for diffs
Wed Apr 18 22:18:39 2001 UTC (10 years, 9 months ago) by alfred
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +2 -1 lines
Check validity of signal callback requested via aio routines.

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

Revision 1.23.2.1: download - view: text, markup, annotated - select for diffs
Mon Feb 26 03:32:11 2001 UTC (10 years, 11 months ago) by jlemon
Branches: RELENG_4
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +8 -2 lines
MFC: Better approach for registering EVFILT_AIO type kq events.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Tue Nov 21 19:36:36 2000 UTC (11 years, 2 months ago) by alc
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +8 -2 lines
Provide a new interface for the user of aio_read() and aio_write() to request
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

Revision 1.24: download - view: text, markup, annotated - select for diffs
Thu Nov 9 08:25:48 2000 UTC (11 years, 3 months ago) by marcel
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +1 -2 lines
Make MINSIGSTKSZ machine dependent, and have the sigaltstack
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

Revision 1.23: download - view: text, markup, annotated - select for diffs
Wed Dec 29 04:24:47 1999 UTC (12 years, 1 month ago) by peter
Branches: MAIN
CVS tags: RELENG_4_BP, RELENG_4_2_0_RELEASE, RELENG_4_1_1_RELEASE, RELENG_4_1_0_RELEASE, RELENG_4_0_0_RELEASE, PRE_SMPNG
Branch point for: RELENG_4
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +2 -2 lines
Change #ifdef KERNEL to #ifdef _KERNEL in the public headers.  "KERNEL"
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.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sat Oct 16 12:18:10 1999 UTC (12 years, 3 months ago) by marcel
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +11 -13 lines
Properly fix building posix sources this time.

Reported by: markm

Revision 1.21: download - view: text, markup, annotated - select for diffs
Tue Oct 12 13:58:15 1999 UTC (12 years, 4 months ago) by marcel
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +4 -6 lines
Move SIG_HOLD back to signalvar.h.

Fix style bugs and comments while I'm here.

Submitted by: bde

Revision 1.20: download - view: text, markup, annotated - select for diffs
Sun Oct 10 20:32:48 1999 UTC (12 years, 4 months ago) by phk
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +2 -2 lines
I don't know if this is the correct fix, but my kernel can compile with it.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Sun Oct 10 15:52:33 1999 UTC (12 years, 4 months ago) by marcel
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +3 -3 lines
Use the proper #ifdef around union sigval and siginfo_t. This fixes
the breakage of POSIX sources (such as XFree86).

Reviewed by: bde

Revision 1.18: download - view: text, markup, annotated - select for diffs
Mon Oct 4 19:33:58 1999 UTC (12 years, 4 months ago) by marcel
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +59 -49 lines
Re-introduction of sigcontext.

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

Revision 1.17: download - view: text, markup, annotated - select for diffs
Wed Sep 29 15:03:44 1999 UTC (12 years, 4 months ago) by marcel
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +118 -107 lines
sigset_t change (part 2 of 5)
-----------------------------

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.

Revision 1.3.4.1: download - view: text, markup, annotated - select for diffs
Sun Sep 5 08:37:56 1999 UTC (12 years, 5 months ago) by peter
Branches: RELENG_2_1_0
Diff to: previous 1.3: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3: +1 -1 lines
$Id$ -> $FreeBSD$

Revision 1.9.4.1: download - view: text, markup, annotated - select for diffs
Sun Sep 5 08:22:54 1999 UTC (12 years, 5 months ago) by peter
Branches: RELENG_2_2
Diff to: previous 1.9: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9: +1 -1 lines
$Id$ -> $FreeBSD$

Revision 1.14.2.1: download - view: text, markup, annotated - select for diffs
Sun Aug 29 16:32:43 1999 UTC (12 years, 5 months ago) by peter
Branches: RELENG_3
CVS tags: RELENG_3_5_0_RELEASE, RELENG_3_4_0_RELEASE, RELENG_3_3_0_RELEASE
Diff to: previous 1.14: preferred, colored; next MAIN 1.15: preferred, colored
Changes since revision 1.14: +1 -1 lines
$Id$ -> $FreeBSD$

Revision 1.16: download - view: text, markup, annotated - select for diffs
Sat Aug 28 00:52:00 1999 UTC (12 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +1 -1 lines
$Id$ -> $FreeBSD$

Revision 1.15: download - view: text, markup, annotated - select for diffs
Tue Jul 6 07:13:48 1999 UTC (12 years, 7 months ago) by cracauer
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +59 -17 lines
Implement SA_SIGINFO for i386. Thanks to Bruce Evans for much more
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

Revision 1.14: download - view: text, markup, annotated - select for diffs
Wed Aug 5 09:04:36 1998 UTC (13 years, 6 months ago) by dfr
Branches: MAIN
CVS tags: RELENG_3_BP, RELENG_3_2_PAO_BP, RELENG_3_2_PAO, RELENG_3_2_0_RELEASE, RELENG_3_1_0_RELEASE, RELENG_3_0_0_RELEASE, PRE_VFS_BIO_NFS_PATCH, PRE_SMP_VMSHARE, PRE_NEWBUS, POST_VFS_BIO_NFS_PATCH, POST_SMP_VMSHARE, POST_NEWBUS
Branch point for: RELENG_3
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +7 -2 lines
Define ss_size in struct sigaltstack as size_t instead of int.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sat Mar 28 11:50:43 1998 UTC (13 years, 10 months ago) by dufault
Branches: MAIN
CVS tags: PRE_NOBDEV, PRE_DEVFS_SLICE, POST_DEVFS_SLICE
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +28 -1 lines
Finish _POSIX_PRIORITY_SCHEDULING.  Needs P1003_1B and
_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.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Sat Sep 13 19:42:29 1997 UTC (14 years, 4 months ago) by joerg
Branches: MAIN
CVS tags: PRE_SOFTUPDATE, POST_SOFTUPDATE
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +2 -1 lines
Implement SA_NOCLDWAIT.

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

Revision 1.11: download - view: text, markup, annotated - select for diffs
Sat Feb 22 09:45:53 1997 UTC (14 years, 11 months ago) by peter
Branches: MAIN
CVS tags: pre_smp_merge, post_smp_merge, WOLLMAN_MBUF, BP_WOLLMAN_MBUF
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +1 -1 lines
Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$.  We are not
ready for it yet.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Tue Jan 14 06:55:38 1997 UTC (15 years ago) by jkh
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +1 -1 lines
Make the long-awaited change from $Id$ to $FreeBSD$

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.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sat Mar 30 15:10:18 1996 UTC (15 years, 10 months ago) by peter
Branches: MAIN
CVS tags: wollman_polling, RELENG_2_2_BP, RELENG_2_2_8_RELEASE, RELENG_2_2_7_RELEASE, RELENG_2_2_6_RELEASE, RELENG_2_2_5_RELEASE, RELENG_2_2_2_RELEASE, RELENG_2_2_1_RELEASE, RELENG_2_2_0_RELEASE
Branch point for: RELENG_2_2
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +3 -1 lines
Add a SV_NODEFER and SV_RESETHAND #define, after Bruce pointed out that
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.

Revision 1.1.1.2 (vendor branch): download - view: text, markup, annotated - select for diffs
Mon Mar 11 19:39:20 1996 UTC (15 years, 11 months ago) by peter
Branches: CSRG
CVS tags: bsd_44_lite_2
Diff to: previous 1.1.1.1: preferred, colored
Changes since revision 1.1.1.1: +6 -6 lines
Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all
files are off the vendor branch, so this should not change anything.

A "U" marker generally means that the file was not changed in between
the 4.4Lite and Lite-2 releases, and does not need a merge.  "C" generally
means that there was a change.
[new sys/syscallargs.h file, to be "cvs rm"ed]

Revision 1.8: download - view: text, markup, annotated - select for diffs
Mon Mar 11 02:10:41 1996 UTC (15 years, 11 months ago) by hsu
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +2 -2 lines
Merge in Lite2: no changes necessary.  Just update CSRG id.
Reviewed by:	davidg & bde

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sat Mar 2 19:38:13 1996 UTC (15 years, 11 months ago) by peter
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +8 -5 lines
Mega-commit for Linux emulator update..  This has been stress tested under
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.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Mon Jan 22 12:31:15 1996 UTC (16 years ago) by mpp
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -2 lines
Changed the description of SIGSYS to better reflect what
it means when that signal is received.  Closes PR# 686.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Thu Oct 19 19:16:00 1995 UTC (16 years, 3 months ago) by swallace
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +2 -1 lines
Implement SA_NODEFER sa_flag for sigaction():
	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

Revision 1.4: download - view: text, markup, annotated - select for diffs
Wed Jun 28 02:14:04 1995 UTC (16 years, 7 months ago) by bde
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +31 -24 lines
Fix standards conformance bugs in <signal.h>:

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.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sun Jan 29 01:19:25 1995 UTC (17 years ago) by ats
Branches: MAIN
CVS tags: RELENG_2_1_7_RELEASE, RELENG_2_1_6_RELEASE, RELENG_2_1_6_1_RELEASE, RELENG_2_1_5_RELEASE, RELENG_2_1_0_RELEASE, RELENG_2_1_0_BP, RELENG_2_0_5_RELEASE, RELENG_2_0_5_BP, RELENG_2_0_5_ALPHA, RELENG_2_0_5
Branch point for: RELENG_2_1_0
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +2 -2 lines
Correct a name of one structure member in the sigaltstack structure.
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.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Aug 2 07:53:32 1994 UTC (17 years, 6 months ago) by davidg
Branches: MAIN
CVS tags: RELEASE_2_0, OLAH_TTCP, BETA_2_0, ALPHA_2_0
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +1 -0 lines
Added $Id$

Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Tue May 24 10:08:59 1994 UTC (17 years, 8 months ago) by rgrimes
Branches: CSRG
CVS tags: bsd_44_lite, REL_before_johndavid_2_0_0
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0 lines
BSD 4.4 Lite Kernel Sources

Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue May 24 10:08:58 1994 UTC (17 years, 8 months ago) by rgrimes
Branches: MAIN
Initial revision

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options