libnx v4.9.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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.
16void 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 */
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.
43void 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 */
Result insrGetReadableEvent(u32 id, Event *out)
Retrieves the event corresponding to the ID.
Result inssGetWritableEvent(u32 id, Event *out)
Retrieves the event corresponding to the ID.
Result insrInitialize(void)
Initialize ins:r.
Result insrGetLastTick(u32 id, u64 *tick)
Retrieves the last system tick the event corresponding to the ID was signaled at.
Service * insrGetServiceSession(void)
Gets the Service object for the actual ins:r service session.
void inssExit(void)
Exit ins:s.
Service * inssGetServiceSession(void)
Gets the Service object for the actual ins:s service session.
Result inssInitialize(void)
Initialize ins:s.
void insrExit(void)
Exit ins:r.
Kernel-mode event structure.
Definition event.h:13
Service object structure.
Definition service.h:14
uint64_t u64
64-bit unsigned integer.
Definition types.h:22
u32 Result
Function error code result type.
Definition types.h:44
uint32_t u32
32-bit unsigned integer.
Definition types.h:21