projects
/
ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
improve keepalive by changing the location of the unconnected buffers counter
[ust.git]
/
libust
/
tracectl.c
diff --git
a/libust/tracectl.c
b/libust/tracectl.c
index c34a3ce4ad3f673393ef3df9da5f89baa965d7e8..916b3548eee3de1f953713159c44794431c9874f 100644
(file)
--- a/
libust/tracectl.c
+++ b/
libust/tracectl.c
@@
-357,10
+357,7
@@
static int do_cmd_get_shmid(const char *recvbuf, struct ustcomm_source *src)
}
}
}
}
- if(found) {
- buffers_to_export--;
- }
- else {
+ if(!found) {
ERR("channel not found (%s)", channel_and_cpu);
}
ERR("channel not found (%s)", channel_and_cpu);
}
@@
-695,6
+692,14
@@
static int do_cmd_get_subbuffer(const char *recvbuf, struct ustcomm_source *src)
list_add(&bc->list, &blocked_consumers);
list_add(&bc->list, &blocked_consumers);
+ /* Being here is the proof the daemon has mapped the buffer in its
+ * memory. We may now decrement buffers_to_export.
+ */
+ if(atomic_long_read(&buf->consumed) == 0) {
+ DBG("decrementing buffers_to_export");
+ buffers_to_export--;
+ }
+
break;
}
}
break;
}
}
This page took
0.023433 seconds
and
4
git commands to generate.