| 1 |
/* -*- linux-c -*- |
| 2 |
* Syscalls Common Header File |
| 3 |
* Copyright (C) 2015 Red Hat Inc. |
| 4 |
* |
| 5 |
* This file is part of systemtap, and is free software. You can |
| 6 |
* redistribute it and/or modify it under the terms of the GNU General |
| 7 |
* Public License (GPL); either version 2, or (at your option) any |
| 8 |
* later version. |
| 9 |
*/ |
| 10 |
|
| 11 |
#ifndef _SYSCALLS_COMMON_H_ |
| 12 |
#define _SYSCALLS_COMMON_H_ |
| 13 |
|
| 14 |
typedef struct { |
| 15 |
long val; |
| 16 |
char *name; |
| 17 |
} _stp_val_array; |
| 18 |
|
| 19 |
/* Convenient macro to add defines to an array */ |
| 20 |
#define V(a) {a,#a} |
| 21 |
|
| 22 |
static void |
| 23 |
_stp_lookup_str2(const _stp_val_array * const array, long val, char *ptr, |
| 24 |
int len, int base); |
| 25 |
static inline void |
| 26 |
_stp_lookup_str(const _stp_val_array * const array, long val, char *ptr, |
| 27 |
int len); |
| 28 |
static void |
| 29 |
_stp_lookup_or_str2(const _stp_val_array * const array, long val, char *ptr, |
| 30 |
int len, int base); |
| 31 |
static inline void |
| 32 |
_stp_lookup_or_str(const _stp_val_array * const array, long val, char *ptr, |
| 33 |
int len); |
| 34 |
|
| 35 |
#endif /* _SYSCALLS_COMMON_H_ */ |