X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=ustd%2Fustd.c;h=4a9a14ecdc8d29a9bd9e3b0f56b64d93ae13e5a1;hb=8bf5ab2d80aa095929b6d49cf2a219d9173fe4af;hp=7d1eb49cec6de8d51157ca3c377a0d0be8d2318c;hpb=60e57148f47eb3a3116de47e23516fc5df8c968e;p=lttng-ust.git diff --git a/ustd/ustd.c b/ustd/ustd.c index 7d1eb49c..4a9a14ec 100644 --- a/ustd/ustd.c +++ b/ustd/ustd.c @@ -35,6 +35,7 @@ #include "ustd.h" #include "localerr.h" #include "ustcomm.h" +#include "share.h" /* return value: 0 = subbuffer is finished, it won't produce data anymore * 1 = got subbuffer successfully @@ -198,30 +199,6 @@ end: return retval; } -/* This write is patient because it restarts if it was incomplete. - */ - -ssize_t patient_write(int fd, const void *buf, size_t count) -{ - const char *bufc = (const char *) buf; - int result; - - for(;;) { - result = write(fd, bufc, count); - if(result <= 0) { - return result; - } - count -= result; - bufc += result; - - if(count == 0) { - break; - } - } - - return bufc-(const char *)buf; -} - void decrement_active_buffers(void *arg) { pthread_mutex_lock(&active_buffers_mutex);