From 91c91425de21de8e826bd01cc09be2bc723a45f0 Mon Sep 17 00:00:00 2001 From: ha7ilm Date: Tue, 7 Jun 2016 22:15:40 +0200 Subject: [PATCH] 1R1W mode fixed --- tsmpool.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tsmpool.cpp b/tsmpool.cpp index 67507c5..d081eb9 100644 --- a/tsmpool.cpp +++ b/tsmpool.cpp @@ -8,6 +8,7 @@ tsmpool::tsmpool(size_t size, int num) this->ok = 1; this->lowest_read_index = -1; this->write_index = 0; + this->my_read_index = 0; if (pthread_mutex_init(&this->mutex, NULL) != 0) this->ok=0; } @@ -51,7 +52,3 @@ void* tsmpool::get_read_buffer(tsmthread_t* thread) void* to_return = buffers[*actual_read_index]; *actual_read_index=index_next(*actual_read_index); } - -void* tsmpool::set_read_index_distance(tsmthread_t* thread, int distance) -{ -}