X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=ustd%2Fustd.h;h=d0e6fe58bd0325096280ca2f90854ce7158dbf0e;hb=a09dac63957396890b1085cac0fee92ecc5db87a;hp=65328d61ac933312a56775fcde9599f009384309;hpb=ed1317e78616d3fb99791d4effef7473317c41ec;p=ust.git diff --git a/ustd/ustd.h b/ustd/ustd.h index 65328d6..d0e6fe5 100644 --- a/ustd/ustd.h +++ b/ustd/ustd.h @@ -1,3 +1,20 @@ +/* Copyright (C) 2009 Pierre-Marc Fournier + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + #ifndef USTD_H #define USTD_H @@ -6,7 +23,7 @@ #define USTD_DEFAULT_TRACE_PATH "/tmp/usttrace" struct buffer_info { - char *name; + const char *name; pid_t pid; struct ustcomm_connection conn; @@ -30,10 +47,12 @@ struct buffer_info { long consumed_old; s64 pidunique; -}; -ssize_t patient_write(int fd, const void *buf, size_t count); + /* the offset we must truncate to, to unput the last subbuffer */ + off_t previous_offset; +}; void finish_consuming_dead_subbuffer(struct buffer_info *buf); +size_t subbuffer_data_size(void *subbuf); #endif /* USTD_H */