Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ham_en/ham/clientlib/ha_ConnectAttach.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ham_en/ham/clientlib/ha_ConnectAttach.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ham_en/ham/clientlib/ha_ConnectAttach.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ham_en/ham/clientlib/ha_ConnectAttach.html on line 8

ha_ConnectAttach(), ha_ConnectAttach_r()

Create a connection and attach it to the HA lib

Synopsis:

#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);

Library:

libha

Description:

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.

Returns:

The only difference between these functions is the way they indicate errors:

ha_ConnectAttach()
A connection ID that's used by the message primitives. If an error occurs, -1 is returned and errno is set.
ha_ConnectAttach_r()
A connection ID that's used by the message primitives. This function does NOT set errno. If an error occurs, the negative of a value from the errors returned by either the underlying ConnectAttach() call or the ha_attach() call.

Errors:

The ha_ConnectAttach|_r() call returns errors as returned by either the underlying ConnectAttach() call or the ha_attach() call.

Classification:

QNX Neutrino

Safety:
Cancellation point No
Interrupt handler No
Signal handler No
Thread Yes

See also:

ha_attach(), ha_close(), ha_ConnectAttach(), ha_creat(), ha_detach(), ha_open()

In the Library Reference: ConnectAttach()


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ham_en/ham/clientlib/ha_ConnectAttach.html on line 159

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ham_en/ham/clientlib/ha_ConnectAttach.html on line 159