xref: /illumos-gate/usr/src/man/man3c/thr_getconcurrency.3c (revision 5422785d352a2bb398daceab3d1898a8aa64d006)
te
Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
THR_GETCONCURRENCY 3C "May 11, 1998"
NAME
thr_getconcurrency, thr_setconcurrency - get or set thread concurrency level
SYNOPSIS

cc -mt [ flag... ] file...[ library... ]
#include <thread.h>

int thr_setconcurrency(int new_level);

int thr_getconcurrency(void);
DESCRIPTION

These functions are obsolete and maintained for compatibility only. The thr_setconcurrency() function updates the desired concurrency level that libthread maintains for the calling process. This value does not affect the behavior of the calling process.

The thr_getconcurrency() function returns the current value for the desired concurrency level.

RETURN VALUES

The thr_getconcurrency() function always returns the current value for the desired concurrency level.

If successful, the thr_setconcurrency() function returns 0. Otherwise, a non-zero value is returned to indicate the error.

ERRORS

The thr_setconcurrency() function will fail if: EAGAIN

The specified concurrency level would cause a system resource to be exceeded.

EINVAL

The value for new_level is negative.

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
MT-Level MT-Safe
SEE ALSO

thr_create(3C), attributes(5), standards(5)