diff options
author | hunt <hunt> | 2007-12-11 18:15:44 +0000 |
---|---|---|
committer | hunt <hunt> | 2007-12-11 18:15:44 +0000 |
commit | 0dade809a3197b89f407e294dd2ce2b037f18658 (patch) | |
tree | 6c6ce7dc9a21deae1e3784e1eebba84ae66e3b4c /runtime/staprun/relay_old.c | |
parent | b2199bb3837e6b3aacb7ad25d7ed4dca15dd41f7 (diff) | |
download | systemtap-steved-0dade809a3197b89f407e294dd2ce2b037f18658.tar.gz systemtap-steved-0dade809a3197b89f407e294dd2ce2b037f18658.tar.xz systemtap-steved-0dade809a3197b89f407e294dd2ce2b037f18658.zip |
2007-12-11 Martin Hunt <hunt@redhat.com>
PR5368
* relay_old.c (init_oldrelayfs): Don't start threads
if load_only.
* relay.c (init_relayfs): Ditto.
Diffstat (limited to 'runtime/staprun/relay_old.c')
-rw-r--r-- | runtime/staprun/relay_old.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/runtime/staprun/relay_old.c b/runtime/staprun/relay_old.c index f138aee5..bd746f19 100644 --- a/runtime/staprun/relay_old.c +++ b/runtime/staprun/relay_old.c @@ -303,14 +303,17 @@ int init_oldrelayfs(void) return -1; } - for (i = 0; i < ncpus; i++) { - /* create a thread for each per-cpu buffer */ - if (pthread_create(&reader[i], NULL, reader_thread, (void *)(long)i) < 0) { - int saved_errno = errno; - close_relayfs_files(i); - err("ERROR: Couldn't create reader thread, cpu = %d: %s\n", - i, strerror(saved_errno)); - goto err; + if (!load_only) { + dbug(2, "starting threads\n"); + for (i = 0; i < ncpus; i++) { + /* create a thread for each per-cpu buffer */ + if (pthread_create(&reader[i], NULL, reader_thread, (void *)(long)i) < 0) { + int saved_errno = errno; + close_relayfs_files(i); + err("ERROR: Couldn't create reader thread, cpu = %d: %s\n", + i, strerror(saved_errno)); + goto err; + } } } return 0; |