eclipse-threadx/filex

Why the parameters order is different from memcpy?

Closed this issue · 1 comments

https://github.com/azure-rtos/filex/blob/3b203634dce8fc51e77ac67ec28d91d693c2c570/common/src/fx_utility_memory_copy.c#L83-L88

if the parameters are stored in registers, in runtime need to switch contents of registers which takes time. also it less readable because programmers are used to see the order as it in memcpy

I am not sure why the order is different, perhaps a poor design decision when this function was written. Unfortunately, we cannot change it now - we do not change/break these APIs once we release them.