Adjustments and high scores were resetting to factory defaults on every powerup, because the new checksum wasn't being stored correctly. This only affects the WPC builds where memory protection is used.
Eliminate retry loop. Let the device subsystem manage retries by itself. Just queue up the right number of kicks, and do 'trough rescue' if the trough doesn't have enough balls in it. All error handling is done elsewhere. Therefore, no separate task needs to be spawned either.
When one of these 3 things happens: - a kick request is delayed - a kickout lock is held (similar) - trough count abruptly changes at end of update then we restart update, but there is no need to wait for the switch settle delay (since no switch activity necessarily happened). A small delay of 50ms is inserted just to keep the scheduler happy. This gets rid of some unnecessary delay when these things happen for a brief time.
Lamps from previous leffs were still being shown after the leff had ended.
The GCC_CROSS setting in the platform file enables this.
The major change is to refactor the things in common between the different task implementations (pth, pthread) into a new, "native task" module (ntask.c), so that the existing files only have the thread-specific functions. This also will enable new task libraries to be added much more easily, as fewer functions need to be written.
Add aux_task_create(), aux_task_delete() functions for this. With this, the pth/pthreads implementation files are about as simple as they can be.
This is because it will call task_getpid() to set the first PID in the table. getpid() may return undefined results if it is called prior to low-level init.
Rewrite many functions in terms of this aux_task_find_pid(), which reduces total complexity of the pth/pthread files.
ntask.c is the home for common, native task support. pth.c and pthread.c will host any differences depending on the thread library to be used. More separation is possible, but this is the first step.
Don't automatically try to pull in pth. Use the configuration option for CONFIG_PTH to add these.
There is some commonality between pth and pthreads implementations that can be shared.
task.h was getting too complicated to understand, so copy it and strip out all the non-native stuff. This will make changes to it easier. Likewise, remove all the native stuff from the original file.
Although there is no such page, some other functions/macros expect a page so this allows one to be provided in all cases. Ref: b9ab9b4
It had two values in it; 'include' was added, because we were grepping for that string but not removing it afterwards. Now we use awk to pull the value more efficiently. This may have been causing unnecessary rebuilds if the 'include' directory had its time updated. With this change, the MACHINE_FILE setting is also ignored, and defaults to the machine name plus the .md extension.