diff options
-rw-r--r-- | usr/src/lib/libc/port/threads/pthr_attr.c | 10 | ||||
-rw-r--r-- | usr/src/lib/libc/port/threads/pthread.c | 4 | ||||
-rw-r--r-- | usr/src/man/man3c/pthread_attr_get_np.3c | 8 |
3 files changed, 10 insertions, 12 deletions
diff --git a/usr/src/lib/libc/port/threads/pthr_attr.c b/usr/src/lib/libc/port/threads/pthr_attr.c index 7cfc970120..e5b3116eaf 100644 --- a/usr/src/lib/libc/port/threads/pthr_attr.c +++ b/usr/src/lib/libc/port/threads/pthr_attr.c @@ -529,16 +529,16 @@ pthread_attr_getname_np(pthread_attr_t *attr, char *buf, size_t len) /* * This function is a common BSD extension to pthread which is used to obtain * the attributes of a thread that might have changed after its creation, for - * example, it's stack address. + * example, its stack address. * * Note, there is no setattr analogue, nor do we desire to add one at this time. * Similarly there is no native threads API analogue (nor should we add one for * C11). * * The astute reader may note that there is a GNU version of this called - * pthread_getattr_np(). The two functions are similar, but subtley different in - * a rather important way. While the pthread_attr_get_np() expects to be given - * a pthread_attr_t that has had pthread_attr_init() called on in, + * pthread_getattr_np(). The two functions are similar, but subtly different in + * a rather important way. While pthread_attr_get_np() expects to be given + * a pthread_attr_t that has had pthread_attr_init() called on it, * pthread_getattr_np() does not. However, on GNU systems, where the function * originates, the pthread_attr_t is not opaque and thus it is entirely safe to * both call pthread_attr_init() and then call pthread_getattr_np() on the same @@ -556,7 +556,7 @@ pthread_attr_get_np(pthread_t tid, pthread_attr_t *attr) /* * To ensure that information about the target thread does not change or - * disappear while we're trying to interrogate it, we grab the uwlp + * disappear while we're trying to interrogate it, we grab the ulwp * lock. */ if (self->ul_lwpid == tid) { diff --git a/usr/src/lib/libc/port/threads/pthread.c b/usr/src/lib/libc/port/threads/pthread.c index dc0123361d..68c0fcbfa5 100644 --- a/usr/src/lib/libc/port/threads/pthread.c +++ b/usr/src/lib/libc/port/threads/pthread.c @@ -131,8 +131,8 @@ pthread_create(pthread_t *thread, const pthread_attr_t *attr, flag, &tid, ap->guardsize, ap->name); if (error == 0) { /* - * Record the original inheritence value for - * pthread_getattr_np(). We should always be able to find the + * Record the original inheritance value for + * pthread_attr_get_np(). We should always be able to find the * thread. */ (void) _thr_setinherit(tid, ap->inherit); diff --git a/usr/src/man/man3c/pthread_attr_get_np.3c b/usr/src/man/man3c/pthread_attr_get_np.3c index 9da50ab171..2b166d0ef4 100644 --- a/usr/src/man/man3c/pthread_attr_get_np.3c +++ b/usr/src/man/man3c/pthread_attr_get_np.3c @@ -11,7 +11,7 @@ .\" .\" Copyright 2016 Joyent, Inc. .\" -.Dd November 8, 2020 +.Dd November 10, 2020 .Dt PTHREAD_ATTR_GET_NP 3C .Os .Sh NAME @@ -100,13 +100,11 @@ For more information on the guard size of a thread and its purpose, see .Sh RETURN VALUES Upon successful completion, the .Fn pthread_attr_get_np -and -.Fn pthread_getattr_np -functions return +function returns .Sy 0 . Otherwise, an error number is returned to indicate the error. .Sh EXAMPLES -The following program demonstrates how to use these functions to get +The following program demonstrates how to use this function to get the location and stack size of a newly created thread. .Bd -literal #include <assert.h> |