Am 12.11.2021 um 16:24 schrieb Grant Edwards:
Are the various sys_arch.c functions allowed to return error codes
other than those specifically listed in the documentation?

For many of them, only 0 and one other value (e.g. SYS_ARCH_TIMEOUT or
ERR_MEM) are documented as return values. The underlying OS operations
usually have far more that two possible outcomes.  Is it appropriate
to return ERR_* values other than those documented?

Is sys_mbox_trypost() allowed to return errors other than ERR_MEM?
For example, can I return ERR_ARG from sys_arch_mbox_trypost() if one
of the arguments is illegal?

Is sys_arch_mbox_fetch() allowed to return error codes other than
SYS_ARCH_TIMEOUT?

Were I to _guess_, I would assume that functions returning err_t can
return any error codes they want, but functions returning millisecond
counts can't?

You're right with your guess. Although I would have thought the
documentation is clear here, so there would be no need to guess...

Feel free to provide a patch updating the documentation if you think it
needs improvement!

Regards,
Simon

_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to