BSB Developer Docs
Loading...
Searching...
No Matches
Loader application priority

Macros

#define LOADER_MAX_PRIORITY   100
 
#define LOADER_DEFAULT_APP_PRIORITY   10
 
#define LOADER_MAX_APP_PRIORITY   90
 
#define LOADER_STUB_APP_PRIORITY   0
 
#define LOADER_PASSTHROUGH_PRIORITY   (LOADER_DEFAULT_APP_PRIORITY - 1)
 
#define LOADER_BLOCKING_PRIORITY   (LOADER_MAX_PRIORITY + 1)
 

Detailed Description

The loader tracks a "priority" for the currently running application. The canvas HTTP API (POST /api/display/draw) uses this value to decide whether an incoming draw request is allowed to update the display.

Priority scale: STUB (0) – never gates draws; any draw priority beats it. PASSTHROUGH (9) – threshold that admits draws at ≥ DEFAULT (10); canvas empty-canvas check uses strict-less-than. DEFAULT (10) – set on app start; minimum priority for useful draws. MAX_APP (90) – maximum value accepted by loader_set_priority(). MAX / CANVAS_MAX (100) – HTTP API ceiling; values above → 400. BLOCKING (101) – above API ceiling; all HTTP draws rejected.

Note
Only the thread that owns the currently running app may call loader_set_priority(); the loader verifies the caller's app-id.