--- pristine/kernel/ksyms.c Tue Feb 23 18:45:45 1999 +++ linux-2.2.2-axp/kernel/ksyms.c Tue Feb 23 20:21:28 1999 @@ -322,8 +322,6 @@ EXPORT_SYMBOL(sprintf); EXPORT_SYMBOL(vsprintf); EXPORT_SYMBOL(kdevname); -EXPORT_SYMBOL(bdevname); -EXPORT_SYMBOL(cdevname); EXPORT_SYMBOL(simple_strtoul); EXPORT_SYMBOL(system_utsname); /* UTS data */ EXPORT_SYMBOL(uts_sem); /* UTS semaphore */ @@ -372,7 +370,6 @@ EXPORT_SYMBOL(event); EXPORT_SYMBOL(__down); EXPORT_SYMBOL(__down_interruptible); -EXPORT_SYMBOL(__down_trylock); EXPORT_SYMBOL(__up); EXPORT_SYMBOL(brw_page); --- pristine/kernel/sched.c Tue Feb 23 18:45:45 1999 +++ linux-2.2.2-axp/kernel/sched.c Tue Feb 23 20:16:35 1999 @@ -36,7 +36,6 @@ #include #include #include -#include #include @@ -464,17 +463,8 @@ unsigned long flags; spin_lock_irqsave(&timerlist_lock, flags); - if (timer->prev) - goto bug; internal_add_timer(timer); -out: spin_unlock_irqrestore(&timerlist_lock, flags); - return; - -bug: - printk("bug: kernel timer added twice at %p.\n", - __builtin_return_address(0)); - goto out; } static inline int detach_timer(struct timer_list *timer) @@ -873,28 +863,30 @@ struct task_struct *tsk = current; \ struct wait_queue wait = { tsk, NULL }; -#define DOWN_HEAD(task_state) \ - \ - \ - tsk->state = (task_state); \ - add_wait_queue(&sem->wait, &wait); \ - \ - /* \ - * Ok, we're set up. sem->count is known to be less than zero \ - * so we must wait. \ - * \ - * We can let go the lock for purposes of waiting. \ - * We re-acquire it after awaking so as to protect \ - * all semaphore operations. \ - * \ - * If "up()" is called before we call waking_non_zero() then \ - * we will catch it right away. If it is called later then \ - * we will have to go through a wakeup cycle to catch it. \ - * \ - * Multiple waiters contend for the semaphore lock to see \ - * who gets to gate through and who has to wait some more. \ - */ \ - for (;;) { +#define DOWN_HEAD(task_state) \ + \ + \ + tsk->state = (task_state); \ + add_wait_queue(&sem->wait, &wait); \ + \ + /* \ + * Ok, we're set up. sem->count is known to be less than zero \ + * so we must wait. \ + * \ + * We can let go the lock for purposes of waiting. \ + * We re-acquire it after awaking so as to protect \ + * all semaphore operations. \ + * \ + * If "up()" is called before we call waking_non_zero() then \ + * we will catch it right away. If it is called later then \ + * we will have to go through a wakeup cycle to catch it. \ + * \ + * Multiple waiters contend for the semaphore lock to see \ + * who gets to gate through and who has to wait some more. \ + */ \ + for (;;) { \ + if (waking_non_zero(sem, tsk)) /* are we waking up? */ \ + break; /* yes, exit loop */ #define DOWN_TAIL(task_state) \ tsk->state = (task_state); \ @@ -906,8 +898,6 @@ { DOWN_VAR DOWN_HEAD(TASK_UNINTERRUPTIBLE) - if (waking_non_zero(sem)) - break; schedule(); DOWN_TAIL(TASK_UNINTERRUPTIBLE) } @@ -917,23 +907,15 @@ DOWN_VAR int ret = 0; DOWN_HEAD(TASK_INTERRUPTIBLE) - - ret = waking_non_zero_interruptible(sem, tsk); - if (ret) + if (signal_pending(tsk)) { - if (ret == 1) - /* ret != 0 only if we get interrupted -arca */ - ret = 0; + ret = -EINTR; /* interrupted */ + atomic_inc(&sem->count); /* give up on down operation */ break; } schedule(); DOWN_TAIL(TASK_INTERRUPTIBLE) return ret; -} - -int __down_trylock(struct semaphore * sem) -{ - return waking_non_zero_trylock(sem); } #define SLEEP_ON_VAR \