Messages in this thread | | | Date | Sun, 27 Jun 1999 13:33:28 -0300 | From | Juanjo Ciarlante <> | Subject | Re: [patch] 2.3.8+ UP masq |
| |
On Sun, Jun 27, 1999 at 08:42:07AM -0400, Matthew Harrell wrote: > : > This patch gets rid of numerous undefined lock problems. Since the locks have > : > now been surrounded in ifdef SMP declarations it made sense to do the same with > : > all the locks that were used in the code. > : > : Wouldn't it be easier just to remove the #ifdef / #endif from around the lock > : declaration in the first place? On UP, they won't take up an space and the > : spin_lock() calls are optimized away. It would make the code a lot tidier. > > Oh, I don't deny that but it got recently introduced in 2.3.8 and I figured > there had to be a reason for it. It was pretty late at night when I did this so > never asked if there was a reasoning behind it - why were they suddenly put in? The change that triggered these probs is that spin_lock_irq(&lock) on UP mapped previously --> cli(); now --> local_irq_disable();spin_lock(&lock); +--> (void)(&lock); ie. "lock" must exist. To cope with this "existance" requirement, just remove the #ifdef's around masq_port_lock. And YES, in UP that cli() (or equiv.) MUST exist (masq_port variable IS changed from U-space [ip_masq_user module] and obviously from kernel [bh]).
Regards
-- -- Juanjo http://juanjox.kernelnotes.org/ ... because there IS an OS that CAN follow your power
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |