diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2018-05-24 09:30:15 -0700 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2018-05-24 09:30:15 -0700 |
| commit | 754451342fc5954061ede74b0a8485ec4a4c6eaa (patch) | |
| tree | 82daccba5779de492631c42e47a614bd9d4cddd2 /include/linux/xarray.h | |
| parent | bf232e460a3530adf17da7d7f1332347b73a3d08 (diff) | |
| parent | 771c577c23bac90597c685971d7297ea00f99d11 (diff) | |
| download | cachepc-linux-754451342fc5954061ede74b0a8485ec4a4c6eaa.tar.gz cachepc-linux-754451342fc5954061ede74b0a8485ec4a4c6eaa.zip | |
Merge tag 'v4.17-rc6' into next
Sync up with mainline to bring in Atmel controller changes for Caroline.
Diffstat (limited to 'include/linux/xarray.h')
| -rw-r--r-- | include/linux/xarray.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/xarray.h b/include/linux/xarray.h new file mode 100644 index 000000000000..2dfc8006fe64 --- /dev/null +++ b/include/linux/xarray.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +#ifndef _LINUX_XARRAY_H +#define _LINUX_XARRAY_H +/* + * eXtensible Arrays + * Copyright (c) 2017 Microsoft Corporation + * Author: Matthew Wilcox <mawilcox@microsoft.com> + */ + +#include <linux/spinlock.h> + +#define xa_trylock(xa) spin_trylock(&(xa)->xa_lock) +#define xa_lock(xa) spin_lock(&(xa)->xa_lock) +#define xa_unlock(xa) spin_unlock(&(xa)->xa_lock) +#define xa_lock_bh(xa) spin_lock_bh(&(xa)->xa_lock) +#define xa_unlock_bh(xa) spin_unlock_bh(&(xa)->xa_lock) +#define xa_lock_irq(xa) spin_lock_irq(&(xa)->xa_lock) +#define xa_unlock_irq(xa) spin_unlock_irq(&(xa)->xa_lock) +#define xa_lock_irqsave(xa, flags) \ + spin_lock_irqsave(&(xa)->xa_lock, flags) +#define xa_unlock_irqrestore(xa, flags) \ + spin_unlock_irqrestore(&(xa)->xa_lock, flags) + +#endif /* _LINUX_XARRAY_H */ |
