diff options
author | hunt <hunt> | 2005-06-18 07:24:42 +0000 |
---|---|---|
committer | hunt <hunt> | 2005-06-18 07:24:42 +0000 |
commit | e5d2abb56ca57a613e4ef9398a6499190b2265be (patch) | |
tree | 083465047d73bc498f2278d2eb3dc8514b455ad3 /runtime/string.h | |
parent | ef0e92b0335077884edd5ac9997a203bec1839b0 (diff) | |
download | systemtap-steved-e5d2abb56ca57a613e4ef9398a6499190b2265be.tar.gz systemtap-steved-e5d2abb56ca57a613e4ef9398a6499190b2265be.tar.xz systemtap-steved-e5d2abb56ca57a613e4ef9398a6499190b2265be.zip |
2005-06-18 Martin Hunt <hunt@redhat.com>
* counter.c: New file. Counter aggregations.
* stat.c: New file. Stat aggregations.
* stat.h: Header file for stats.
* map-int.c: New file. Support for int64 values.
* map-stat.c: New file. Support for stat values.
* map-str.c: New file. Support for string values.
* map-values.c: Now just includes the necessary map-*.c files.
* stat-common.c: New file. Stats stuff common to Stats and maps
containing stats.
* Doxyfile: Bumped version to 0.6.
* README: Renamed README.doc and reorganized.
Diffstat (limited to 'runtime/string.h')
-rw-r--r-- | runtime/string.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/runtime/string.h b/runtime/string.h new file mode 100644 index 00000000..e7168e00 --- /dev/null +++ b/runtime/string.h @@ -0,0 +1,30 @@ +#ifndef _STRING_H_ /* -*- linux-c -*- */ +#define _STRING_H_ + +/** Maximum string size allowed in Strings */ +#ifndef STP_STRING_SIZE +#define STP_STRING_SIZE 2048 +#endif + +/** Maximum number of strings a probe uses. */ +#ifndef STP_NUM_STRINGS +#define STP_NUM_STRINGS 0 +#endif + +struct string { + int len; + char buf[STP_STRING_SIZE]; +}; + +static struct string _stp_string[STP_NUM_STRINGS][NR_CPUS]; + +typedef struct string *String; + +/* set up a special stdout string */ +static struct string __stp_stdout = {0}; +String _stp_stdout = &__stp_stdout; + +void _stp_vsprintf (String str, const char *fmt, va_list args); +void _stp_string_cat_char (String str1, const char c); + +#endif /* _STRING_H_ */ |