Ken Cox | 9d9baad | 2014-03-04 07:58:05 -0600 | [diff] [blame] | 1 | /* periodic_work.h |
| 2 | * |
Benjamin Romer | f6d0c1e | 2014-04-23 14:58:34 -0400 | [diff] [blame] | 3 | * Copyright (C) 2010 - 2013 UNISYS CORPORATION |
Ken Cox | 9d9baad | 2014-03-04 07:58:05 -0600 | [diff] [blame] | 4 | * All rights reserved. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 2 of the License, or (at |
| 9 | * your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, but |
| 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or |
| 14 | * NON INFRINGEMENT. See the GNU General Public License for more |
| 15 | * details. |
| 16 | */ |
| 17 | |
| 18 | #ifndef __PERIODIC_WORK_H__ |
| 19 | #define __PERIODIC_WORK_H__ |
| 20 | |
Erik Arfvidson | c0a1464 | 2015-05-05 18:37:06 -0400 | [diff] [blame] | 21 | #include <linux/seq_file.h> |
| 22 | #include <linux/slab.h> |
Ken Cox | 9d9baad | 2014-03-04 07:58:05 -0600 | [diff] [blame] | 23 | |
Ken Cox | 9d9baad | 2014-03-04 07:58:05 -0600 | [diff] [blame] | 24 | /* PERIODIC_WORK an opaque structure to users. |
| 25 | * Fields are declared only in the implementation .c files. |
| 26 | */ |
Benjamin Romer | 2c5653b | 2014-09-30 12:07:46 -0400 | [diff] [blame] | 27 | struct periodic_work; |
Ken Cox | 9d9baad | 2014-03-04 07:58:05 -0600 | [diff] [blame] | 28 | |
David Kershner | 0435d14 | 2015-10-12 15:19:43 -0400 | [diff] [blame] | 29 | struct periodic_work * |
| 30 | visor_periodic_work_create(ulong jiffy_interval, |
| 31 | struct workqueue_struct *workqueue, |
| 32 | void (*workfunc)(void *), |
| 33 | void *workfuncarg, |
| 34 | const char *devnam); |
Benjamin Romer | 2c5653b | 2014-09-30 12:07:46 -0400 | [diff] [blame] | 35 | void visor_periodic_work_destroy(struct periodic_work *pw); |
Prarit Bhargava | 779d075 | 2015-05-05 18:37:01 -0400 | [diff] [blame] | 36 | bool visor_periodic_work_nextperiod(struct periodic_work *pw); |
| 37 | bool visor_periodic_work_start(struct periodic_work *pw); |
| 38 | bool visor_periodic_work_stop(struct periodic_work *pw); |
Ken Cox | 9d9baad | 2014-03-04 07:58:05 -0600 | [diff] [blame] | 39 | |
| 40 | #endif |