1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

Remove thread_upcall_check, it was used to avoid race bug in earlier

day's sleep queue code, today the bug no longer exists.
please see 04/25/2004 freebsd-threads@ mailing list archive.
This commit is contained in:
David Xu 2005-05-27 15:57:27 +00:00
parent b0a7bd8e88
commit 0cb7166f78
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=146687
3 changed files with 1 additions and 16 deletions

View File

@ -1427,16 +1427,6 @@ thread_userret(struct thread *td, struct trapframe *frame)
return (error); /* go sync */
}
int
thread_upcall_check(struct thread *td)
{
PROC_LOCK_ASSERT(td->td_proc, MA_OWNED);
if (td->td_kflags & TDK_WAKEUP)
return (1);
else
return (0);
}
/*
* called after ptrace resumed a process, force all
* virtual CPUs to schedule upcall for SA process,

View File

@ -345,10 +345,8 @@ sleepq_catch_signals(void *wchan)
struct sleepqueue *sq;
struct thread *td;
struct proc *p;
int do_upcall;
int sig;
do_upcall = 0;
td = curthread;
p = td->td_proc;
sc = SC_LOOKUP(wchan);
@ -370,8 +368,6 @@ sleepq_catch_signals(void *wchan)
mtx_unlock(&p->p_sigacts->ps_mtx);
if (sig == 0 && thread_suspend_check(1))
sig = SIGSTOP;
else
do_upcall = thread_upcall_check(td);
PROC_UNLOCK(p);
/*
@ -383,7 +379,7 @@ sleepq_catch_signals(void *wchan)
sleepq_lock(wchan);
sq = sleepq_lookup(wchan);
mtx_lock_spin(&sched_lock);
if (TD_ON_SLEEPQ(td) && (sig != 0 || do_upcall != 0))
if (TD_ON_SLEEPQ(td) && sig != 0)
sleepq_resume_thread(sq, td, -1);
else if (!TD_ON_SLEEPQ(td) && sig == 0)
td->td_flags &= ~TDF_SINTR;

View File

@ -928,7 +928,6 @@ struct thread *thread_switchout(struct thread *td, int flags,
void thread_unlink(struct thread *td);
void thread_unsuspend(struct proc *p);
void thread_unsuspend_one(struct thread *td);
int thread_upcall_check(struct thread *td);
void thread_unthread(struct thread *td);
int thread_userret(struct thread *td, struct trapframe *frame);
void thread_user_enter(struct thread *td);