summaryrefslogtreecommitdiff
path: root/include/dlt/dlt_shm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/dlt/dlt_shm.h')
-rw-r--r--include/dlt/dlt_shm.h16
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