aboutsummaryrefslogtreecommitdiff
path: root/rpc_serial.c
AgeCommit message (Collapse)Author
2018-05-20Better hal_core_alloc() semantics, assert() and printf() cleanup.Rob Austein
Various fixes extracted from the abandoned(-for-now?) reuse-cores branch, principally: * Change hal_core_alloc*() to support core reuse and to pick the least-recently-used core of a particular type otherwise; * Replace assert() and printf() calls with hal_assert() and hal_log(), respectively. assert() is particularly useless on the HSM, since it sends its error message into hyperspace then hangs the HSM.
2016-08-16Lock RPC device after opening it.Rob Austein
Current design of the RPC protocol assumes that there is exactly one client speaking directly to the HSM via the RPC channel, whether that single client really is single or is a multiplexing daemon. PKCS #11 mutexes won't help here, so using flock(2) to grab an exclusive "advisory" lock on the RPC file descriptor is the simplest solution.
2016-07-06Previous "fix" to speed setting didn't compile on OSX.Rob Austein
2016-07-06Fix speed setting?Paul Selkirk
2016-07-01Apparently the magic Mac OS X ioctl(IOSSIOSPEED) must come AFTER the ↵Rob Austein
tcsetattr(). With this change, we appear to have working libhal client code on Mac OS X.
2016-06-30Start work to support client code on Mac OS X.Rob Austein
Includes preliminary support for the magic Mac-specific ioctl() to see line speed, but has not yet been tested, that's waiting for some supporting tweaks to the RPC code from Paul. Includes some general cleanup which isn't really specific to Mac OS X per se but which needed doing and which simplifies adding the Mac code.
2016-06-02Refactor serial and slip.Paul Selkirk