summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2013-08-14 13:57:41 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2013-10-28 15:47:14 +0900
commitc7515f3300157419c42d8a9d224c46babebae37c (patch)
tree52f55a4991bde40e7a41e310e33c5063b792ea0c /src/bin
parent7ebda2d123ec53bad84dc7eabc08530477d50e80 (diff)
evas/cserve2: Add mempool_buffer_offset_get() api
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/evas/evas_cserve2_index.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/bin/evas/evas_cserve2_index.c b/src/bin/evas/evas_cserve2_index.c
index ecafa310db..ccb49039d9 100644
--- a/src/bin/evas/evas_cserve2_index.c
+++ b/src/bin/evas/evas_cserve2_index.c
@@ -821,6 +821,22 @@ cserve2_shared_mempool_buffer_get(Shared_Mempool *sm, int bufferid)
821 return data; 821 return data;
822} 822}
823 823
824int
825cserve2_shared_mempool_buffer_offset_get(Shared_Mempool *sm, int bufferid)
826{
827 Index_Entry *ie;
828
829 if (!sm) return -1;
830 ie = _shared_index_entry_get_by_id(sm->index, bufferid);
831 if (!ie || ie->refcount <= 0)
832 {
833 CRIT("Tried to access invalid buffer or with refcount 0");
834 return -1;
835 }
836
837 return ie->offset;
838}
839
824 840
825// Shared strings 841// Shared strings
826 842