Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176240
b: refs/heads/master
c: 4e7b8a6
h: refs/heads/master
v: v3
  • Loading branch information
David Rientjes authored and Linus Torvalds committed Dec 15, 2009
1 parent 8705813 commit 796b433
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6d9c285a632b39ab83c6ae14cbff0e606d4042ee
refs/heads/master: 4e7b8a6cef64a4c1f1194f9926f794c2b75ebdd7
15 changes: 8 additions & 7 deletions trunk/include/linux/nodemask.h
Original file line number Diff line number Diff line change
Expand Up @@ -481,14 +481,14 @@ static inline int num_node_state(enum node_states state)

/*
* For nodemask scrach area.(See CPUMASK_ALLOC() in cpumask.h)
* NODEMASK_ALLOC(x, m) allocates an object of type 'x' with the name 'm'.
*/

#if NODES_SHIFT > 8 /* nodemask_t > 64 bytes */
#define NODEMASK_ALLOC(x, m) struct x *m = kmalloc(sizeof(*m), GFP_KERNEL)
#define NODEMASK_FREE(m) kfree(m)
#define NODEMASK_ALLOC(x, m) x *m = kmalloc(sizeof(*m), GFP_KERNEL)
#define NODEMASK_FREE(m) kfree(m)
#else
#define NODEMASK_ALLOC(x, m) struct x _m, *m = &_m
#define NODEMASK_FREE(m)
#define NODEMASK_ALLOC(x, m) x _m, *m = &_m
#define NODEMASK_FREE(m) do {} while (0)
#endif

/* A example struture for using NODEMASK_ALLOC, used in mempolicy. */
Expand All @@ -497,8 +497,9 @@ struct nodemask_scratch {
nodemask_t mask2;
};

#define NODEMASK_SCRATCH(x) NODEMASK_ALLOC(nodemask_scratch, x)
#define NODEMASK_SCRATCH_FREE(x) NODEMASK_FREE(x)
#define NODEMASK_SCRATCH(x) \
NODEMASK_ALLOC(struct nodemask_scratch, x)
#define NODEMASK_SCRATCH_FREE(x) NODEMASK_FREE(x)


#endif /* __LINUX_NODEMASK_H */

0 comments on commit 796b433

Please sign in to comment.