mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
When events on a reference is cancelled, check our doorstep first,
it might be an orphan.
This commit is contained in:
parent
6140afa7ab
commit
2ab31b05ba
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=114447
@ -210,9 +210,16 @@ void
|
||||
g_cancel_event(void *ref)
|
||||
{
|
||||
struct g_event *ep, *epn;
|
||||
struct g_provider *pp;
|
||||
u_int n;
|
||||
|
||||
mtx_lock(&g_eventlock);
|
||||
TAILQ_FOREACH(pp, &g_doorstep, orphan) {
|
||||
if (pp != ref)
|
||||
continue;
|
||||
TAILQ_REMOVE(&g_doorstep, pp, orphan);
|
||||
break;
|
||||
}
|
||||
for (ep = TAILQ_FIRST(&g_events); ep != NULL; ep = epn) {
|
||||
epn = TAILQ_NEXT(ep, events);
|
||||
for (n = 0; n < G_N_EVENTREFS; n++) {
|
||||
|
Loading…
Reference in New Issue
Block a user