lkml.org 
[lkml]   [2005]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 1/8] mutex subsystem, XFS namespace collision fixes
On Wed, Dec 21, 2005 at 11:36:56PM +0100, Ingo Molnar wrote:
> Fixup the XFS code to avoid name clashing with the mutex code by
> introducing xfs_mutex_ functions.
...
> --- linux.orig/fs/xfs/linux-2.6/mutex.h
> +++ linux/fs/xfs/linux-2.6/mutex.h
> @@ -30,10 +30,10 @@
> #define MUTEX_DEFAULT 0x0
> typedef struct semaphore mutex_t;
>
> -#define mutex_init(lock, type, name) sema_init(lock, 1)
> -#define mutex_destroy(lock) sema_init(lock, -99)
> -#define mutex_lock(lock, num) down(lock)
> -#define mutex_trylock(lock) (down_trylock(lock) ? 0 : 1)
> -#define mutex_unlock(lock) up(lock)
> +#define xfs_mutex_init(lock, type, name) arch_sema_init(lock, 1)
> +#define xfs_mutex_destroy(lock) arch_sema_init(lock, -99)
> +#define xfs_mutex_lock(lock, num) arch_down(lock)
> +#define xfs_mutex_trylock(lock) (arch_down_trylock(lock) ? 0 : 1)
> +#define xfs_mutex_unlock(lock) arch_up(lock)

This arch_ prefix seems to be a leftover from the migration helper patches?

Johannes
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-12-22 02:56    [W:1.478 / U:1.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site