PebbleOS v4.47.0-635-gd62d3c7d4
Loading...
Searching...
No Matches

The thread the protocol runs on, provided by the application. More...

Functions

void pbl_pp_main_call (void(*fn)(void *data), void *data)
 Run a function on the main thread.
 
bool pbl_pp_main_is_current (void)
 Check whether the caller runs on the main thread.
 

Detailed Description

The thread the protocol runs on, provided by the application.

Transports send from it, and the handlers of the endpoints defined with PBL_PP_ENDPOINT_DEFINE_MAIN() run on it. It must not be the system work queue, where the other handlers run and may wait for the transport to make room.

Function Documentation

◆ pbl_pp_main_call()

void pbl_pp_main_call ( void(*)(void *data)  fn,
void *  data 
)

Run a function on the main thread.

Implemented by the application.

Calls run in the order they are made, and none may be dropped.

Parameters
fnFunction.
dataArgument of fn.

◆ pbl_pp_main_is_current()

bool pbl_pp_main_is_current ( void  )

Check whether the caller runs on the main thread.

Implemented by the application.

Returns
true on the main thread.