summaryrefslogtreecommitdiff
path: root/usr/src/lib/libc/port/threads
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib/libc/port/threads')
-rw-r--r--usr/src/lib/libc/port/threads/rwlock.c3
-rw-r--r--usr/src/lib/libc/port/threads/synch.c31
-rw-r--r--usr/src/lib/libc/port/threads/thr.c15
3 files changed, 26 insertions, 23 deletions
diff --git a/usr/src/lib/libc/port/threads/rwlock.c b/usr/src/lib/libc/port/threads/rwlock.c
index a8f9caff18..9654b7daaf 100644
--- a/usr/src/lib/libc/port/threads/rwlock.c
+++ b/usr/src/lib/libc/port/threads/rwlock.c
@@ -21,6 +21,7 @@
/*
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016 by Delphix. All rights reserved.
*/
#include "lint.h"
@@ -620,7 +621,7 @@ rwlock_lock(rwlock_t *rwlp, timespec_t *tsp, int rd_wr)
/*
* Do a priority check on the queued waiter (the
* highest priority thread on the queue) to see
- * if we should defer to him or just grab the lock.
+ * if we should defer to it or just grab the lock.
*/
int our_pri = real_priority(self);
int his_pri = real_priority(ulwp);
diff --git a/usr/src/lib/libc/port/threads/synch.c b/usr/src/lib/libc/port/threads/synch.c
index b4efb58d17..3ec76f7c21 100644
--- a/usr/src/lib/libc/port/threads/synch.c
+++ b/usr/src/lib/libc/port/threads/synch.c
@@ -23,6 +23,7 @@
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
* Copyright 2015, Joyent, Inc.
+ * Copyright (c) 2016 by Delphix. All rights reserved.
*/
#include "lint.h"
@@ -3717,11 +3718,11 @@ cond_signal(cond_t *cvp)
return (error);
/*
- * Move someone from the condvar sleep queue to the mutex sleep
- * queue for the mutex that he will acquire on being waked up.
- * We can do this only if we own the mutex he will acquire.
- * If we do not own the mutex, or if his ul_cv_wake flag
- * is set, just dequeue and unpark him.
+ * Move some thread from the condvar sleep queue to the mutex sleep
+ * queue for the mutex that it will acquire on being waked up.
+ * We can do this only if we own the mutex it will acquire.
+ * If we do not own the mutex, or if its ul_cv_wake flag
+ * is set, just dequeue and unpark it.
*/
qp = queue_lock(cvp, CV);
ulwpp = queue_slot(qp, &prev, &more);
@@ -3733,26 +3734,26 @@ cond_signal(cond_t *cvp)
ulwp = *ulwpp;
/*
- * Inform the thread that he was the recipient of a cond_signal().
- * This lets him deal with cond_signal() and, concurrently,
+ * Inform the thread that it was the recipient of a cond_signal().
+ * This lets it deal with cond_signal() and, concurrently,
* one or more of a cancellation, a UNIX signal, or a timeout.
* These latter conditions must not consume a cond_signal().
*/
ulwp->ul_signalled = 1;
/*
- * Dequeue the waiter but leave his ul_sleepq non-NULL
- * while we move him to the mutex queue so that he can
+ * Dequeue the waiter but leave its ul_sleepq non-NULL
+ * while we move it to the mutex queue so that it can
* deal properly with spurious wakeups.
*/
queue_unlink(qp, ulwpp, prev);
- mp = ulwp->ul_cvmutex; /* the mutex he will acquire */
+ mp = ulwp->ul_cvmutex; /* the mutex it will acquire */
ulwp->ul_cvmutex = NULL;
ASSERT(mp != NULL);
if (ulwp->ul_cv_wake || !MUTEX_OWNED(mp, self)) {
- /* just wake him up */
+ /* just wake it up */
lwpid = ulwp->ul_lwpid;
no_preempt(self);
ulwp->ul_sleepq = NULL;
@@ -3761,7 +3762,7 @@ cond_signal(cond_t *cvp)
(void) __lwp_unpark(lwpid);
preempt(self);
} else {
- /* move him to the mutex queue */
+ /* move it to the mutex queue */
mqp = queue_lock(mp, MX);
enqueue(mqp, ulwp, 0);
mp->mutex_waiters = 1;
@@ -3876,18 +3877,18 @@ cond_broadcast(cond_t *cvp)
break;
ASSERT(ulwp->ul_wchan == cvp);
queue_unlink(qp, &qrp->qr_head, NULL);
- mp = ulwp->ul_cvmutex; /* his mutex */
+ mp = ulwp->ul_cvmutex; /* its mutex */
ulwp->ul_cvmutex = NULL;
ASSERT(mp != NULL);
if (ulwp->ul_cv_wake || !MUTEX_OWNED(mp, self)) {
- /* just wake him up */
+ /* just wake it up */
ulwp->ul_sleepq = NULL;
ulwp->ul_wchan = NULL;
if (nlwpid == maxlwps)
lwpid = alloc_lwpids(lwpid, &nlwpid, &maxlwps);
lwpid[nlwpid++] = ulwp->ul_lwpid;
} else {
- /* move him to the mutex queue */
+ /* move it to the mutex queue */
if (mp != mp_cache) {
mp_cache = mp;
if (mqp != NULL)
diff --git a/usr/src/lib/libc/port/threads/thr.c b/usr/src/lib/libc/port/threads/thr.c
index 88ce377f21..116bb61125 100644
--- a/usr/src/lib/libc/port/threads/thr.c
+++ b/usr/src/lib/libc/port/threads/thr.c
@@ -21,6 +21,7 @@
/*
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016 by Delphix. All rights reserved.
*/
/*
* Copyright 2016 Joyent, Inc.
@@ -1786,17 +1787,17 @@ force_continue(ulwp_t *ulwp)
if (error != 0 && error != EINTR)
break;
error = 0;
- if (ulwp->ul_stopping) { /* he is stopping himself */
- ts.tv_sec = 0; /* give him a chance to run */
+ if (ulwp->ul_stopping) { /* it is stopping itsself */
+ ts.tv_sec = 0; /* give it a chance to run */
ts.tv_nsec = 100000; /* 100 usecs or clock tick */
(void) __nanosleep(&ts, NULL);
}
- if (!ulwp->ul_stopping) /* he is running now */
+ if (!ulwp->ul_stopping) /* it is running now */
break; /* so we are done */
/*
- * He is marked as being in the process of stopping
- * himself. Loop around and continue him again.
- * He may not have been stopped the first time.
+ * It is marked as being in the process of stopping
+ * itself. Loop around and continue it again.
+ * It may not have been stopped the first time.
*/
}
}
@@ -2480,7 +2481,7 @@ getlwpstatus(thread_t tid, struct lwpstatus *sp)
(void) __close(fd);
return (0);
}
- yield(); /* give him a chance to stop */
+ yield(); /* give it a chance to stop */
}
(void) __close(fd);
}