Added C APIs for tasks which return values.