#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/smp_lock.h>
+#include <linux/delay.h>
#include "pci_hotplug.h"
#include "cpci_hotplug.h"
break;
while(controller->ops->query_enum()) {
rc = check_slots();
- if(rc > 0) {
+ if (rc > 0)
/* Give userspace a chance to handle extraction */
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ / 2);
- } else if(rc < 0) {
+ msleep(500);
+ else if (rc < 0) {
dbg("%s - error checking slots", __FUNCTION__);
thread_finished = 1;
break;
while(controller->ops->query_enum()) {
rc = check_slots();
- if(rc > 0) {
+ if(rc > 0)
/* Give userspace a chance to handle extraction */
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ / 2);
- } else if(rc < 0) {
+ msleep(500);
+ else if (rc < 0) {
dbg("%s - error checking slots", __FUNCTION__);
thread_finished = 1;
break;
}
}
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ / 10);
+ msleep(100);
}
dbg("poll thread signals exit");
up(&thread_exit);