From d3864341aacc6a2ecc95960d23ac0e49f1f538fa Mon Sep 17 00:00:00 2001 From: Robert Mustacchi Date: Mon, 22 Dec 2014 16:01:41 +0000 Subject: [PATCH] 5478 need smt_pause(3C) Reviewed by: Jerry Jelinek Approved by: Richard Lowe --- usr/src/man/man3c/Makefile | 1 + usr/src/man/man3c/smt_pause.3c | 38 ++++++++++++++++++++++++++ usr/src/man/man3lib/libc.3lib | 3 +- usr/src/pkg/manifests/system-library.man3c.inc | 1 + 4 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 usr/src/man/man3c/smt_pause.3c diff --git a/usr/src/man/man3c/Makefile b/usr/src/man/man3c/Makefile index 878f352ce8..768917447e 100644 --- a/usr/src/man/man3c/Makefile +++ b/usr/src/man/man3c/Makefile @@ -410,6 +410,7 @@ MANFILES= __fbufsize.3c \ sigwaitinfo.3c \ sleep.3c \ ssignal.3c \ + smt_pause.3c \ stack_getbounds.3c \ stack_inbounds.3c \ stack_setbounds.3c \ diff --git a/usr/src/man/man3c/smt_pause.3c b/usr/src/man/man3c/smt_pause.3c new file mode 100644 index 0000000000..2a890c4977 --- /dev/null +++ b/usr/src/man/man3c/smt_pause.3c @@ -0,0 +1,38 @@ +.\" +.\" This file and its contents are supplied under the terms of the +.\" Common Development and Distribution License ("CDDL"), version 1.0. +.\" You may only use this file in accordance with the terms of version +.\" 1.0 of the CDDL. +.\" +.\" A full copy of the text of the CDDL should have accompanied this +.\" source. A copy of the CDDL is also available via the Internet at +.\" http://www.illumos.org/license/CDDL. +.\" +.\" +.\" Copyright (c) 2014, Joyent, Inc. +.\" +.Dd "Dec 22, 2014" +.Dt SMT_PAUSE 3C +.Os +.Sh NAME +.Nm smt_pause +.Nd hardware-aware busy wait +.Sh SYNOPSIS +.In synch.h +.Ft void +.Fo smt_pause +.Fa void +.Fc +.Sh DESCRIPTION +The +.Fn smt_pause +function performs a busy-wait for an implementation defined period of +time. On hardware platforms that support it, it notifies the hardware +that this is occurring in an effort to minimize resource usage. This is +commonly used in the implementation of spin loops. +.Sh INTERFACE STABILITY +.Sy Committed +.Sh MT-LEVEL +.Sy MT-Safe +.Sh SEE ALSO +.Xr attributes 5 diff --git a/usr/src/man/man3lib/libc.3lib b/usr/src/man/man3lib/libc.3lib index 6bb3e5b5ec..61da3d9c82 100644 --- a/usr/src/man/man3lib/libc.3lib +++ b/usr/src/man/man3lib/libc.3lib @@ -659,7 +659,8 @@ l l . \fBsigstack\fR \fBsigsuspend\fR \fBsigtimedwait\fR \fBsigwait\fR \fBsigwaitinfo\fR \fBsingle_to_decimal\fR -\fBsleep\fR \fBsnprintf\fR +\fBsleep\fR \fBsmt_pause\fR +\fBsnprintf\fR \fBsprintf\fR \fBsrand\fR \fBsrand48\fR \fBsrandom\fR \fBsscanf\fR \fBssignal\fR diff --git a/usr/src/pkg/manifests/system-library.man3c.inc b/usr/src/pkg/manifests/system-library.man3c.inc index dc225459f7..5796c0588d 100644 --- a/usr/src/pkg/manifests/system-library.man3c.inc +++ b/usr/src/pkg/manifests/system-library.man3c.inc @@ -405,6 +405,7 @@ file path=usr/share/man/man3c/sigsetops.3c file path=usr/share/man/man3c/sigstack.3c file path=usr/share/man/man3c/sigwaitinfo.3c file path=usr/share/man/man3c/sleep.3c +file path=usr/share/man/man3c/smt_pause.3c file path=usr/share/man/man3c/ssignal.3c file path=usr/share/man/man3c/stack_getbounds.3c file path=usr/share/man/man3c/stack_inbounds.3c -- 2.11.4.GIT