mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-05-27 21:37:48 -04:00
The "restrict" keyword can be used to indicate that no other pointer will be used to access a chunk of memory while the restricted pointer is alive. If that promise is not upheld, undefined behavior is triggered. It may be difficult to ensure this property, and the property may be brittle - becoming invalid as code evolves. Just like "inline", let's just leave optimizations up to the compiler to figure out.
20 lines
611 B
C
20 lines
611 B
C
#ifndef BACKEND_SESSION_SESSION_H
|
|
#define BACKEND_SESSION_SESSION_H
|
|
|
|
#include <stdbool.h>
|
|
|
|
struct wl_display;
|
|
struct wlr_session;
|
|
|
|
struct wlr_session *libseat_session_create(struct wl_display *disp);
|
|
void libseat_session_destroy(struct wlr_session *base);
|
|
int libseat_session_open_device(struct wlr_session *base, const char *path);
|
|
void libseat_session_close_device(struct wlr_session *base, int fd);
|
|
bool libseat_change_vt(struct wlr_session *base, unsigned vt);
|
|
|
|
void session_init(struct wlr_session *session);
|
|
|
|
struct wlr_device *session_open_if_kms(struct wlr_session *session,
|
|
const char *path);
|
|
|
|
#endif
|