Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Jun 2018 22:37:53 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r334546 - in head/sys: amd64/amd64 kern sys
Message-ID:  <201806022237.w52Mbrvi039092@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjg
Date: Sat Jun  2 22:37:53 2018
New Revision: 334546
URL: https://svnweb.freebsd.org/changeset/base/334546

Log:
  Remove an unused argument to turnstile_unpend.
  
  PR:	228694
  Submitted by:	Julian Pszczołowski <julian.pszczolowski@gmail.com>

Modified:
  head/sys/amd64/amd64/pmap.c
  head/sys/kern/kern_mutex.c
  head/sys/kern/kern_rmlock.c
  head/sys/kern/kern_rwlock.c
  head/sys/kern/subr_turnstile.c
  head/sys/sys/turnstile.h

Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c	Sat Jun  2 22:20:09 2018	(r334545)
+++ head/sys/amd64/amd64/pmap.c	Sat Jun  2 22:37:53 2018	(r334546)
@@ -513,7 +513,7 @@ pmap_delayed_invl_finished(void)
 		pmap_invl_gen = invl_gen->gen;
 		if (ts != NULL) {
 			turnstile_broadcast(ts, TS_SHARED_QUEUE);
-			turnstile_unpend(ts, TS_SHARED_LOCK);
+			turnstile_unpend(ts);
 		}
 		turnstile_chain_unlock(&invl_gen_ts);
 	} else {

Modified: head/sys/kern/kern_mutex.c
==============================================================================
--- head/sys/kern/kern_mutex.c	Sat Jun  2 22:20:09 2018	(r334545)
+++ head/sys/kern/kern_mutex.c	Sat Jun  2 22:37:53 2018	(r334546)
@@ -1029,7 +1029,7 @@ __mtx_unlock_sleep(volatile uintptr_t *c, uintptr_t v)
 	 * This turnstile is now no longer associated with the mutex.  We can
 	 * unlock the chain lock so a new turnstile may take it's place.
 	 */
-	turnstile_unpend(ts, TS_EXCLUSIVE_LOCK);
+	turnstile_unpend(ts);
 	turnstile_chain_unlock(&m->lock_object);
 }
 

Modified: head/sys/kern/kern_rmlock.c
==============================================================================
--- head/sys/kern/kern_rmlock.c	Sat Jun  2 22:20:09 2018	(r334545)
+++ head/sys/kern/kern_rmlock.c	Sat Jun  2 22:37:53 2018	(r334546)
@@ -494,7 +494,7 @@ _rm_unlock_hard(struct thread *td,struct rm_priotracke
 		ts = turnstile_lookup(&rm->lock_object);
 
 		turnstile_signal(ts, TS_EXCLUSIVE_QUEUE);
-		turnstile_unpend(ts, TS_EXCLUSIVE_LOCK);
+		turnstile_unpend(ts);
 		turnstile_chain_unlock(&rm->lock_object);
 	} else
 		mtx_unlock_spin(&rm_spinlock);

Modified: head/sys/kern/kern_rwlock.c
==============================================================================
--- head/sys/kern/kern_rwlock.c	Sat Jun  2 22:20:09 2018	(r334545)
+++ head/sys/kern/kern_rwlock.c	Sat Jun  2 22:37:53 2018	(r334546)
@@ -822,7 +822,7 @@ __rw_runlock_hard(struct rwlock *rw, struct thread *td
 		ts = turnstile_lookup(&rw->lock_object);
 		MPASS(ts != NULL);
 		turnstile_broadcast(ts, queue);
-		turnstile_unpend(ts, TS_SHARED_LOCK);
+		turnstile_unpend(ts);
 		td->td_rw_rlocks--;
 		break;
 	}
@@ -1259,7 +1259,7 @@ __rw_wunlock_hard(volatile uintptr_t *c, uintptr_t v L
 	ts = turnstile_lookup(&rw->lock_object);
 	MPASS(ts != NULL);
 	turnstile_broadcast(ts, queue);
-	turnstile_unpend(ts, TS_EXCLUSIVE_LOCK);
+	turnstile_unpend(ts);
 	turnstile_chain_unlock(&rw->lock_object);
 }
 
@@ -1405,7 +1405,7 @@ __rw_downgrade_int(struct rwlock *rw LOCK_FILE_LINE_AR
 	 */
 	if (rwait && !wwait) {
 		turnstile_broadcast(ts, TS_SHARED_QUEUE);
-		turnstile_unpend(ts, TS_EXCLUSIVE_LOCK);
+		turnstile_unpend(ts);
 	} else
 		turnstile_disown(ts);
 	turnstile_chain_unlock(&rw->lock_object);

Modified: head/sys/kern/subr_turnstile.c
==============================================================================
--- head/sys/kern/subr_turnstile.c	Sat Jun  2 22:20:09 2018	(r334545)
+++ head/sys/kern/subr_turnstile.c	Sat Jun  2 22:37:53 2018	(r334546)
@@ -903,7 +903,7 @@ turnstile_broadcast(struct turnstile *ts, int queue)
  * chain locked.
  */
 void
-turnstile_unpend(struct turnstile *ts, int owner_type)
+turnstile_unpend(struct turnstile *ts)
 {
 	TAILQ_HEAD( ,thread) pending_threads;
 	struct turnstile *nts;

Modified: head/sys/sys/turnstile.h
==============================================================================
--- head/sys/sys/turnstile.h	Sat Jun  2 22:20:09 2018	(r334545)
+++ head/sys/sys/turnstile.h	Sat Jun  2 22:37:53 2018	(r334546)
@@ -83,10 +83,6 @@ struct turnstile;
 #define	TS_EXCLUSIVE_QUEUE	0
 #define	TS_SHARED_QUEUE		1
 
-/* The type of lock currently held. */
-#define	TS_EXCLUSIVE_LOCK	TS_EXCLUSIVE_QUEUE
-#define	TS_SHARED_LOCK		TS_SHARED_QUEUE
-
 void	init_turnstiles(void);
 void	turnstile_adjust(struct thread *, u_char);
 struct turnstile *turnstile_alloc(void);
@@ -102,7 +98,7 @@ struct thread *turnstile_head(struct turnstile *, int)
 struct turnstile *turnstile_lookup(struct lock_object *);
 int	turnstile_signal(struct turnstile *, int);
 struct turnstile *turnstile_trywait(struct lock_object *);
-void	turnstile_unpend(struct turnstile *, int);
+void	turnstile_unpend(struct turnstile *);
 void	turnstile_wait(struct turnstile *, struct thread *, int);
 struct thread *turnstile_lock(struct turnstile *, struct lock_object **);
 void	turnstile_unlock(struct turnstile *, struct lock_object *);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806022237.w52Mbrvi039092>