mirror_zfs/include/spl/sys
Rafael Kitover 8b8b44d06f kernel timer API rework
In `config/kernel-timer.m4` refactor slightly to check more generally
for the new `timer_setup()` APIs, but also check the callback signature
because some kernels (notably 4.14) have the new `timer_setup()` API but
use the old callback signature. Also add a check for a `flags` member in
`struct timer_list`, which was added in 4.1-rc8.

Add compatibility shims to `include/spl/sys/timer.h` to allow using the
new timer APIs with the only two caveats being that the callback
argument type must be declared as `spl_timer_list_t` and an explicit
assignment is required to get the timer variable for the `timer_of()`
macro. So the callback would look like this:

```c
__cv_wakeup(spl_timer_list_t t)
{
        struct timer_list *tmr = (struct timer_list *)t;
	struct thing *parent = from_timer(parent, tmr,
		parent_timer_field);
	... /* do stuff with parent */
```

Make some minor changes to `spl-condvar.c` and `spl-taskq.c` to use the
new timer APIs instead of conditional code.

Reviewed-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Closes #8647
2019-05-23 14:40:28 -07:00
..
acl.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
atomic.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
byteorder.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
callb.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
callo.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
cmn_err.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
condvar.h Linux 4.18 compat: inode timespec -> timespec64 2018-06-19 21:51:18 -07:00
console.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
cred.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
ctype.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
debug.h Restrict kstats and print real pointers 2019-04-04 18:57:06 -07:00
disp.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
dkio.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
errno.h Update build system and packaging 2018-05-29 16:00:33 -07:00
fcntl.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
file.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
inttypes.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
isa_defs.h Fix kernel unaligned access on sparc64 2018-07-11 13:10:40 -07:00
kmem_cache.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
kmem.h OpenZFS 9284 - arc_reclaim_thread has 2 jobs 2018-12-26 13:22:28 -08:00
kobj.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
kstat.h Restrict kstats and print real pointers 2019-04-04 18:57:06 -07:00
list.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
Makefile.am Add TRIM support 2019-03-29 09:13:20 -07:00
mode.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
mutex.h Update build system and packaging 2018-05-29 16:00:33 -07:00
param.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
proc.h Unbreak build on Linux kernel < 3.10 2019-04-08 14:59:24 -07:00
processor.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
procfs_list.h Restrict kstats and print real pointers 2019-04-04 18:57:06 -07:00
random.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
rwlock.h Linux 5.2 compat: rw_tryupgrade() 2019-05-23 13:46:33 -07:00
shrinker.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
sid.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
signal.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
stat.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
strings.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
sunddi.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
sysmacros.h Create /proc/sys/kernel/spl/gitrev with git hash 2018-10-08 21:57:02 -07:00
systeminfo.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
taskq.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
thread.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
time.h Linux 4.18 compat: Use ktime_get_coarse_real_ts64() 2019-01-28 10:11:03 -08:00
timer.h kernel timer API rework 2019-05-23 14:40:28 -07:00
tsd.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
types32.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
types.h Linux 5.1 compat: Drop ULLONG_MAX and LLONG_MAX definitions 2019-05-07 09:55:40 -07:00
uio.h deadlock between mm_sem and tx assign in zfs_write() and page fault 2018-10-16 11:11:24 -07:00
user.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
vfs.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
vmem.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
vmsystm.h Linux 5.0 compat: Use totalhigh_pages() 2019-05-04 16:40:48 -07:00
vnode.h ZFS Reads may result in unneccesary calls to zil_commit 2019-03-22 13:09:11 -07:00
wait.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
zmod.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
zone.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00