Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-9859 libcfs: simplify linux-prim.c
[fs/lustre-release.git]
/
libcfs
/
include
/
libcfs
/
libcfs_workitem.h
diff --git
a/libcfs/include/libcfs/libcfs_workitem.h
b/libcfs/include/libcfs/libcfs_workitem.h
index
a800a9b
..
7050472
100644
(file)
--- a/
libcfs/include/libcfs/libcfs_workitem.h
+++ b/
libcfs/include/libcfs/libcfs_workitem.h
@@
-15,11
+15,7
@@
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
*
* GPL HEADER END
*/
*
* GPL HEADER END
*/
@@
-73,33
+69,31
@@
int cfs_wi_sched_create(char *name, struct cfs_cpt_table *cptab, int cpt,
struct cfs_workitem;
typedef int (*cfs_wi_action_t) (struct cfs_workitem *);
struct cfs_workitem;
typedef int (*cfs_wi_action_t) (struct cfs_workitem *);
-typedef struct cfs_workitem {
+
+struct cfs_workitem {
/** chain on runq or rerunq */
struct list_head wi_list;
/** working function */
cfs_wi_action_t wi_action;
/** chain on runq or rerunq */
struct list_head wi_list;
/** working function */
cfs_wi_action_t wi_action;
- /** arg for working function */
- void *wi_data;
/** in running */
unsigned short wi_running:1;
/** scheduled */
unsigned short wi_scheduled:1;
/** in running */
unsigned short wi_running:1;
/** scheduled */
unsigned short wi_scheduled:1;
-}
cfs_workitem_t
;
+};
static inline void
static inline void
-cfs_wi_init(
cfs_workitem_t *wi, void *data
, cfs_wi_action_t action)
+cfs_wi_init(
struct cfs_workitem *wi
, cfs_wi_action_t action)
{
INIT_LIST_HEAD(&wi->wi_list);
wi->wi_running = 0;
wi->wi_scheduled = 0;
{
INIT_LIST_HEAD(&wi->wi_list);
wi->wi_running = 0;
wi->wi_scheduled = 0;
- wi->wi_data = data;
wi->wi_action = action;
}
wi->wi_action = action;
}
-void cfs_wi_schedule(struct cfs_wi_sched *sched,
cfs_workitem_t
*wi);
-int cfs_wi_deschedule(struct cfs_wi_sched *sched,
cfs_workitem_t
*wi);
-void cfs_wi_exit(struct cfs_wi_sched *sched,
cfs_workitem_t
*wi);
+void cfs_wi_schedule(struct cfs_wi_sched *sched,
struct cfs_workitem
*wi);
+int cfs_wi_deschedule(struct cfs_wi_sched *sched,
struct cfs_workitem
*wi);
+void cfs_wi_exit(struct cfs_wi_sched *sched,
struct cfs_workitem
*wi);
int cfs_wi_startup(void);
void cfs_wi_shutdown(void);
int cfs_wi_startup(void);
void cfs_wi_shutdown(void);