From owner-svn-src-all@freebsd.org Thu Jan 9 09:30:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C77B522EFCD; Thu, 9 Jan 2020 09:30:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47tgnf4zD4z3MKH; Thu, 9 Jan 2020 09:30:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A435526A18; Thu, 9 Jan 2020 09:30:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0099UEal050401; Thu, 9 Jan 2020 09:30:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0099UEug050400; Thu, 9 Jan 2020 09:30:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202001090930.0099UEug050400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 9 Jan 2020 09:30:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r356546 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 356546 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jan 2020 09:30:14 -0000 Author: kib Date: Thu Jan 9 09:30:14 2020 New Revision: 356546 URL: https://svnweb.freebsd.org/changeset/base/356546 Log: MFC r356292: Style: remove trailing spaces/tabs. Modified: stable/11/sys/kern/kern_umtx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_umtx.c ============================================================================== --- stable/11/sys/kern/kern_umtx.c Thu Jan 9 09:29:24 2020 (r356545) +++ stable/11/sys/kern/kern_umtx.c Thu Jan 9 09:30:14 2020 (r356546) @@ -94,7 +94,7 @@ struct umtx_pi { /* Reference count */ int pi_refcount; - /* List entry to link umtx holding by thread */ + /* List entry to link umtx holding by thread */ TAILQ_ENTRY(umtx_pi) pi_link; /* List entry in hash */ @@ -137,7 +137,7 @@ struct umtx_q { /* Inherited priority from PP mutex */ u_char uq_inherited_pri; - + /* Spare queue ready to be reused */ struct umtxq_queue *uq_spare_queue; @@ -179,7 +179,7 @@ struct umtxq_chain { TAILQ_HEAD(,umtx_pi) uc_pi_list; #ifdef UMTX_PROFILING - u_int length; + u_int length; u_int max_length; #endif }; @@ -289,7 +289,7 @@ static struct mtx umtx_lock; #ifdef UMTX_PROFILING static void -umtx_init_profiling(void) +umtx_init_profiling(void) { struct sysctl_oid *chain_oid; char chain_name[10]; @@ -297,8 +297,8 @@ umtx_init_profiling(void) for (i = 0; i < UMTX_CHAINS; ++i) { snprintf(chain_name, sizeof(chain_name), "%d", i); - chain_oid = SYSCTL_ADD_NODE(NULL, - SYSCTL_STATIC_CHILDREN(_debug_umtx_chains), OID_AUTO, + chain_oid = SYSCTL_ADD_NODE(NULL, + SYSCTL_STATIC_CHILDREN(_debug_umtx_chains), OID_AUTO, chain_name, CTLFLAG_RD, NULL, "umtx hash stats"); SYSCTL_ADD_INT(NULL, SYSCTL_CHILDREN(chain_oid), OID_AUTO, "max_length0", CTLFLAG_RD, &umtxq_chains[0][i].max_length, 0, NULL); @@ -403,7 +403,7 @@ sysctl_debug_umtx_chains_clear(SYSCTL_HANDLER_ARGS) uc = &umtxq_chains[i][j]; mtx_lock(&uc->uc_lock); uc->length = 0; - uc->max_length = 0; + uc->max_length = 0; mtx_unlock(&uc->uc_lock); } } @@ -438,7 +438,7 @@ umtxq_sysinit(void *arg __unused) umtxq_chains[i][j].uc_waiters = 0; #ifdef UMTX_PROFILING umtxq_chains[i][j].length = 0; - umtxq_chains[i][j].max_length = 0; + umtxq_chains[i][j].max_length = 0; #endif } } @@ -610,7 +610,7 @@ umtxq_insert_queue(struct umtx_q *uq, int q) if (uc->length > uc->max_length) { uc->max_length = uc->length; if (uc->max_length > max_length) - max_length = uc->max_length; + max_length = uc->max_length; } #endif } @@ -759,7 +759,7 @@ umtxq_signal_thread(struct umtx_q *uq) wakeup(uq); } -static inline int +static inline int tstohz(const struct timespec *tsp) { struct timeval tv; @@ -815,7 +815,7 @@ abs_timeout_gethz(struct abs_timeout *timo) struct timespec tts; if (timespeccmp(&timo->end, &timo->cur, <=)) - return (-1); + return (-1); tts = timo->end; timespecsub(&tts, &timo->cur); return (tstohz(&tts)); @@ -1000,7 +1000,7 @@ kern_umtx_wake(struct thread *td, void *uaddr, int n_w { struct umtx_key key; int ret; - + if ((ret = umtx_key_get(uaddr, TYPE_SIMPLE_WAIT, is_private ? THREAD_SHARE : AUTO_SHARE, &key)) != 0) return (ret); @@ -1483,7 +1483,7 @@ umtx_pi_check_loop(struct umtx_pi *pi) /* * Propagate priority when a thread is blocked on POSIX * PI mutex. - */ + */ static void umtx_propagate_priority(struct thread *td) { @@ -1734,7 +1734,7 @@ umtx_pi_ref(struct umtx_pi *pi) /* * Decrease reference count for a PI mutex, if the counter * is decreased to zero, its memory space is freed. - */ + */ static void umtx_pi_unref(struct umtx_pi *pi) { @@ -1919,7 +1919,7 @@ do_lock_pi(struct thread *td, struct umutex *m, uint32 */ if (error != 0) break; - + umtxq_lock(&uq->uq_key); umtxq_busy(&uq->uq_key); umtxq_unlock(&uq->uq_key); @@ -2033,7 +2033,7 @@ do_unlock_pi(struct thread *td, struct umutex *m, uint umtx_pi_disown(pi); /* get highest priority thread which is still sleeping. */ uq_first = TAILQ_FIRST(&pi->pi_blocked); - while (uq_first != NULL && + while (uq_first != NULL && (uq_first->uq_flags & UQF_UMTXQ) == 0) { uq_first = TAILQ_NEXT(uq_first, uq_lockq); } @@ -2534,7 +2534,7 @@ do_cv_wait(struct thread *td, struct ucond *cv, struct if (timeout != NULL) abs_timeout_init(&timo, clockid, (wflags & CVWAIT_ABSTIME) != 0, timeout); - + umtxq_lock(&uq->uq_key); if (error == 0) { error = umtxq_sleep(uq, "ucond", timeout == NULL ? @@ -2583,7 +2583,7 @@ do_cv_signal(struct thread *td, struct ucond *cv) if (error == -1) return (EFAULT); if ((error = umtx_key_get(cv, TYPE_CV, GET_SHARE(flags), &key)) != 0) - return (error); + return (error); umtxq_lock(&key); umtxq_busy(&key); cnt = umtxq_count(&key); @@ -2612,7 +2612,7 @@ do_cv_broadcast(struct thread *td, struct ucond *cv) if (error == -1) return (EFAULT); if ((error = umtx_key_get(cv, TYPE_CV, GET_SHARE(flags), &key)) != 0) - return (error); + return (error); umtxq_lock(&key); umtxq_busy(&key); @@ -3022,7 +3022,7 @@ do_rw_unlock(struct thread *td, struct urwlock *rwlock } if (state & URWLOCK_WRITE_OWNER) { for (;;) { - rv = casueword32(&rwlock->rw_state, state, + rv = casueword32(&rwlock->rw_state, state, &oldstate, state & ~URWLOCK_WRITE_OWNER); if (rv == -1) { error = EFAULT; @@ -3165,7 +3165,7 @@ do_sem_wake(struct thread *td, struct _usem *sem) if (error == -1) return (EFAULT); if ((error = umtx_key_get(sem, TYPE_SEM, GET_SHARE(flags), &key)) != 0) - return (error); + return (error); umtxq_lock(&key); umtxq_busy(&key); cnt = umtxq_count(&key); @@ -3283,7 +3283,7 @@ do_sem2_wake(struct thread *td, struct _usem2 *sem) if (rv == -1) return (EFAULT); if ((error = umtx_key_get(sem, TYPE_SEM, GET_SHARE(flags), &key)) != 0) - return (error); + return (error); umtxq_lock(&key); umtxq_busy(&key); cnt = umtxq_count(&key); @@ -3330,12 +3330,12 @@ static inline int umtx_copyin_umtx_time(const void *addr, size_t size, struct _umtx_time *tp) { int error; - + if (size <= sizeof(struct timespec)) { tp->_clockid = CLOCK_REALTIME; tp->_flags = 0; error = copyin(addr, &tp->_timeout, sizeof(struct timespec)); - } else + } else error = copyin(addr, tp, sizeof(struct _umtx_time)); if (error != 0) return (error); @@ -3569,7 +3569,7 @@ __umtx_op_rw_wrlock(struct thread *td, struct _umtx_op if (uap->uaddr2 == NULL) { error = do_rw_wrlock(td, uap->obj, 0); } else { - error = umtx_copyin_umtx_time(uap->uaddr2, + error = umtx_copyin_umtx_time(uap->uaddr2, (size_t)uap->uaddr1, &timeout); if (error != 0) return (error); @@ -4074,12 +4074,12 @@ umtx_copyin_umtx_time32(const void *addr, size_t size, { struct umtx_time32 t32; int error; - + t32.clockid = CLOCK_REALTIME; t32.flags = 0; if (size <= sizeof(struct timespec32)) error = copyin(addr, &t32.timeout, sizeof(struct timespec32)); - else + else error = copyin(addr, &t32, sizeof(struct umtx_time32)); if (error != 0) return (error); @@ -4140,7 +4140,7 @@ __umtx_op_wait_umutex_compat32(struct thread *td, stru if (uap->uaddr2 == NULL) tm_p = NULL; else { - error = umtx_copyin_umtx_time32(uap->uaddr2, + error = umtx_copyin_umtx_time32(uap->uaddr2, (size_t)uap->uaddr1, &timeout); if (error != 0) return (error);