spinlock

wu_yb (wu_yb@263.net)
Sat, 27 Nov 1999 17:13:56 +0800


I'm now reading kernel source, but confused at spinlock:

typedef struct {
volatile unsigned int lock ;
} spinlock ;

why the spinlock structure should be converted to dummy_lock_t
in inline asm code:
typedef struct { unsigned long a[100] ; } dummy_lock_t ;
#define dummy_lock(lock) (*(dummy_lock_t*)(lock))

I see many conversion like this in kernel source, can anyone help me!!!

-
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/