summaryrefslogtreecommitdiffstats
path: root/include/asm-sparc/semaphore.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2001-04-05 04:55:58 +0000
committerRalf Baechle <ralf@linux-mips.org>2001-04-05 04:55:58 +0000
commit74a9f2e1b4d3ab45a9f72cb5b556c9f521524ab3 (patch)
tree7c4cdb103ab1b388c9852a88bd6fb1e73eba0b5c /include/asm-sparc/semaphore.h
parentee6374c8b0d333c08061c6a97bc77090d7461225 (diff)
Merge with Linux 2.4.3.
Note that mingetty does no longer work with serial console, you have to switch to another getty like getty_ps. This commit also includes a fix for a setitimer bug which did prevent getty_ps from working on older kernels.
Diffstat (limited to 'include/asm-sparc/semaphore.h')
-rw-r--r--include/asm-sparc/semaphore.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/include/asm-sparc/semaphore.h b/include/asm-sparc/semaphore.h
index cee9745b6..5a5fc7c33 100644
--- a/include/asm-sparc/semaphore.h
+++ b/include/asm-sparc/semaphore.h
@@ -64,14 +64,14 @@ extern void __up(struct semaphore * sem);
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 void down(struct semaphore * sem)
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_interruptible(struct semaphore * sem)
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 int down_trylock(struct semaphore * sem)
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 @@ extern void ___up_write(/* Special calling convention */ void);
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_read(struct rw_semaphore *sem)
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 down_write(struct rw_semaphore *sem)
*/
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_read(struct rw_semaphore *sem)
*/
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