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/neutrino/lib_ref/d/dispatch_create_channel.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/neutrino/lib_ref/d/dispatch_create_channel.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/neutrino/lib_ref/d/dispatch_create_channel.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/neutrino/lib_ref/d/dispatch_create_channel.html on line 8

dispatch_create_channel()

Allocate a dispatch handle, specifying a channel ID

Synopsis:

#include <sys/iofunc.h>
#include <sys/dispatch.h>

dispatch_t *dispatch_create_channel( int chid,
                                     unsigned reserved );

Arguments:

chid
The ID of the channel to use for the dispatch layer.
reserved
Reserved; specify 0 for this argument.

Library:

libc

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

Description:

The dispatch_create_channel() function allocates and initializes a dispatch handle. The attach functions are:

If you wish, you can do a resmgr_attach() with a NULL path. This has the effect of initializing dispatch to receive messages, among other things.

This function is similar to dispatch_create(), but lets you specify a channel for the dispatch to use. This lets you use name_attach() in a Photon application without causing any problems with Photon itself. It also lets you specify channel flags for name_attach().

This function is part of the dispatch layer of a resource manager. For more information, see Layers in a resource manager in the Bones of a Resource Manager chapter of Writing a Resource Manager.

Returns:

A handle to a dispatch structure, or NULL if an error occurs.


Note: The dispatch structure, dispatch_t, is an opaque data type; you can't access its contents directly.

Errors:

ENOMEM
Insufficient memory to allocate context.

Classification:

QNX Neutrino

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

See also:

ChannelCreate(), dispatch_block(), dispatch_context_alloc(), dispatch_create(), dispatch_destroy(), dispatch_handler(), dispatch_timeout(), dispatch_unblock() message_attach(), name_attach(), pulse_attach(), resmgr_attach(), select_attach()

Layers in a resource manager in the Bones of a Resource Manager chapter of Writing a Resource Manager

Resource Managers chapter of Getting Started with QNX Neutrino


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/neutrino/lib_ref/d/dispatch_create_channel.html on line 182

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/neutrino/lib_ref/d/dispatch_create_channel.html on line 182