summaryrefslogtreecommitdiff
path: root/usr/src/head/pthread.h
diff options
context:
space:
mode:
authorJohn Levon <john.levon@joyent.com>2018-10-15 14:57:13 +0000
committerJohn Levon <john.levon@joyent.com>2018-10-15 14:57:13 +0000
commitf5733417953d12d5f4b44353b59c3b14f13696c2 (patch)
tree3e8c4bc1ee61164386f7dfc70c4b8b760731d843 /usr/src/head/pthread.h
parent8bd1e5ed2443eb501ddfba4147e769b6d0074ef3 (diff)
parentf35f236324c07bf560ad6481307ea93b1261d636 (diff)
downloadillumos-joyent-gcc-update.tar.gz
Merge remote-tracking branch 'ctf/OS-7275' into gcc-updategcc-update
Diffstat (limited to 'usr/src/head/pthread.h')
-rw-r--r--usr/src/head/pthread.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/usr/src/head/pthread.h b/usr/src/head/pthread.h
index 91d268a30d..490a93f1b2 100644
--- a/usr/src/head/pthread.h
+++ b/usr/src/head/pthread.h
@@ -21,7 +21,7 @@
/*
* Copyright 2014 Garrett D'Amore <garrett@damore.org>
- * Copyright 2016 Joyent, Inc.
+ * Copyright 2018 Joyent, Inc.
*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -139,6 +139,9 @@ extern "C" {
/* barriers */
#define PTHREAD_BARRIER_SERIAL_THREAD -2
+/* For pthread_{get,set}name_np(). */
+#define PTHREAD_MAX_NAMELEN_NP (32)
+
#ifndef _ASM
/*
@@ -209,6 +212,10 @@ extern int pthread_attr_setschedparam(pthread_attr_t *_RESTRICT_KYWD,
const struct sched_param *_RESTRICT_KYWD);
extern int pthread_attr_getschedparam(const pthread_attr_t *_RESTRICT_KYWD,
struct sched_param *_RESTRICT_KYWD);
+extern int pthread_attr_setname_np(pthread_attr_t *_RESTRICT_KYWD,
+ const char *_RESTRICT_KYWD);
+extern int pthread_attr_getname_np(pthread_attr_t *_RESTRICT_KYWD,
+ char *_RESTRICT_KYWD, size_t);
extern int pthread_create(pthread_t *_RESTRICT_KYWD,
const pthread_attr_t *_RESTRICT_KYWD, void * (*)(void *),
void *_RESTRICT_KYWD);
@@ -231,6 +238,8 @@ extern int pthread_key_delete(pthread_key_t);
extern int pthread_setspecific(pthread_key_t, const void *);
extern void *pthread_getspecific(pthread_key_t);
extern pthread_t pthread_self(void);
+extern int pthread_setname_np(pthread_t, const char *);
+extern int pthread_getname_np(pthread_t, char *, size_t);
/*
* function prototypes - synchronization related calls