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

#include <render_target.h>

Data Fields

mln_user_data_release release_user_data

Detailed Description

Host lock on the graphics queue that a session shares with its host, copied by a successful attach.

Vulkan requires the host to synchronize every call that uses a queue. A Vulkan session submits to the context's graphics_queue. A host that also uses that queue must pass a lock here and take the same lock around its own queue calls. The callbacks may run on the graphics thread or the thread that abandons the session. Each queue submission or presentation holds the lock only for that call, never across a wait.

Both callbacks are null to disable the lock, or both are set. A disabled lock must not carry release_user_data. A session without a lock assumes that the host leaves the queue alone while the session is attached.

The callbacks must not call the C API; each status-returning function returns MLN_STATUS_INVALID_STATE when a callback calls it. The host must not hold the lock while calling the C API or waiting on a thread that does. Sessions sharing a queue must use the same host mutex.

Native code calls release_user_data once, after the session can no longer invoke the callbacks.

Field Documentation

◆ release_user_data

mln_user_data_release mln_queue_lock::release_user_data

Optional. Releases user_data once, after all callback invocations have returned and the session can no longer invoke the callbacks. A disabled lock leaves it null.


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