Symbian platform (C++)
SDK native APIs, runtime and tooling
Loading...
Searching...
No Matches
abi.h
Go to the documentation of this file.
1#ifndef SYMBIAN_RUNTIME_ABI_H_
2#define SYMBIAN_RUNTIME_ABI_H_
3
4#include <cstdint>
5
6#include <absl/base/nullability.h>
7
8// Keep modern standard-library headers and frozen Symbian C++ headers in
9// separate translation units. In particular their placement-new declarations
10// have conflicting exception specifications and inline definitions.
11extern "C" void* absl_nullable SymbianRuntimeAllocate(unsigned int size);
12extern "C" void* absl_nullable SymbianRuntimeReallocate(
13 void* absl_nullable pointer, unsigned int size);
14extern "C" void SymbianRuntimeFree(void* absl_nullable pointer);
15// Opaque identity for verifying distinct native thread heaps in guest tests.
16extern "C" void* absl_nonnull SymbianRuntimeHeapIdentity();
17// Process exit codes use the corresponding Symbian error values. Keep the
18// runtime's fatal cases named even in translation units without e32std.h.
19enum class SymbianRuntimeExitReason : int {
20 kOutOfMemory = -4, // KErrNoMemory.
21 kRuntimeContractFailure = -6, // KErrArgument.
22};
23extern "C" [[noreturn]] void SymbianRuntimeExit(
25extern "C" int SymbianRuntimeAllocationCells();
26extern "C" void SymbianRuntimeCollectAllocations();
27// Pair on native worker entry/exit. The default heap backend needs no state;
28// mimalloc uses this scope for a fast thread-local cache and explicit teardown.
29extern "C" void SymbianRuntimeThreadCacheEnter();
30extern "C" void SymbianRuntimeThreadCacheLeave();
31// Per-thread implicit conversion state for the bounded UTF-8 C compatibility
32// surface. Each C function owns a separate eight-byte slot.
33extern "C" void* absl_nonnull SymbianRuntimeMbState(int slot);
34// Process-owned, page-aligned backing for low-level allocators. The opaque
35// owner must outlive every access to the returned pages and be closed once.
37extern "C" int SymbianRuntimePageSize();
38extern "C" int SymbianRuntimePageCreate(
39 unsigned int bytes,
40 SymbianRuntimePageOwner* absl_nullable* absl_nullable owner,
41 void* absl_nullable* absl_nullable pages);
42extern "C" void SymbianRuntimePageClose(
43 SymbianRuntimePageOwner* absl_nullable owner);
44extern "C" void SymbianRuntimePageSetNext(
45 SymbianRuntimePageOwner* absl_nullable owner,
46 SymbianRuntimePageOwner* absl_nullable next);
47extern "C" SymbianRuntimePageOwner* absl_nullable SymbianRuntimePageNext(
48 SymbianRuntimePageOwner* absl_nullable owner);
49extern "C" void SymbianRuntimeRunInitializers();
50extern "C" void SymbianRuntimeRunFinalizers();
51extern "C" int SymbianRuntimeDllEntry(int reason);
52extern "C" unsigned int SymbianRuntimeTickCount();
53extern "C" int SymbianRuntimeTickPeriodMicros();
54extern "C" unsigned int SymbianRuntimeNanoTickCount();
56extern "C" unsigned int SymbianRuntimeFastCounter();
58extern "C" std::int64_t SymbianRuntimeSteadyClockNanoseconds();
59extern "C" int SymbianRuntimeSleepMicroseconds(std::uint64_t microseconds);
60
61// Internal narrow bridge for thread-relative RTimer requests. Cancellation
62// and close drain pending requests before returning.
64extern "C" int SymbianRuntimeTimerCreate(
65 SymbianRuntimeTimerState* absl_nullable* absl_nullable state);
66extern "C" int SymbianRuntimeTimerStart(
67 SymbianRuntimeTimerState* absl_nullable state, int microseconds);
68extern "C" void SymbianRuntimeTimerCancel(
69 SymbianRuntimeTimerState* absl_nullable state);
70extern "C" int SymbianRuntimeTimerResult(
71 const SymbianRuntimeTimerState* absl_nullable state);
72extern "C" bool SymbianRuntimeTimerIsReady(
73 const SymbianRuntimeTimerState* absl_nullable state);
74extern "C" void SymbianRuntimeTimerClose(
75 SymbianRuntimeTimerState* absl_nullable state);
76
78extern "C" int SymbianRuntimePropertyCreate(
79 int category, unsigned int key,
80 SymbianRuntimePropertyState* absl_nullable* absl_nonnull state);
82 SymbianRuntimePropertyState* absl_nullable state);
83extern "C" int SymbianRuntimePropertySet(
84 SymbianRuntimePropertyState* absl_nullable state, int value);
85extern "C" int SymbianRuntimePropertyResult(
86 SymbianRuntimePropertyState* absl_nullable state, int* absl_nullable value);
87extern "C" bool SymbianRuntimePropertyIsReady(
88 const SymbianRuntimePropertyState* absl_nullable state);
89extern "C" void SymbianRuntimePropertyCancel(
90 SymbianRuntimePropertyState* absl_nullable state);
91extern "C" void SymbianRuntimePropertyClose(
92 SymbianRuntimePropertyState* absl_nullable state);
93extern "C" void SymbianRuntimeWaitForAnyRequest();
94
95// Cross-thread signal for the event thread's existing request semaphore.
97extern "C" int SymbianRuntimeWakeCreate(
98 SymbianRuntimeWakeState* absl_nullable* absl_nullable state);
99extern "C" void SymbianRuntimeWakeSignal(
100 SymbianRuntimeWakeState* absl_nullable state);
101extern "C" void SymbianRuntimeWakeClose(
102 SymbianRuntimeWakeState* absl_nullable state);
103
104#endif // SYMBIAN_RUNTIME_ABI_H_
void SymbianRuntimePropertyClose(SymbianRuntimePropertyState *absl_nullable state)
Definition sdk_property.cc:102
void SymbianRuntimeRunInitializers()
Definition lifecycle.cc:71
SymbianRuntimeExitReason
Definition abi.h:19
void SymbianRuntimePropertyCancel(SymbianRuntimePropertyState *absl_nullable state)
Definition sdk_property.cc:95
void SymbianRuntimeTimerClose(SymbianRuntimeTimerState *absl_nullable state)
Definition sdk_timer.cc:95
void SymbianRuntimeFree(void *absl_nullable pointer)
Definition sdk_heap.cc:99
int SymbianRuntimeNanoTickPeriodMicros()
Definition sdk_clock.cc:22
int SymbianRuntimePropertyCreate(int category, unsigned int key, SymbianRuntimePropertyState *absl_nullable *absl_nonnull state)
Definition sdk_property.cc:17
void SymbianRuntimeThreadCacheEnter()
Definition sdk_heap.cc:139
int SymbianRuntimePropertySubscribe(SymbianRuntimePropertyState *absl_nullable state)
Definition sdk_property.cc:49
void SymbianRuntimeExit(SymbianRuntimeExitReason reason)
Definition sdk_heap.cc:123
unsigned int SymbianRuntimeNanoTickCount()
Definition sdk_clock.cc:18
int SymbianRuntimeTimerResult(const SymbianRuntimeTimerState *absl_nullable state)
Definition sdk_timer.cc:82
void *absl_nonnull SymbianRuntimeHeapIdentity()
Definition sdk_heap.cc:119
int SymbianRuntimeDllEntry(int reason)
Definition sdk_lifecycle.cc:6
int SymbianRuntimeSleepMicroseconds(std::uint64_t microseconds)
Definition sdk_timer.cc:8
void SymbianRuntimeWaitForAnyRequest()
Definition sdk_timer.cc:108
int SymbianRuntimeAllocationCells()
Definition sdk_heap.cc:129
std::int64_t SymbianRuntimeSteadyClockNanoseconds()
Definition clock.cc:17
void SymbianRuntimeCollectAllocations()
Definition sdk_heap.cc:133
bool SymbianRuntimeTimerIsReady(const SymbianRuntimeTimerState *absl_nullable state)
Definition sdk_timer.cc:90
void *absl_nonnull SymbianRuntimeMbState(int slot)
Definition pthread_legacy.cc:821
int SymbianRuntimePropertyResult(SymbianRuntimePropertyState *absl_nullable state, int *absl_nullable value)
Definition sdk_property.cc:75
unsigned int SymbianRuntimeTickCount()
Definition sdk_clock.cc:8
void *absl_nullable SymbianRuntimeReallocate(void *absl_nullable pointer, unsigned int size)
Definition sdk_heap.cc:72
void SymbianRuntimeWakeSignal(SymbianRuntimeWakeState *absl_nullable state)
Definition sdk_timer.cc:137
void SymbianRuntimePageClose(SymbianRuntimePageOwner *absl_nullable owner)
Definition sdk_pages.cc:73
int SymbianRuntimeTimerCreate(SymbianRuntimeTimerState *absl_nullable *absl_nullable state)
Definition sdk_timer.cc:39
void SymbianRuntimeWakeClose(SymbianRuntimeWakeState *absl_nullable state)
Definition sdk_timer.cc:144
int SymbianRuntimeTickPeriodMicros()
Definition sdk_clock.cc:12
void SymbianRuntimeTimerCancel(SymbianRuntimeTimerState *absl_nullable state)
Definition sdk_timer.cc:74
int SymbianRuntimeFastCounterFrequency()
Definition sdk_clock.cc:33
SymbianRuntimePageOwner *absl_nullable SymbianRuntimePageNext(SymbianRuntimePageOwner *absl_nullable owner)
Definition sdk_pages.cc:93
void *absl_nullable SymbianRuntimeAllocate(unsigned int size)
Definition sdk_heap.cc:39
bool SymbianRuntimePropertyIsReady(const SymbianRuntimePropertyState *absl_nullable state)
Definition sdk_property.cc:70
int SymbianRuntimePageSize()
Definition sdk_pages.cc:13
void SymbianRuntimeThreadCacheLeave()
Definition sdk_heap.cc:145
unsigned int SymbianRuntimeFastCounter()
Definition sdk_clock.cc:29
void SymbianRuntimePageSetNext(SymbianRuntimePageOwner *absl_nullable owner, SymbianRuntimePageOwner *absl_nullable next)
Definition sdk_pages.cc:85
int SymbianRuntimePropertySet(SymbianRuntimePropertyState *absl_nullable state, int value)
Definition sdk_property.cc:62
void SymbianRuntimeRunFinalizers()
Definition lifecycle.cc:81
int SymbianRuntimeWakeCreate(SymbianRuntimeWakeState *absl_nullable *absl_nullable state)
Definition sdk_timer.cc:116
int SymbianRuntimePageCreate(unsigned int bytes, SymbianRuntimePageOwner *absl_nullable *absl_nullable owner, void *absl_nullable *absl_nullable pages)
Definition sdk_pages.cc:22
int SymbianRuntimeTimerStart(SymbianRuntimeTimerState *absl_nullable state, int microseconds)
Definition sdk_timer.cc:60
GLint size
Definition gles2_frame_backend.cc:63
void *absl_nullable pointer
Definition gles2_frame_backend.cc:68
std::string_view bytes
Definition exports.cc:76
Definition sdk_pages.cc:7
SymbianRuntimePageOwner *absl_nullable next
Definition sdk_pages.cc:10
Definition sdk_property.cc:9
TUid category
Definition sdk_property.cc:12
TUint key
Definition sdk_property.cc:13
Definition sdk_timer.cc:33
Definition sdk_timer.cc:112
libusb_context *absl_nullable value
Definition usb.cc:37