summaryrefslogtreecommitdiff
path: root/lib/librthread/rthread.c
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2005-12-19 06:45:15 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2005-12-19 06:45:15 +0000
commitf0c8c312f92a358dad31c3b753cfffed42223cb9 (patch)
tree51d8d4f04f0887399d6f0564cb54f23867cb8142 /lib/librthread/rthread.c
parentdaa9b064a328487f6d7c1ea9da14fa9490977332 (diff)
add pthread_get/set_concurrency (useless for now)
add pthread_get/set_stack[addr] (info not used yet)
Diffstat (limited to 'lib/librthread/rthread.c')
-rw-r--r--lib/librthread/rthread.c19
1 files changed, 18 insertions, 1 deletions
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 <tedu@openbsd.org>
* 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
*/