diff options
Diffstat (limited to 'drivers/staging/lustre/lustre/libcfs/workitem.c')
-rw-r--r-- | drivers/staging/lustre/lustre/libcfs/workitem.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/staging/lustre/lustre/libcfs/workitem.c b/drivers/staging/lustre/lustre/libcfs/workitem.c index 48009b775..e1143a566 100644 --- a/drivers/staging/lustre/lustre/libcfs/workitem.c +++ b/drivers/staging/lustre/lustre/libcfs/workitem.c @@ -45,7 +45,7 @@ #define CFS_WS_NAME_LEN 16 -typedef struct cfs_wi_sched { +struct cfs_wi_sched { struct list_head ws_list; /* chain on global list */ /** serialised workitems */ spinlock_t ws_lock; @@ -73,7 +73,7 @@ typedef struct cfs_wi_sched { unsigned int ws_starting:1; /** scheduler name */ char ws_name[CFS_WS_NAME_LEN]; -} cfs_wi_sched_t; +}; static struct cfs_workitem_data { /** serialize */ @@ -87,19 +87,19 @@ static struct cfs_workitem_data { } cfs_wi_data; static inline void -cfs_wi_sched_lock(cfs_wi_sched_t *sched) +cfs_wi_sched_lock(struct cfs_wi_sched *sched) { spin_lock(&sched->ws_lock); } static inline void -cfs_wi_sched_unlock(cfs_wi_sched_t *sched) +cfs_wi_sched_unlock(struct cfs_wi_sched *sched) { spin_unlock(&sched->ws_lock); } static inline int -cfs_wi_sched_cansleep(cfs_wi_sched_t *sched) +cfs_wi_sched_cansleep(struct cfs_wi_sched *sched) { cfs_wi_sched_lock(sched); if (sched->ws_stopping) { @@ -115,7 +115,6 @@ cfs_wi_sched_cansleep(cfs_wi_sched_t *sched) return 1; } - /* XXX: * 0. it only works when called from wi->wi_action. * 1. when it returns no one shall try to schedule the workitem. @@ -217,11 +216,10 @@ cfs_wi_schedule(struct cfs_wi_sched *sched, cfs_workitem_t *wi) } EXPORT_SYMBOL(cfs_wi_schedule); - static int cfs_wi_scheduler (void *arg) { - struct cfs_wi_sched *sched = (cfs_wi_sched_t *)arg; + struct cfs_wi_sched *sched = (struct cfs_wi_sched *)arg; cfs_block_allsigs(); @@ -258,7 +256,6 @@ cfs_wi_scheduler (void *arg) wi->wi_running = 1; wi->wi_scheduled = 0; - cfs_wi_sched_unlock(sched); nloops++; @@ -302,7 +299,6 @@ cfs_wi_scheduler (void *arg) return 0; } - void cfs_wi_sched_destroy(struct cfs_wi_sched *sched) { |