* modified is included with the above copyright notice.
*/
+#include <stdlib.h>
+
ssize_t patient_write(int fd, const void *buf, size_t count);
ssize_t patient_send(int fd, const void *buf, size_t count, int flags);
#undef TRACEPOINT_EVENT_INSTANCE
#define TRACEPOINT_EVENT_INSTANCE(_provider, _template, _name, _args) \
- _DEFINE_TRACEPOINT(provider, name)
+ _DEFINE_TRACEPOINT(_provider, _name)
#undef TRACEPOINT_EVENT
#define TRACEPOINT_EVENT(_provider, _name, _args, _fields) \
- TRACEPOINT_EVENT_INSTANCE(_provider, _name, _name, _TP_PARAMS(_args))
+ TRACEPOINT_EVENT_CLASS(_provider, _name, _TP_PARAMS(_args), \
+ _TP_PARAMS(_fields)) \
+ TRACEPOINT_EVENT_INSTANCE(_provider, _name, _name, \
+ _TP_PARAMS(_args))
#define TRACEPOINT_INCLUDE __tp_stringify(TRACEPOINT_INCLUDE_FILE)
* the provider:event identifier is limited to 127 characters.
*/
-
#define TRACEPOINT_EVENT(provider, name, args, fields) \
_DECLARE_TRACEPOINT(provider, name, _TP_PARAMS(args))
pid_t fork(void)
{
static pid_t (*plibc_func)(void) = NULL;
- ust_fork_info_t fork_info;
+ sigset_t sigset;
pid_t retval;
if (plibc_func == NULL) {
}
}
- ust_before_fork(&fork_info);
+ ust_before_fork(&sigset);
/* Do the real fork */
retval = plibc_func();
if (retval == 0) {
/* child */
- ust_after_fork_child(&fork_info);
+ ust_after_fork_child(&sigset);
} else {
- ust_after_fork_parent(&fork_info);
+ ust_after_fork_parent(&sigset);
}
return retval;
}
struct ustfork_clone_info {
int (*fn)(void *);
void *arg;
- ust_fork_info_t fork_info;
+ sigset_t sigset;
};
static int clone_fn(void *arg)
struct ustfork_clone_info *info = (struct ustfork_clone_info *) arg;
/* clone is now done and we are in child */
- ust_after_fork_child(&info->fork_info);
+ ust_after_fork_child(&info->sigset);
return info->fn(info->arg);
}
/* Creating a real process, we need to intervene. */
struct ustfork_clone_info info = { fn: fn, arg: arg };
- ust_before_fork(&info.fork_info);
+ ust_before_fork(&info.sigset);
retval = plibc_func(clone_fn, child_stack, flags, &info,
ptid, tls, ctid);
/* The child doesn't get here. */
- ust_after_fork_parent(&info.fork_info);
+ ust_after_fork_parent(&info.sigset);
}
return retval;
}
$(top_builddir)/liblttng-ust-comm/liblttng-ust-comm.la \
liblttng-ust-runtime.la liblttng-ust-support.la
-liblttng_ust_la_CFLAGS = -DUST_COMPONENT="liblttng-ust" -fno-strict-aliasing
+liblttng_ust_la_CFLAGS = -DUST_COMPONENT="liblttng_ust" -fno-strict-aliasing
vfprintf.c \
wcio.h \
wsetup.c \
- core.c
+ core.c \
+ patient_write.c
libustsnprintf_la_LDFLAGS = -no-undefined -static
-libustsnprintf_la_CFLAGS = -DUST_COMPONENT="ust_snprintf" -fPIC -fno-strict-aliasing
+libustsnprintf_la_CFLAGS = -DUST_COMPONENT="lttng_ust_snprintf" -fPIC -fno-strict-aliasing
#endif /* _TRACEPOINT_UST_TESTS_FORK_H */
-#undef TRACEPOINT_INCLUDE_PATH
-#define TRACEPOINT_INCLUDE_PATH .
#undef TRACEPOINT_INCLUDE_FILE
-#define TRACEPOINT_INCLUDE_FILE ust_tests_fork
+#define TRACEPOINT_INCLUDE_FILE ./ust_tests_fork.h
/* This part must be outside ifdef protection */
#include <lttng/tracepoint-event.h>