From b120a91a3d917207b092f898128600e3a3f7fdb3 Mon Sep 17 00:00:00 2001 From: Alexander Wenzel Date: Tue, 18 Oct 2011 16:58:57 +0200 Subject: [GSW-43] Performance improvement for bulk data over DLT. Implemented recovery of SHM. --- include/dlt/dlt_shm.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include/dlt/dlt_shm.h') diff --git a/include/dlt/dlt_shm.h b/include/dlt/dlt_shm.h index e3608c3..462c089 100644 --- a/include/dlt/dlt_shm.h +++ b/include/dlt/dlt_shm.h @@ -82,6 +82,8 @@ /* must be the same for server and client */ #define DLT_SHM_SEM 22771 +#define DLT_SHM_HEAD "SHM" + typedef struct { int shmid; /* Id of shared memory */ @@ -197,6 +199,20 @@ extern int dlt_shm_get_used_size(DltShm *buf); */ extern int dlt_shm_get_message_count(DltShm *buf); +/** + * Reset pointers and counters when shm corrupted. + * @param buf pointer to shm structure + * @return size of the shared memory. + */ +extern int dlt_shm_reset(DltShm *buf); + +/** + * Recover to find next valid message. + * @param buf pointer to shm structure + * @return size of the shared memory. + */ +extern int dlt_shm_recover(DltShm *buf); + /** * Deinitialise the shared memory on the server side. * @param buf pointer to shm structure -- cgit v1.2.1