summaryrefslogtreecommitdiff
path: root/lib/libc/sys
diff options
context:
space:
mode:
authorscw <scw@NetBSD.org>2008-04-29 21:06:28 +0000
committerscw <scw@NetBSD.org>2008-04-29 21:06:28 +0000
commitd05f8e92637de2db3eca1afc087c00a293eaf529 (patch)
tree00c8877b5334864672525cc43da26739db287538 /lib/libc/sys
parent4e2c4c42b4fc84108cd39ee8cc64648a25d41c68 (diff)
- Document RAS_START_ASM, RAS_END_ASM, RAS_START_ASM_HIDDEN, and
RAS_END_ASM_HIDDEN. - Advise against implementing RASs in C. See PR lib/38482 for details. While here, remove clauses 3 and 4 from TNF license.
Diffstat (limited to 'lib/libc/sys')
-rw-r--r--lib/libc/sys/rasctl.238
1 files changed, 29 insertions, 9 deletions
diff --git a/lib/libc/sys/rasctl.2 b/lib/libc/sys/rasctl.2
index c2903953fe1..1d1b7e84d01 100644
--- a/lib/libc/sys/rasctl.2
+++ b/lib/libc/sys/rasctl.2
@@ -1,4 +1,4 @@
-.\" $NetBSD: rasctl.2,v 1.12 2006/09/19 19:54:43 wiz Exp $
+.\" $NetBSD: rasctl.2,v 1.13 2008/04/29 21:06:28 scw Exp $
.\"
.\" Copyright (c) 2002 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -14,13 +14,6 @@
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the NetBSD
-.\" Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\" contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
@@ -34,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd September 19, 2006
+.Dd April 29, 2008
.Dt RASCTL 2
.Os
.Sh NAME
@@ -190,3 +183,30 @@ require the
flag to prevent blocks of code wrapped with
.Dv RAS_START Ns / Ns Dv RAS_END
being moved outside these labels.
+However, be aware that this may not always be sufficient to prevent
+.Xr gcc 1
+from generating non-restartable code within the
+.Nm RAS
+due to register clobbers.
+It is, therefore, strongly recommended that restartable atomic sequences
+are coded in assembly.
+.Nm RAS
+blocks within assembly code can be specified by using the following macros:
+.Bl -tag -width RAS_START_ASM_HIDDEN(name)
+.It Dv RAS_START_ASM(name)
+Similar to
+.Nm RAS_START
+but for use in assembly source code.
+.It Dv RAS_END_ASM(name)
+Similar to
+.Nm RAS_END
+but for use in assembly source code.
+.It Dv RAS_START_ASM_HIDDEN(name)
+Similar to
+.Nm RAS_START_ASM
+except that the symbol will not be placed in the dynamic symbol table.
+.It Dv RAS_END_ASM_HIDDEN(name)
+Similar to
+.Nm RAS_END_ASM
+except that the symbol will not be placed in the dynamic symbol table.
+.El