Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

_resmgr_ocb()

Retrieve an Open Control Block

Synopsis:

#include <sys/resmgr.h>

void * _resmgr_ocb( resmgr_context_t * ctp, 
                    struct _msg_info * info);

Arguments:

ctp
A pointer to a resmgr_context_t structure that the resource-manager library uses to pass context information between functions.

Note that ctp actually contains info.

info
A pointer to a _msg_info structure that indicates which client mapping you want to retrieve information about. To fill in the structure, call MsgInfo().

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The _resmgr_ocb() function queries the internal resource manager database, which maps client connections to the server Open Control Block (OCB), to retrieve the OCB pointer that was previously bound using resmgr_open_bind().

Returns:

A pointer to the OCB for the matching binding, or NULL if the binding can't be found or an error occurred.

The OCB can be a structure that you define. By default, it's of type iofunc_ocb_t.

Errors:

ESRCH
The connection can't be located in the resource manager table.
ENOMEM
There isn't enough memory available for the operation.
EINVAL
Invalid arguments were used.

Classification:

QNX Neutrino

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

See also:

iofunc_ocb_t, _msg_info, MsgInfo(), resmgr_iofuncs(), resmgr_open_bind(), resmgr_unbind()