diff options
author | Bill Pemberton <wfp5p@virginia.edu> | 2009-07-28 13:46:24 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:01:52 -0700 |
commit | aedb444a577184f7e113e1461fccc0ef10ffde55 (patch) | |
tree | 9ed5a2cf035fd81b59ce805bb649c9eac70d0451 /drivers/staging/hv/osd.c | |
parent | b578852955765bfbe12bd31ac1e7888a3deaff40 (diff) | |
download | op-kernel-dev-aedb444a577184f7e113e1461fccc0ef10ffde55.zip op-kernel-dev-aedb444a577184f7e113e1461fccc0ef10ffde55.tar.gz |
Staging: hv: remove WAITEVENT typedef
Remove the WAITEVENT typedef and also replace HANDLE types that use
the WaitEvent calls with struct osd_waitevent.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv/osd.c')
-rw-r--r-- | drivers/staging/hv/osd.c | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/drivers/staging/hv/osd.c b/drivers/staging/hv/osd.c index 4cee746..50a2ca7 100644 --- a/drivers/staging/hv/osd.c +++ b/drivers/staging/hv/osd.c @@ -55,12 +55,6 @@ typedef struct _TIMER { void* context; }TIMER; - -typedef struct _WAITEVENT { - int condition; - wait_queue_head_t event; -} WAITEVENT; - typedef struct _WORKITEM { struct work_struct work; PFN_WORKITEM_CALLBACK callback; @@ -220,9 +214,9 @@ void TimerClose(HANDLE hTimer) kfree(t); } -HANDLE WaitEventCreate(void) +struct osd_waitevent *WaitEventCreate(void) { - WAITEVENT* wait = kmalloc(sizeof(WAITEVENT), GFP_KERNEL); + struct osd_waitevent *wait = kmalloc(sizeof(struct osd_waitevent), GFP_KERNEL); if (!wait) { return NULL; @@ -233,38 +227,34 @@ HANDLE WaitEventCreate(void) return wait; } -void WaitEventClose(HANDLE hWait) +void WaitEventClose(struct osd_waitevent *waitEvent) { - WAITEVENT* waitEvent = (WAITEVENT* )hWait; kfree(waitEvent); } -void WaitEventSet(HANDLE hWait) +void WaitEventSet(struct osd_waitevent *waitEvent) { - WAITEVENT* waitEvent = (WAITEVENT* )hWait; waitEvent->condition = 1; wake_up_interruptible(&waitEvent->event); } -int WaitEventWait(HANDLE hWait) +int WaitEventWait(struct osd_waitevent *waitEvent) { int ret=0; - WAITEVENT* waitEvent = (WAITEVENT* )hWait; - ret= wait_event_interruptible(waitEvent->event, - waitEvent->condition); + ret = wait_event_interruptible(waitEvent->event, + waitEvent->condition); waitEvent->condition = 0; return ret; } -int WaitEventWaitEx(HANDLE hWait, u32 TimeoutInMs) +int WaitEventWaitEx(struct osd_waitevent *waitEvent, u32 TimeoutInMs) { int ret=0; - WAITEVENT* waitEvent = (WAITEVENT* )hWait; - ret= wait_event_interruptible_timeout(waitEvent->event, - waitEvent->condition, - msecs_to_jiffies(TimeoutInMs)); + ret = wait_event_interruptible_timeout(waitEvent->event, + waitEvent->condition, + msecs_to_jiffies(TimeoutInMs)); waitEvent->condition = 0; return ret; } |