NetBSD/lib/libpthread/pthread_attr_setcreatesuspend_np.3

73 lines
2.8 KiB
Groff
Raw Normal View History

2003-11-12 14:58:34 +03:00
.\" $NetBSD: pthread_attr_setcreatesuspend_np.3,v 1.2 2003/11/12 11:58:34 wiz Exp $
.\"
.\" Copyright (c) 2003 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Christos Zoulas.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 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
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
2003-11-12 14:58:34 +03:00
.Dd November 12, 2003
.Dt PTHREAD_ATTR_SETCREATESUSPEND_NP 3
.Os
.Sh NAME
2003-11-12 14:58:34 +03:00
.Nm pthread_attr_setcreatesuspend_np
.Nd set attribute to create a thread suspended
.Sh LIBRARY
.Lb libpthread
.Sh SYNOPSIS
.In pthread.h
.Ft int
.Fn pthread_attr_setcreatesuspend_np "pthread_attr_t attr"
.Sh DESCRIPTION
The
.Fn pthread_attr_setcreatesuspend_np
2003-11-12 14:58:34 +03:00
function sets the
.Ar attr
argument, so that if this
.Ar attr
is used in a
2003-11-12 14:58:34 +03:00
.Xr pthread_create 3
call, then the thread created will not run, but it will remain blocked
in the suspended queue, until
2003-11-12 14:58:34 +03:00
.Xr pthread_resume_np 3
is called on it.
.Sh RETURN VALUES
The
.Fn pthread_attr_setcreatesuspend_np
2003-11-12 14:58:34 +03:00
function always returns 0.
.Sh ERRORS
.Fn pthread_attr_setcreatesuspend_np
never fails.
.Sh SEE ALSO
.Xr pthread_create 3 ,
.Xr pthread_resume_np 3 ,
.Xr pthread_suspend_np 3