Lossy ach_status_t / errno translations

4 views
Skip to first unread message

Neil T. Dantam

unread,
Jan 20, 2015, 11:24:46 PM1/20/15
to ach-...@googlegroups.com

There is currently some information loss in the translations between
ach's enum ach_status error codes which we gave in the userspace
library and errno values which we must use for error codes returned
from the kernel modules. For example, ACH_OVERFLOW returned within
the kernel module is converted to ERESTARTSYS (probably not right)
which is then converted by the userspace library to
ACH_FAILED_SYSCALL.

We can either (1) fixup the translations or (2) make the ach_status
codes aliases for suitable errno values. Some trade-offs:

1. Pro translating errno values:
- Aliasing errno values breaks the error bitmasks used for the C++
bindings

2. Pro aliasing errno values:
- Avoids the redundancy between ach_status and errno which
sometimes requires checking both the ach_status return code and
the errno variable

Comments?

Cheers,
-ntd
Reply all
Reply to author
Forward
0 new messages