Commit ac6cd437 authored by Matthew Wilcox's avatar Matthew Wilcox Committed by Linus Torvalds

[PATCH] Fix PA-RISC debuglocks

_dbg_write_trylock() needs to return an int.
Also update Thibaut's email address
Signed-off-by: default avatarMatthew Wilcox <willy@parisc-linux.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ce8ed09b
/* /*
* Debugging versions of SMP locking primitives. * Debugging versions of SMP locking primitives.
* *
* Copyright (C) 2004 Thibaut VARENE <varenet@esiee.fr> * Copyright (C) 2004 Thibaut VARENE <varenet@parisc-linux.org>
* *
* Some code stollen from alpha & sparc64 ;) * Some code stollen from alpha & sparc64 ;)
* *
...@@ -239,8 +239,6 @@ int _dbg_write_trylock(rwlock_t *rw, const char *bfile, int bline) ...@@ -239,8 +239,6 @@ int _dbg_write_trylock(rwlock_t *rw, const char *bfile, int bline)
if(rw->counter != 0) { if(rw->counter != 0) {
/* this basically never happens */ /* this basically never happens */
_raw_spin_unlock(&rw->lock); _raw_spin_unlock(&rw->lock);
return 0; return 0;
} }
...@@ -250,6 +248,7 @@ int _dbg_write_trylock(rwlock_t *rw, const char *bfile, int bline) ...@@ -250,6 +248,7 @@ int _dbg_write_trylock(rwlock_t *rw, const char *bfile, int bline)
pdc_printf("%s:%d: try write_lock grabbed in %s at %p(%d)\n", pdc_printf("%s:%d: try write_lock grabbed in %s at %p(%d)\n",
bfile, bline, current->comm, inline_pc, cpu); bfile, bline, current->comm, inline_pc, cpu);
#endif #endif
return 1;
} }
void _dbg_read_lock(rwlock_t * rw, const char *bfile, int bline) void _dbg_read_lock(rwlock_t * rw, const char *bfile, int bline)
......
...@@ -226,7 +226,7 @@ static __inline__ void _raw_write_unlock(rwlock_t *rw) ...@@ -226,7 +226,7 @@ static __inline__ void _raw_write_unlock(rwlock_t *rw)
} }
#ifdef CONFIG_DEBUG_RWLOCK #ifdef CONFIG_DEBUG_RWLOCK
extern void _dbg_write_trylock(rwlock_t * rw, const char *bfile, int bline); extern int _dbg_write_trylock(rwlock_t * rw, const char *bfile, int bline);
#define _raw_write_trylock(rw) _dbg_write_trylock(rw, __FILE__, __LINE__) #define _raw_write_trylock(rw) _dbg_write_trylock(rw, __FILE__, __LINE__)
#else #else
static __inline__ int _raw_write_trylock(rwlock_t *rw) static __inline__ int _raw_write_trylock(rwlock_t *rw)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment