[Tinyos-devel] ENOMEM in TinyError.h
Miklos Maroti
mmaroti at math.u-szeged.hu
Tue May 6 09:46:12 PDT 2008
Hi All,
We should not increase the number of faulire codes, because then other
code need to be aware of more error codes, especially if intermediate
components blindly pass out internal errors to the caller. We already
need complicated error handling logic at certain places, and with more
error codes this just gets worse. So please try to use FAIL or ESIZE.
The real question should be: what actions do you think the caller is
going to do based on the return value. I can see the following usage
scenarios:
SUCCESS: memory was allocated
EBUSY: call me back shortly because I am busy, and then I will process
your request
ESIZE or FAIL: have no or too little memory, you should try to live with this
By the same token, I do not see the difference between EBUSY and
ERETRY: the user should do the same no?
Miklos
More information about the Tinyos-devel
mailing list