[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Can sys_arch.c functions return ERR_* codes?

From: address@hidden
Subject: Re: [lwip-users] Can sys_arch.c functions return ERR_* codes?
Date: Fri, 12 Nov 2021 22:01:28 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0

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

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!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]