change function names
This commit is contained in:
@@ -33,12 +33,12 @@
|
||||
#define LOOP_TIMEOUT 500
|
||||
|
||||
struct list_head timers;
|
||||
aal_spinlock_t timers_lock;
|
||||
ihk_spinlock_t timers_lock;
|
||||
|
||||
|
||||
void init_timers(void)
|
||||
{
|
||||
aal_mc_spinlock_init(&timers_lock);
|
||||
ihk_mc_spinlock_init(&timers_lock);
|
||||
INIT_LIST_HEAD(&timers);
|
||||
}
|
||||
|
||||
@@ -49,10 +49,10 @@ uint64_t schedule_timeout(uint64_t timeout)
|
||||
unsigned long irqflags;
|
||||
struct process *proc = cpu_local_var(current);
|
||||
|
||||
irqflags = aal_mc_spinlock_lock(&proc->spin_sleep_lock);
|
||||
irqflags = ihk_mc_spinlock_lock(&proc->spin_sleep_lock);
|
||||
dkprintf("schedule_timeout() spin sleep timeout: %lu\n", timeout);
|
||||
proc->spin_sleep = 1;
|
||||
aal_mc_spinlock_unlock(&proc->spin_sleep_lock, irqflags);
|
||||
ihk_mc_spinlock_unlock(&proc->spin_sleep_lock, irqflags);
|
||||
|
||||
/* Spin sleep.. */
|
||||
for (;;) {
|
||||
@@ -60,7 +60,7 @@ uint64_t schedule_timeout(uint64_t timeout)
|
||||
uint64_t t_e;
|
||||
int spin_over = 0;
|
||||
|
||||
irqflags = aal_mc_spinlock_lock(&proc->spin_sleep_lock);
|
||||
irqflags = ihk_mc_spinlock_lock(&proc->spin_sleep_lock);
|
||||
|
||||
/* Woken up by someone? */
|
||||
if (!proc->spin_sleep) {
|
||||
@@ -75,7 +75,7 @@ uint64_t schedule_timeout(uint64_t timeout)
|
||||
}
|
||||
}
|
||||
|
||||
aal_mc_spinlock_unlock(&proc->spin_sleep_lock, irqflags);
|
||||
ihk_mc_spinlock_unlock(&proc->spin_sleep_lock, irqflags);
|
||||
|
||||
t_s = rdtsc();
|
||||
|
||||
@@ -105,9 +105,9 @@ uint64_t schedule_timeout(uint64_t timeout)
|
||||
waitq_init_entry(&my_wait, cpu_local_var(current));
|
||||
|
||||
/* Add ourself to the timer queue */
|
||||
irqflags = aal_mc_spinlock_lock(&timers_lock);
|
||||
irqflags = ihk_mc_spinlock_lock(&timers_lock);
|
||||
list_add_tail(&my_timer.list, &timers);
|
||||
aal_mc_spinlock_unlock(&timers_lock, irqflags);
|
||||
ihk_mc_spinlock_unlock(&timers_lock, irqflags);
|
||||
|
||||
dkprintf("schedule_timeout() sleep timeout: %lu\n", my_timer.timeout);
|
||||
|
||||
@@ -116,14 +116,14 @@ uint64_t schedule_timeout(uint64_t timeout)
|
||||
schedule();
|
||||
waitq_finish_wait(&my_timer.processes, &my_wait);
|
||||
|
||||
irqflags = aal_mc_spinlock_lock(&timers_lock);
|
||||
irqflags = ihk_mc_spinlock_lock(&timers_lock);
|
||||
|
||||
/* Waken up by someone else then timeout? */
|
||||
if (my_timer.timeout) {
|
||||
list_del(&my_timer.list);
|
||||
}
|
||||
|
||||
aal_mc_spinlock_unlock(&timers_lock, irqflags);
|
||||
ihk_mc_spinlock_unlock(&timers_lock, irqflags);
|
||||
|
||||
dkprintf("schedule_timeout() woken up, timeout: %lu\n",
|
||||
my_timer.timeout);
|
||||
@@ -149,7 +149,7 @@ void wake_timers_loop(void)
|
||||
|
||||
/* Iterate and decrease timeout for all timers,
|
||||
* wake up if timeout reaches zero. */
|
||||
irqflags = aal_mc_spinlock_lock(&timers_lock);
|
||||
irqflags = ihk_mc_spinlock_lock(&timers_lock);
|
||||
|
||||
list_for_each_entry_safe(timer, timer_next, &timers, list) {
|
||||
|
||||
@@ -165,6 +165,6 @@ void wake_timers_loop(void)
|
||||
}
|
||||
}
|
||||
|
||||
aal_mc_spinlock_unlock(&timers_lock, irqflags);
|
||||
ihk_mc_spinlock_unlock(&timers_lock, irqflags);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user