PebbleOS v4.47.0-512-g5285d4236
Loading...
Searching...
No Matches
task_wdt.h File Reference
#include <stdint.h>
#include <pbl/kernel/thread.h>

Data Structures

struct  pbl_task_wdt_stall
 Expired channels, as reported with pbl_task_wdt_stalled(). More...
 

Typedefs

typedef void *(* pbl_task_wdt_callback_t) (int channel_id, void *user_data)
 Callback of an expired channel.
 

Functions

void pbl_task_wdt_stalled (const struct pbl_task_wdt_stall *stall)
 Report expired channels.
 
void pbl_task_wdt_recovered (void)
 Report that the channels found expired have all been fed again.
 
void pbl_task_wdt_expired (void)
 Reset the system: channels stayed expired for the grace period.
 
void pbl_task_wdt_init (void)
 Start the watchdog thread.
 
int pbl_task_wdt_add (struct pbl_thread *thread, uint32_t timeout_ms, pbl_task_wdt_callback_t callback, void *user_data)
 Add a channel.
 
int pbl_task_wdt_delete (int channel_id)
 Delete a channel.
 
int pbl_task_wdt_feed (int channel_id)
 Feed a channel, restarting its timeout.
 
void pbl_task_wdt_feed_self (void)
 Feed the channels of the calling thread, if it has any.
 
void pbl_task_wdt_feed_thread (struct pbl_thread *thread)
 Feed the channels of a thread.
 
void pbl_task_wdt_feed_all (void)
 Feed every channel.
 
void pbl_task_wdt_set_waiting (bool waiting)
 Mark the calling thread as waiting for work, or as busy again.
 
int pbl_task_wdt_add_workq (struct pbl_workq *q, uint32_t timeout_ms, pbl_task_wdt_callback_t callback, void *user_data)
 Add a channel watching the thread of a work queue.
 
void pbl_task_wdt_suspend (uint32_t timeout_ms)
 Keep every channel fed for a while, for phases where stalls are expected.
 
void pbl_task_wdt_resume (void)
 End a suspension; every channel restarts with a full timeout.