libnx  v4.2.0
ins.h
Go to the documentation of this file.
1 /**
2  * @file ins.h
3  * @brief INS services IPC wrapper.
4  * @author averne
5  * @copyright libnx Authors
6  */
7 #pragma once
8 #include "../types.h"
9 #include "../kernel/event.h"
10 #include "../sf/service.h"
11 
12 /// Initialize ins:r.
14 
15 /// Exit ins:r.
16 void insrExit(void);
17 
18 /// Gets the Service object for the actual ins:r service session.
20 
21 /**
22  * @brief Retrieves the last system tick the event corresponding to the ID was signaled at.
23  * @param[in] id Ins request ID (should be 0..4).
24  * @param[out] tick.
25  * @return Result code.
26  * @note The tick is only updated once per second at minimum.
27  */
28 Result insrGetLastTick(u32 id, u64 *tick);
29 
30 /**
31  * @brief Retrieves the event corresponding to the ID.
32  * @param[in] id Ins request ID (should be 0..4).
33  * @param[out] out.
34  * @return Result code.
35  * @note The event is only signaled once per second at minimum.
36  */
38 
39 /// Initialize ins:s.
41 
42 /// Exit ins:s.
43 void inssExit(void);
44 
45 /// Gets the Service object for the actual ins:s service session.
47 
48 /**
49  * @brief Retrieves the event corresponding to the ID.
50  * @param[in] id Ins send ID (should be 0..11).
51  * @param[out] out.
52  * @return Result code.
53  * @note The returned event cannot be waited on, only signaled. Clearing is handled by the service.
54  */
inssGetWritableEvent
Result inssGetWritableEvent(u32 id, Event *out)
Retrieves the event corresponding to the ID.
insrGetLastTick
Result insrGetLastTick(u32 id, u64 *tick)
Retrieves the last system tick the event corresponding to the ID was signaled at.
Event
Kernel-mode event structure.
Definition: event.h:13
insrGetReadableEvent
Result insrGetReadableEvent(u32 id, Event *out)
Retrieves the event corresponding to the ID.
u32
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21
u64
uint64_t u64
64-bit unsigned integer.
Definition: types.h:22
insrExit
void insrExit(void)
Exit ins:r.
Result
u32 Result
Function error code result type.
Definition: types.h:44
inssExit
void inssExit(void)
Exit ins:s.
insrGetServiceSession
Service * insrGetServiceSession(void)
Gets the Service object for the actual ins:r service session.
inssInitialize
Result inssInitialize(void)
Initialize ins:s.
Service
Service object structure.
Definition: service.h:13
inssGetServiceSession
Service * inssGetServiceSession(void)
Gets the Service object for the actual ins:s service session.
insrInitialize
Result insrInitialize(void)
Initialize ins:r.