i3
include
shmlog.h
Go to the documentation of this file.
1
/*
2
* vim:ts=4:sw=4:expandtab
3
*
4
* i3 - an improved tiling window manager
5
* © 2009 Michael Stapelberg and contributors (see also: LICENSE)
6
*
7
* The format of the shmlog data structure which i3 development versions use by
8
* default (ringbuffer for storing the debug log).
9
*
10
*/
11
#pragma once
12
13
#include <config.h>
14
15
/* Default shmlog size if not set by user. */
16
extern
const
int
default_shmlog_size
;
17
22
typedef
struct
i3_shmlog_header
{
23
/* Byte offset where the next line will be written to. */
24
uint32_t
offset_next_write
;
25
26
/* Byte offset where the last wrap occurred. */
27
uint32_t
offset_last_wrap
;
28
29
/* The size of the logfile in bytes. Since the size is limited to 25 MiB
30
* an uint32_t is sufficient. */
31
uint32_t
size
;
32
33
/* wrap counter. We need it to reliably signal to clients that we just
34
* wrapped (clients cannot use offset_last_wrap because that might
35
* coincidentally be exactly the same as previously). Overflows can happen
36
* and don’t matter — clients use an equality check (==). */
37
uint32_t
wrap_count
;
38
}
i3_shmlog_header
;
default_shmlog_size
const int default_shmlog_size
Definition
main.c:84
i3_shmlog_header
struct i3_shmlog_header i3_shmlog_header
Header of the shmlog file.
i3_shmlog_header
Header of the shmlog file.
Definition
shmlog.h:22
i3_shmlog_header::offset_last_wrap
uint32_t offset_last_wrap
Definition
shmlog.h:27
i3_shmlog_header::offset_next_write
uint32_t offset_next_write
Definition
shmlog.h:24
i3_shmlog_header::wrap_count
uint32_t wrap_count
Definition
shmlog.h:37
i3_shmlog_header::size
uint32_t size
Definition
shmlog.h:31
Generated by
1.12.0