From b270b5484067210c84822a28e63be9099e0d112b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 15 Feb 2003 08:21:36 +0000 Subject: Update. 2003-02-15 Ulrich Drepper * pthread_setconcurrency.c (pthread_setconcurrency): Fail for negative arguments. * Makefile (tests): Add tst-basic5. * tst-basic5.c: New file. after thread is done. If then zero, call exit(0). --- nptl/pthread_setconcurrency.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'nptl/pthread_setconcurrency.c') diff --git a/nptl/pthread_setconcurrency.c b/nptl/pthread_setconcurrency.c index f65a174d41..8cf1507131 100644 --- a/nptl/pthread_setconcurrency.c +++ b/nptl/pthread_setconcurrency.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -17,6 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include "pthreadP.h" @@ -28,6 +29,9 @@ int pthread_setconcurrency (level) int level; { + if (level < 0) + return EINVAL; + __concurrency_level = level; /* XXX For ports which actually need to handle the concurrency level -- cgit 1.4.1