From owner-svn-src-stable-12@freebsd.org Thu Jan 9 08:20:32 2020 Return-Path: Delivered-To: svn-src-stable-12@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 651F622D384; Thu, 9 Jan 2020 08:20:32 +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 47tfFD24Kdz3HLW; Thu, 9 Jan 2020 08:20:32 +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 3DF7825D13; Thu, 9 Jan 2020 08:20:32 +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 0098KWOH008204; Thu, 9 Jan 2020 08:20:32 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0098KWRP008203; Thu, 9 Jan 2020 08:20:32 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202001090820.0098KWRP008203@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 08:20:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356541 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 356541 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jan 2020 08:20:32 -0000 Author: kib Date: Thu Jan 9 08:20:31 2020 New Revision: 356541 URL: https://svnweb.freebsd.org/changeset/base/356541 Log: MFC r356292: Style: remove trailing spaces/tabs. Modified: stable/12/sys/kern/kern_umtx.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_umtx.c ============================================================================== --- stable/12/sys/kern/kern_umtx.c Thu Jan 9 06:10:25 2020 (r356540) +++ stable/12/sys/kern/kern_umtx.c Thu Jan 9 08:20:31 2020 (r356541) @@ -95,7 +95,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 */ @@ -138,7 +138,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; @@ -180,7 +180,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 }; @@ -292,7 +292,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]; @@ -300,8 +300,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); @@ -406,7 +406,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); } } @@ -441,7 +441,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 } } @@ -613,7 +613,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 } @@ -770,7 +770,7 @@ umtxq_signal_thread(struct umtx_q *uq) wakeup(uq); } -static inline int +static inline int tstohz(const struct timespec *tsp) { struct timeval tv; @@ -825,7 +825,7 @@ abs_timeout_gethz(struct abs_timeout *timo) struct timespec tts; if (timespeccmp(&timo->end, &timo->cur, <=)) - return (-1); + return (-1); timespecsub(&timo->end, &timo->cur, &tts); return (tstohz(&tts)); } @@ -1009,7 +1009,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); @@ -1522,7 +1522,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) { @@ -1773,7 +1773,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) { @@ -1972,7 +1972,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); @@ -2099,7 +2099,7 @@ usrloop: 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); } @@ -2624,7 +2624,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 ? @@ -2673,7 +2673,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); @@ -2702,7 +2702,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); @@ -3124,7 +3124,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; @@ -3279,7 +3279,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); @@ -3400,7 +3400,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); @@ -3456,12 +3456,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); @@ -3695,7 +3695,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); @@ -4200,12 +4200,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); @@ -4266,7 +4266,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);