linuxkpi: Introduce tasklet_disable_nosync()

This is needed for the drm-kmod 5.5 update.

Reviewed by:		hselasky (src)
MFC after:		3 days
Differential Revision:	https://reviews.freebsd.org/D30024
This commit is contained in:
Neel Chauhan 2021-04-28 08:05:57 -07:00
parent efe7f12cd3
commit 9781105bea
2 changed files with 8 additions and 0 deletions

View File

@ -208,6 +208,7 @@ extern void tasklet_init(struct tasklet_struct *, tasklet_func_t *,
unsigned long data);
extern void tasklet_enable(struct tasklet_struct *);
extern void tasklet_disable(struct tasklet_struct *);
extern void tasklet_disable_nosync(struct tasklet_struct *);
extern int tasklet_trylock(struct tasklet_struct *);
extern void tasklet_unlock(struct tasklet_struct *);
extern void tasklet_unlock_wait(struct tasklet_struct *ts);

View File

@ -227,6 +227,13 @@ tasklet_disable(struct tasklet_struct *ts)
tasklet_unlock_wait(ts);
}
void
tasklet_disable_nosync(struct tasklet_struct *ts)
{
atomic_inc(&ts->count);
barrier();
}
int
tasklet_trylock(struct tasklet_struct *ts)
{