#include <linux/slab.h>
#include <linux/net.h>
#include <linux/completion.h>
-
+#include <linux/delay.h>
#include <linux/skbuff.h>
#include <linux/in.h>
#include <linux/igmp.h> /* for ip_mc_join_group */
if (stop_master_sync)
break;
- __set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ);
+ ssleep(1);
}
/* clean up the sync_buff queue */
if (stop_backup_sync)
break;
- __set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ);
+ ssleep(1);
}
/* release the sending multicast socket */
if ((pid = kernel_thread(sync_thread, startup, 0)) < 0) {
IP_VS_ERR("could not create sync_thread due to %d... "
"retrying.\n", pid);
- current->state = TASK_UNINTERRUPTIBLE;
- schedule_timeout(HZ);
+ ssleep(1);
goto repeat;
}
if ((pid = kernel_thread(fork_sync_thread, &startup, 0)) < 0) {
IP_VS_ERR("could not create fork_sync_thread due to %d... "
"retrying.\n", pid);
- current->state = TASK_UNINTERRUPTIBLE;
- schedule_timeout(HZ);
+ ssleep(1);
goto repeat;
}