diff options
author | Nathan Scott <nathans@sgi.com> | 2006-06-09 14:59:13 +1000 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2006-06-09 14:59:13 +1000 |
commit | 59c1b082f5fff8269565039600a2ef18d48649b5 (patch) | |
tree | 28093cd9a1b61267d76edef992a91e7cecf40b5e /fs/xfs/linux-2.6/xfs_linux.h | |
parent | e109007461cddfc80a908f0b015f4eeb485e1d85 (diff) |
[XFS] Make the pflags test/set wrappers more legible for us mere humans.
SGI-PV: 953338
SGI-Modid: xfs-linux-melb:xfs-kern:26099a
Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_linux.h')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_linux.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/fs/xfs/linux-2.6/xfs_linux.h b/fs/xfs/linux-2.6/xfs_linux.h index 7d15cb91027..e9285395411 100644 --- a/fs/xfs/linux-2.6/xfs_linux.h +++ b/fs/xfs/linux-2.6/xfs_linux.h @@ -136,13 +136,19 @@ BUFFER_FNS(PrivateStart, unwritten); #define xfs_rotorstep xfs_params.rotorstep.val #define xfs_inherit_nodefrag xfs_params.inherit_nodfrg.val -#ifndef raw_smp_processor_id -#define raw_smp_processor_id() smp_processor_id() -#endif -#define current_cpu() raw_smp_processor_id() +#define current_cpu() (raw_smp_processor_id()) #define current_pid() (current->pid) #define current_fsuid(cred) (current->fsuid) #define current_fsgid(cred) (current->fsgid) +#define current_set_flags(f) (current->flags |= (f)) +#define current_test_flags(f) (current->flags & (f)) +#define current_clear_flags(f) (current->flags & ~(f)) +#define current_set_flags_nested(sp, f) \ + (*(sp) = current->flags, current->flags |= (f)) +#define current_clear_flags_nested(sp, f) \ + (*(sp) = current->flags, current->flags &= ~(f)) +#define current_restore_flags_nested(sp, f) \ + (current->flags = ((current->flags & ~(f)) | (*(sp) & (f)))) #define NBPP PAGE_SIZE #define DPPSHFT (PAGE_SHIFT - 9) |