Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167375542
D45937.id140731.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D45937.id140731.diff
View Options
diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c
--- a/sys/kern/subr_turnstile.c
+++ b/sys/kern/subr_turnstile.c
@@ -622,12 +622,6 @@
mtx_unlock_spin(&tc->tc_lock);
}
-void
-turnstile_assert(struct turnstile *ts)
-{
- MPASS(ts->ts_lockobj == NULL);
-}
-
void
turnstile_cancel(struct turnstile *ts)
{
@@ -1059,36 +1053,6 @@
thread_unlock(td);
}
-/*
- * Return the first thread in a turnstile.
- */
-struct thread *
-turnstile_head(struct turnstile *ts, int queue)
-{
-#ifdef INVARIANTS
-
- MPASS(ts != NULL);
- MPASS(queue == TS_SHARED_QUEUE || queue == TS_EXCLUSIVE_QUEUE);
- mtx_assert(&ts->ts_lock, MA_OWNED);
-#endif
- return (TAILQ_FIRST(&ts->ts_blocked[queue]));
-}
-
-/*
- * Returns true if a sub-queue of a turnstile is empty.
- */
-int
-turnstile_empty(struct turnstile *ts, int queue)
-{
-#ifdef INVARIANTS
-
- MPASS(ts != NULL);
- MPASS(queue == TS_SHARED_QUEUE || queue == TS_EXCLUSIVE_QUEUE);
- mtx_assert(&ts->ts_lock, MA_OWNED);
-#endif
- return (TAILQ_EMPTY(&ts->ts_blocked[queue]));
-}
-
#ifdef DDB
static void
print_thread(struct thread *td, const char *prefix)
diff --git a/sys/sys/turnstile.h b/sys/sys/turnstile.h
--- a/sys/sys/turnstile.h
+++ b/sys/sys/turnstile.h
@@ -64,10 +64,6 @@
* a turnstile is not tied to a specific thread and that the turnstile
* released at thread destruction may not be the same turnstile that the
* thread allocated when it was created.
- *
- * The highest priority thread blocked on a specified queue of a
- * turnstile can be obtained via turnstile_head(). A given queue can
- * also be queried to see if it is empty via turnstile_empty().
*/
struct lock_object;
@@ -89,9 +85,7 @@
void turnstile_chain_unlock(struct lock_object *);
void turnstile_claim(struct turnstile *);
void turnstile_disown(struct turnstile *);
-int turnstile_empty(struct turnstile *ts, int queue);
void turnstile_free(struct turnstile *);
-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 *);
@@ -100,6 +94,5 @@
bool turnstile_lock(struct turnstile *, struct lock_object **,
struct thread **);
void turnstile_unlock(struct turnstile *, struct lock_object *);
-void turnstile_assert(struct turnstile *);
#endif /* _KERNEL */
#endif /* _SYS_TURNSTILE_H_ */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Aug 22, 11:08 AM (4 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37073701
Default Alt Text
D45937.id140731.diff (2 KB)
Attached To
Mode
D45937: subr_turnstile: remove dead code
Attached
Detach File
Event Timeline
Log In to Comment