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// Keep modern standard-library headers and frozen Symbian C++ headers in
5// separate translation units. In particular their placement-new declarations
6// have conflicting exception specifications and inline definitions.
7extern "C" void* SymbianRuntimeAllocate(unsigned int size);
8extern "C" void SymbianRuntimeFree(void* pointer);
9// Opaque identity for verifying distinct native thread heaps in guest tests.
10extern "C" void* SymbianRuntimeHeapIdentity();
11// Process exit codes use the corresponding Symbian error values. Keep the
12// runtime's fatal cases named even in translation units without e32std.h.
13enum class SymbianRuntimeExitReason : int {
14 kOutOfMemory = -4, // KErrNoMemory.
15 kRuntimeContractFailure = -6, // KErrArgument.
16};
17extern "C" [[noreturn]] void SymbianRuntimeExit(
19extern "C" int SymbianRuntimeAllocationCells();
20extern "C" void SymbianRuntimeCollectAllocations();
21// Pair on native worker entry/exit. The default heap backend needs no state;
22// mimalloc uses this scope for a fast thread-local cache and explicit teardown.
23extern "C" void SymbianRuntimeThreadCacheEnter();
24extern "C" void SymbianRuntimeThreadCacheLeave();
25// Process-owned, page-aligned backing for low-level allocators. The opaque
26// owner must outlive every access to the returned pages and be closed once.
28extern "C" int SymbianRuntimePageSize();
29extern "C" int SymbianRuntimePageCreate(unsigned int bytes,
31 void** pages);
37extern "C" void SymbianRuntimeRunInitializers();
38extern "C" void SymbianRuntimeRunFinalizers();
39extern "C" int SymbianRuntimeDllEntry(int reason);
40extern "C" unsigned int SymbianRuntimeTickCount();
41extern "C" int SymbianRuntimeTickPeriodMicros();
42extern "C" unsigned int SymbianRuntimeNanoTickCount();
44extern "C" unsigned int SymbianRuntimeFastCounter();
46
47// Internal narrow bridge for thread-relative RTimer requests. The caller must
48// keep the state alive until cancellation has completed and been drained.
52 int microseconds);
54extern "C" int SymbianRuntimeTimerResult(const SymbianRuntimeTimerState* state);
55extern "C" bool SymbianRuntimeTimerIsReady(
56 const SymbianRuntimeTimerState* state);
58
60extern "C" int SymbianRuntimePropertyCreate(
61 int category, unsigned int key, SymbianRuntimePropertyState** state);
65 int value);
67 int* value);
68extern "C" bool SymbianRuntimePropertyIsReady(
69 const SymbianRuntimePropertyState* state);
70extern "C" void SymbianRuntimePropertyCancel(
73extern "C" void SymbianRuntimeWaitForAnyRequest();
74
75// Cross-thread signal for the event thread's existing request semaphore.
80
81#endif // SYMBIAN_RUNTIME_ABI_H_
void SymbianRuntimeRunInitializers()
Definition lifecycle.cc:67
SymbianRuntimeExitReason
Definition abi.h:13
void SymbianRuntimePageClose(SymbianRuntimePageOwner *owner)
Definition sdk_pages.cc:71
void * SymbianRuntimeAllocate(unsigned int size)
Definition sdk_heap.cc:32
void * SymbianRuntimeHeapIdentity()
Definition sdk_heap.cc:75
bool SymbianRuntimeTimerIsReady(const SymbianRuntimeTimerState *state)
Definition sdk_timer.cc:59
int SymbianRuntimeNanoTickPeriodMicros()
Definition sdk_clock.cc:22
void SymbianRuntimeThreadCacheEnter()
Definition sdk_heap.cc:95
void SymbianRuntimeExit(SymbianRuntimeExitReason reason)
Definition sdk_heap.cc:79
unsigned int SymbianRuntimeNanoTickCount()
Definition sdk_clock.cc:18
bool SymbianRuntimePropertyIsReady(const SymbianRuntimePropertyState *state)
Definition sdk_property.cc:68
int SymbianRuntimeDllEntry(int reason)
Definition sdk_lifecycle.cc:6
void SymbianRuntimeWaitForAnyRequest()
Definition sdk_timer.cc:77
void SymbianRuntimePageSetNext(SymbianRuntimePageOwner *owner, SymbianRuntimePageOwner *next)
Definition sdk_pages.cc:82
int SymbianRuntimePageCreate(unsigned int bytes, SymbianRuntimePageOwner **owner, void **pages)
Definition sdk_pages.cc:21
int SymbianRuntimeAllocationCells()
Definition sdk_heap.cc:85
void SymbianRuntimeWakeSignal(SymbianRuntimeWakeState *state)
Definition sdk_timer.cc:105
void SymbianRuntimeCollectAllocations()
Definition sdk_heap.cc:89
int SymbianRuntimeTimerResult(const SymbianRuntimeTimerState *state)
Definition sdk_timer.cc:51
SymbianRuntimePageOwner * SymbianRuntimePageNext(SymbianRuntimePageOwner *owner)
Definition sdk_pages.cc:89
unsigned int SymbianRuntimeTickCount()
Definition sdk_clock.cc:8
int SymbianRuntimeWakeCreate(SymbianRuntimeWakeState **state)
Definition sdk_timer.cc:85
int SymbianRuntimeTimerCreate(SymbianRuntimeTimerState **state)
Definition sdk_timer.cc:11
int SymbianRuntimeTickPeriodMicros()
Definition sdk_clock.cc:12
void SymbianRuntimePropertyClose(SymbianRuntimePropertyState *state)
Definition sdk_property.cc:100
int SymbianRuntimeFastCounterFrequency()
Definition sdk_clock.cc:33
int SymbianRuntimePropertyResult(SymbianRuntimePropertyState *state, int *value)
Definition sdk_property.cc:73
int SymbianRuntimePageSize()
Definition sdk_pages.cc:12
int SymbianRuntimePropertySubscribe(SymbianRuntimePropertyState *state)
Definition sdk_property.cc:47
int SymbianRuntimePropertyCreate(int category, unsigned int key, SymbianRuntimePropertyState **state)
Definition sdk_property.cc:16
void SymbianRuntimeThreadCacheLeave()
Definition sdk_heap.cc:101
unsigned int SymbianRuntimeFastCounter()
Definition sdk_clock.cc:29
void SymbianRuntimeTimerClose(SymbianRuntimeTimerState *state)
Definition sdk_timer.cc:64
void SymbianRuntimeTimerCancel(SymbianRuntimeTimerState *state)
Definition sdk_timer.cc:45
void SymbianRuntimeFree(void *pointer)
Definition sdk_heap.cc:57
void SymbianRuntimeWakeClose(SymbianRuntimeWakeState *state)
Definition sdk_timer.cc:111
int SymbianRuntimePropertySet(SymbianRuntimePropertyState *state, int value)
Definition sdk_property.cc:60
int SymbianRuntimeTimerStart(SymbianRuntimeTimerState *state, int microseconds)
Definition sdk_timer.cc:31
void SymbianRuntimeRunFinalizers()
Definition lifecycle.cc:77
void SymbianRuntimePropertyCancel(SymbianRuntimePropertyState *state)
Definition sdk_property.cc:93
uint32_t size
Definition exports.cc:71
std::string_view bytes
Definition exports.cc:74
Definition sdk_pages.cc:6
SymbianRuntimePageOwner * next
Definition sdk_pages.cc:9
Definition sdk_property.cc:8
TUid category
Definition sdk_property.cc:11
TUint key
Definition sdk_property.cc:12
Definition sdk_timer.cc:5
Definition sdk_timer.cc:81
libusb_context * value
Definition usb.cc:35