mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 22:51:37 +00:00
tools lib traceevent: Rename data2host*() APIs
In order to make libtraceevent into a proper library, variables, data structures and functions require a unique prefix to prevent name space conflicts. That prefix will be "tep_". This renames data2host*() APIs Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> Cc: linux-trace-devel@vger.kernel.org Link: http://lkml.kernel.org/r/20180919185724.751088939@goodmis.org Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
785be0c98d
commit
1affd34f19
3 changed files with 14 additions and 14 deletions
|
@ -496,7 +496,7 @@ static inline void tep_set_flag(struct tep_handle *pevent, int flag)
|
|||
}
|
||||
|
||||
static inline unsigned short
|
||||
__data2host2(struct tep_handle *pevent, unsigned short data)
|
||||
__tep_data2host2(struct tep_handle *pevent, unsigned short data)
|
||||
{
|
||||
unsigned short swap;
|
||||
|
||||
|
@ -510,7 +510,7 @@ __data2host2(struct tep_handle *pevent, unsigned short data)
|
|||
}
|
||||
|
||||
static inline unsigned int
|
||||
__data2host4(struct tep_handle *pevent, unsigned int data)
|
||||
__tep_data2host4(struct tep_handle *pevent, unsigned int data)
|
||||
{
|
||||
unsigned int swap;
|
||||
|
||||
|
@ -526,7 +526,7 @@ __data2host4(struct tep_handle *pevent, unsigned int data)
|
|||
}
|
||||
|
||||
static inline unsigned long long
|
||||
__data2host8(struct tep_handle *pevent, unsigned long long data)
|
||||
__tep_data2host8(struct tep_handle *pevent, unsigned long long data)
|
||||
{
|
||||
unsigned long long swap;
|
||||
|
||||
|
@ -545,14 +545,14 @@ __data2host8(struct tep_handle *pevent, unsigned long long data)
|
|||
return swap;
|
||||
}
|
||||
|
||||
#define data2host2(pevent, ptr) __data2host2(pevent, *(unsigned short *)(ptr))
|
||||
#define data2host4(pevent, ptr) __data2host4(pevent, *(unsigned int *)(ptr))
|
||||
#define data2host8(pevent, ptr) \
|
||||
#define tep_data2host2(pevent, ptr) __tep_data2host2(pevent, *(unsigned short *)(ptr))
|
||||
#define tep_data2host4(pevent, ptr) __tep_data2host4(pevent, *(unsigned int *)(ptr))
|
||||
#define tep_data2host8(pevent, ptr) \
|
||||
({ \
|
||||
unsigned long long __val; \
|
||||
\
|
||||
memcpy(&__val, (ptr), sizeof(unsigned long long)); \
|
||||
__data2host8(pevent, __val); \
|
||||
__tep_data2host8(pevent, __val); \
|
||||
})
|
||||
|
||||
static inline int tep_host_bigendian(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue