Create a connection and attach it to the HA lib
#include <ha/neutrino.h> int ha_ConnectAttach(_Uint32t *nd, pid_t pid, int chid, unsigned index, unsigned flags, RFp rfn, void *rhdl, unsigned haflags); int ha_ConnectAttach_r(_Uint32t *nd, pid_t pid, int chid, unsigned index, unsigned flags, RFp rfn, void *rhdl, unsigned haflags);
libha
The ha_ConnectAttach() and ha_ConnectDetach_r() functions are identical except in the way they return errors. (For details, see the “Returns” section.)
In addition to creating the connection using the standard ConnectAttach|_r() call, these convenience functions also call ha_attach() with the connection returned by the ConnectAttach() call.
The parameters rfn(), and rhdl(), and haflags() are passed to the ha_attach() call along with the connection ID returned by the ConnectAttach() call.
The remaining parameters are passed to the corresponding parameters in the ConnectAttach() call in their appropriate positions.
The only difference between these functions is the way they indicate errors:
The ha_ConnectAttach|_r() call returns errors as returned by either the underlying ConnectAttach() call or the ha_attach() call.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |
ha_attach(), ha_close(), ha_ConnectAttach(), ha_creat(), ha_detach(), ha_open()
In the Library Reference: ConnectAttach()