diff options
author | Alexander Wenzel <Alexander.AW.Wenzel@bmw.de> | 2011-10-18 16:58:57 +0200 |
---|---|---|
committer | Alexander Wenzel <Alexander.AW.Wenzel@bmw.de> | 2011-10-18 16:58:57 +0200 |
commit | b120a91a3d917207b092f898128600e3a3f7fdb3 (patch) | |
tree | 457f45b74bcd45c66cb467c5e19fc312cde906da /include/dlt | |
parent | bd907a3a892ab13d8d2f781a0536d46b4cf3b12b (diff) | |
download | DLT-daemon-b120a91a3d917207b092f898128600e3a3f7fdb3.tar.gz |
[GSW-43] Performance improvement for bulk data over DLT.
Implemented recovery of SHM.
Diffstat (limited to 'include/dlt')
-rw-r--r-- | include/dlt/dlt_shm.h | 16 |
1 files changed, 16 insertions, 0 deletions
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 */ @@ -198,6 +200,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 * @return negative value if there was an error |