From f0c8c312f92a358dad31c3b753cfffed42223cb9 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Mon, 19 Dec 2005 06:45:15 +0000 Subject: add pthread_get/set_concurrency (useless for now) add pthread_get/set_stack[addr] (info not used yet) --- lib/librthread/rthread.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'lib/librthread/rthread.c') diff --git a/lib/librthread/rthread.c b/lib/librthread/rthread.c index e611b2fdd93..0339039a8c0 100644 --- a/lib/librthread/rthread.c +++ b/lib/librthread/rthread.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread.c,v 1.8 2005/12/18 01:35:06 tedu Exp $ */ +/* $OpenBSD: rthread.c,v 1.9 2005/12/19 06:45:14 tedu Exp $ */ /* * Copyright (c) 2004 Ted Unangst * All Rights Reserved. @@ -40,6 +40,7 @@ static int threads_ready; static pthread_t thread_list; static _spinlock_lock_t thread_lock = _SPINLOCK_UNLOCKED; +static int concurrency_level; /* not used */ int getthrid(); void threxit(int); @@ -326,6 +327,22 @@ pthread_cleanup_pop(int execute) } } +int +pthread_getconcurrency(void) +{ + return (concurrency_level); +} + +int +pthread_concurrency(int new_level) +{ + if (new_level < 0) + return (EINVAL); + concurrency_level = new_level; + return (0); +} + + /* * _np functions */ -- cgit v1.2.3