[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Can sys_arch.c functions return ERR_* codes?
From: |
Grant Edwards |
Subject: |
[lwip-users] Can sys_arch.c functions return ERR_* codes? |
Date: |
Fri, 12 Nov 2021 15:24:32 -0000 (UTC) |
User-agent: |
slrn/1.0.3 (Linux) |
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? But I hate guessing. The previous authors of the code
I'm working on guessed a lot where the documentation was missing, and
it seems they usually guessed wrong...
<and so on...>
- [lwip-users] Can sys_arch.c functions return ERR_* codes?,
Grant Edwards <=