- It was using the value of mr->[link]->value.constantStr and mr->[link]->value.pv_link.pvname without checking the link types.
This was incorrect, and led to errors because constantStr no longer has a defined value if the link type is not CONSTANT.
Changed so that it only accesses these union fields if the link is the correct type.
- It did not check if pv_link.pvname was NULL before calling CA functions, though now that we check the link type perhaps this cannot occur.
- It did not lock the motor record before accessing the fields.
- Added Debug calls to show the link types and values.
call ca_task_exit() unless it is ending the task.
Do not use epicsThreadSuspendSelf(), but instead wait on an event, in
soft_motor_task() and motorUtil_task(), to avoid suspended threads.