patch-2.4.3 linux/include/asm-sparc/semaphore.h
Next file: linux/include/asm-sparc/smp.h
Previous file: linux/include/asm-sparc/atomic.h
Back to the patch index
Back to the overall index
- Lines: 124
- Date:
Sun Mar 25 18:14:21 2001
- Orig file:
v2.4.2/linux/include/asm-sparc/semaphore.h
- Orig date:
Mon Jan 1 10:37:41 2001
diff -u --recursive --new-file v2.4.2/linux/include/asm-sparc/semaphore.h linux/include/asm-sparc/semaphore.h
@@ -64,14 +64,14 @@
static inline void down(struct semaphore * sem)
{
- register atomic_t *ptr asm("g1");
+ register volatile int *ptr asm("g1");
register int increment asm("g2");
#if WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic);
#endif
- ptr = (atomic_t *) __atomic_fool_gcc(sem);
+ ptr = &(sem->count.counter);
increment = 1;
__asm__ __volatile__("
@@ -99,14 +99,14 @@
static inline int down_interruptible(struct semaphore * sem)
{
- register atomic_t *ptr asm("g1");
+ register volatile int *ptr asm("g1");
register int increment asm("g2");
#if WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic);
#endif
- ptr = (atomic_t *) __atomic_fool_gcc(sem);
+ ptr = &(sem->count.counter);
increment = 1;
__asm__ __volatile__("
@@ -137,14 +137,14 @@
static inline int down_trylock(struct semaphore * sem)
{
- register atomic_t *ptr asm("g1");
+ register volatile int *ptr asm("g1");
register int increment asm("g2");
#if WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic);
#endif
- ptr = (atomic_t *) __atomic_fool_gcc(sem);
+ ptr = &(sem->count.counter);
increment = 1;
__asm__ __volatile__("
@@ -175,14 +175,14 @@
static inline void up(struct semaphore * sem)
{
- register atomic_t *ptr asm("g1");
+ register volatile int *ptr asm("g1");
register int increment asm("g2");
#if WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic);
#endif
- ptr = (atomic_t *) __atomic_fool_gcc(sem);
+ ptr = &(sem->count.counter);
increment = 1;
__asm__ __volatile__("
@@ -284,13 +284,13 @@
static inline void down_read(struct rw_semaphore *sem)
{
- register atomic_t *ptr asm("g1");
+ register volatile int *ptr asm("g1");
#if WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic);
#endif
- ptr = (atomic_t *) __atomic_fool_gcc(sem);
+ ptr = &sem->count;
__asm__ __volatile__("
mov %%o7, %%g4
@@ -310,13 +310,13 @@
static inline void down_write(struct rw_semaphore *sem)
{
- register atomic_t *ptr asm("g1");
+ register volatile int *ptr asm("g1");
#if WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic);
#endif
- ptr = (atomic_t *) __atomic_fool_gcc(sem);
+ ptr = &sem->count;
__asm__ __volatile__("
mov %%o7, %%g4
@@ -344,9 +344,9 @@
*/
static inline void __up_read(struct rw_semaphore *sem)
{
- register atomic_t *ptr asm("g1");
+ register volatile int *ptr asm("g1");
- ptr = (atomic_t *) __atomic_fool_gcc(sem);
+ ptr = &sem->count;
__asm__ __volatile__("
mov %%o7, %%g4
@@ -362,9 +362,9 @@
*/
static inline void __up_write(struct rw_semaphore *sem)
{
- register atomic_t *ptr asm("g1");
+ register volatile int *ptr asm("g1");
- ptr = (atomic_t *) __atomic_fool_gcc(sem);
+ ptr = &sem->count;
__asm__ __volatile__("
mov %%o7, %%g4
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)