Monado OpenXR Runtime
u_process.h
Go to the documentation of this file.
1 // Copyright 2020, Collabora, Ltd.
2 // SPDX-License-Identifier: BSL-1.0
3 /*!
4  * @file
5  * @brief Simple process handling
6  * @author Christoph Haag <christoph.haag@collabora.com>
7  * @ingroup aux_util
8  */
9 
10 #pragma once
11 
12 #include <stdio.h>
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 struct u_process;
19 
20 /*!
21  * Creates a handle for this process that is unique to the operating system user. Returns NULL if another process
22  * holding a handle is already running.
23  *
24  * @todo If built without libbsd support, a placeholder value is returned that needs to be handled by the caller.
25  *
26  * @return a new u_process handle if no monado instance is running, NULL if another instance is already running.
27  * @ingroup aux_util
28  */
29 struct u_process *
31 
32 /*!
33  * Releases the unique handle of the operating system user.
34  *
35  * @ingroup aux_util
36  */
37 void
38 u_process_destroy(struct u_process *proc);
39 
40 #ifdef __cplusplus
41 }
42 #endif
void u_process_destroy(struct u_process *proc)
Releases the unique handle of the operating system user.
Definition: u_process.c:95
struct u_process * u_process_create_if_not_running(void)
Creates a handle for this process that is unique to the operating system user.
Definition: u_process.c:52
Definition: u_process.c:43