Could someone please help me with some code and how to implement it. I am new to it and I do not know if it is Python, Swift etc.
The code I found on a search is to disable watchdog which is a kernel panic that tells the computer that this program is taking too long to load lets make it non-responsive. It does this a lot with one specific program I have. Also must I get software to run it or what? You can tell I am new to it. Please help.
The code is:
void taskN_handler()
{
watchdog *wd = watchdog_create(100); /* Create an simulated watchdog with timeout of 100 ms */
/* Do init */
while (task1_should_run)
{
watchdog_feed(wd); /* feed it */
/* do stuff */
}
watchdog_destroy(wd); /* destroy when no longer necessary */
}
void watchdog_task_handler()
{
int i;
bool feed_flag = true;
while(1)
{
/* Check if any simulated watchdog has timeout */
for (i = 0; i < getNOfEnabledWatchdogs(); i++)
{
if (watchogHasTimeout(i)) {
feed_flag = false;
break;
}
}
if (feed_flag)
WatchdogFeedTheHardware();
task_sleep(10);
So that is the code if I learn how to use this, in future I can help myself.
Thank you kindly.
Stephen Mannheim
The code I found on a search is to disable watchdog which is a kernel panic that tells the computer that this program is taking too long to load lets make it non-responsive. It does this a lot with one specific program I have. Also must I get software to run it or what? You can tell I am new to it. Please help.
The code is:
void taskN_handler()
{
watchdog *wd = watchdog_create(100); /* Create an simulated watchdog with timeout of 100 ms */
/* Do init */
while (task1_should_run)
{
watchdog_feed(wd); /* feed it */
/* do stuff */
}
watchdog_destroy(wd); /* destroy when no longer necessary */
}
void watchdog_task_handler()
{
int i;
bool feed_flag = true;
while(1)
{
/* Check if any simulated watchdog has timeout */
for (i = 0; i < getNOfEnabledWatchdogs(); i++)
{
if (watchogHasTimeout(i)) {
feed_flag = false;
break;
}
}
if (feed_flag)
WatchdogFeedTheHardware();
task_sleep(10);
So that is the code if I learn how to use this, in future I can help myself.
Thank you kindly.
Stephen Mannheim