Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108307
b: refs/heads/master
c: cdeb380
h: refs/heads/master
i:
  108305: f57fe87
  108303: 0f9daae
v: v3
  • Loading branch information
Eric Sandeen authored and Lachlan McIlroy committed Aug 13, 2008
1 parent 9999b06 commit a398c2f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 69 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: 322ff6b8cd54feb1c4c0426630f3642ab1dd2176
refs/heads/master: cdeb380aa2ca3b8f8ba3736f2469f5818eadb9aa
68 changes: 0 additions & 68 deletions trunk/fs/xfs/xfs_arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,6 @@
((__u8*)(pointer))[1] = (((value) ) & 0xff); \
}

/* define generic INT_ macros */

#define INT_GET(reference,arch) \
(((arch) == ARCH_NOCONVERT) \
? \
(reference) \
: \
INT_SWAP((reference),(reference)) \
)

/* does not return a value */
#define INT_SET(reference,arch,valueref) \
(__builtin_constant_p(valueref) ? \
Expand All @@ -112,64 +102,6 @@
) \
)

/* does not return a value */
#define INT_MOD_EXPR(reference,arch,code) \
(((arch) == ARCH_NOCONVERT) \
? \
(void)((reference) code) \
: \
(void)( \
(reference) = INT_GET((reference),arch) , \
((reference) code), \
INT_SET(reference, arch, reference) \
) \
)

/* does not return a value */
#define INT_MOD(reference,arch,delta) \
(void)( \
INT_MOD_EXPR(reference,arch,+=(delta)) \
)

/*
* INT_COPY - copy a value between two locations with the
* _same architecture_ but _potentially different sizes_
*
* if the types of the two parameters are equal or they are
* in native architecture, a simple copy is done
*
* otherwise, architecture conversions are done
*
*/

/* does not return a value */
#define INT_COPY(dst,src,arch) \
( \
((sizeof(dst) == sizeof(src)) || ((arch) == ARCH_NOCONVERT)) \
? \
(void)((dst) = (src)) \
: \
INT_SET(dst, arch, INT_GET(src, arch)) \
)

/*
* INT_XLATE - copy a value in either direction between two locations
* with different architectures
*
* dir < 0 - copy from memory to buffer (native to arch)
* dir > 0 - copy from buffer to memory (arch to native)
*/

/* does not return a value */
#define INT_XLATE(buf,mem,dir,arch) {\
ASSERT(dir); \
if (dir>0) { \
(mem)=INT_GET(buf, arch); \
} else { \
INT_SET(buf, arch, mem); \
} \
}

/*
* In directories inode numbers are stored as unaligned arrays of unsigned
* 8bit integers on disk.
Expand Down

0 comments on commit a398c2f

Please sign in to comment.