Thread (48 messages) 48 messages, 6 authors, 2007-05-30

Re: [patch 4/7] ps3: Storage Driver Probing

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2007-05-25 22:47:49
Also in: lkml

On Fri, 2007-05-25 at 18:18 +0200, Arnd Bergmann wrote:
quoted
+static u64 ps3stor_wait_for_completion(u64 devid, u64 tag,
+                                    unsigned int timeout)
+{
+     unsigned int retries = 0;
+     u64 res = -1, status;
+
+     for (retries = 0; retries < timeout; retries++) {
+             res =
lv1_storage_check_async_status(NOTIFICATION_DEVID, tag,
quoted
+                                                  &status);
+             if (!res)
+                     break;
+             set_current_state(TASK_INTERRUPTIBLE);
+             schedule_timeout(1);
+     }
Any reason not to use msleep(1) instead of the schedule_timeout? 
Both look equally ugly though... do you really have to poll ?

Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help