MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
Loading...
Searching...
No Matches
mln_wake Struct Reference

#include <wake.h>

Data Fields

mln_user_data_release release_user_data

Detailed Description

Receiver wake callback copied by a successful owning call. The callback schedules service by the receiver and returns without waiting for another thread.

Native code may invoke callback from any thread, and calls may coalesce or overlap. The callback must not wait for another thread, directly or through a host lock that the other thread holds while it calls this library.

A callback may call the owner's functions that return without waiting, such as one that drains its queue. On the graphics thread, a callback may also service its own caller-driver session inline. A service of that session that already runs further up the stack returns MLN_STATUS_BUSY, and the running service takes the new work. When several sessions share a graphics thread, the host schedules service after the callback returns to keep calls from nesting across sessions.

The callback may release a delivery queue that owns its wake. For every other owner, the callback must not destroy the object that owns the wake. Native code calls release_user_data after all callback invocations have returned. It may run on any thread that invoked callback and must not wait for another thread.

A descriptor whose callback is null disables waking, and a disabled wake must not carry release_user_data. When the owning API permits a disabled wake, the receiver services its queue or driver on its own schedule instead.

Field Documentation

◆ release_user_data

mln_user_data_release mln_wake::release_user_data

Optional. Releases user_data after all callback invocations have returned. A disabled wake leaves it null.


The documentation for this struct was generated from the following file: