X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Findex.h;h=4364f12ffdb096179e6e736dd821388c4c4bb028;hp=fc184e97dc74d4844b6741a90af8d8fe0cb805eb;hb=HEAD;hpb=1c20f0e29cbf8627bfb1ff444572d52d6655c4e2 diff --git a/src/bin/lttng-relayd/index.h b/src/bin/lttng-relayd/index.h deleted file mode 100644 index fc184e97d..000000000 --- a/src/bin/lttng-relayd/index.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2013 - Julien Desfossez - * David Goulet - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License, version 2 only, as - * published by the Free Software Foundation. - * - * This program 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 General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 51 - * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef _RELAY_INDEX_H -#define _RELAY_INDEX_H - -#include -#include - -#include -#include - -struct relay_index { - /* FD on which to write the index data. */ - int fd; - /* - * When destroying this object, this fd is checked and if valid, close it - * so this is basically a lazy close of the previous fd corresponding to - * the same stream id. This is used for the rotate file feature. - */ - int to_close_fd; - - /* Index packet data. This is the data that is written on disk. */ - struct lttng_packet_index index_data; - - /* key1 = stream_id, key2 = net_seq_num */ - struct lttng_ht_two_u64 key; - struct lttng_ht_node_two_u64 index_n; - struct rcu_head rcu_node; - pthread_mutex_t mutex; -}; - -struct relay_index *relay_index_create(uint64_t stream_id, - uint64_t net_seq_num); -struct relay_index *relay_index_find(uint64_t stream_id, - uint64_t net_seq_num, struct lttng_ht *ht); -void relay_index_add(struct relay_index *index, struct lttng_ht *ht, - struct relay_index **_index); -int relay_index_write(int fd, struct relay_index *index, struct lttng_ht *ht); -void relay_index_free(struct relay_index *index); -void relay_index_free_safe(struct relay_index *index); -void relay_index_delete(struct relay_index *index, struct lttng_ht *ht); -void relay_index_destroy_by_stream_id(uint64_t stream_id, struct lttng_ht *ht); - -#endif /* _RELAY_INDEX_H */