ChannelCreateExt()

Create a communications channel (extended function)

Synopsis:

#include <sys/neutrino.h>

int ChannelCreateExt( unsigned flags,
                      mode_t mode,
                      size_t bufsize,
                      unsigned maxnumbuf,
                      const struct sigevent *ev,
                      struct _cred_info *cred );

Arguments:

flags
Flags that can be used to request notification pulses from the kernel or request other changes in behavior; a combination of the following (described in the entry for ChannelCreate()):

as well as _NTO_CHF_GLOBAL, which is described below.

mode
The permissions for the channel. For more information, see the entry for struct stat.
buffer_size
The size, in bytes, of each buffer used to store messages.
max_num_buffer
The maximum number of buffers to allocate, or 0 if you don't want the function to allocate any buffers.
ev
NULL, or a pointer to a sigevent structure that specifies an event that you want to be delivered when a message becomes available to be received on a previously empty queue.
struct _cred_info cred
NULL, or a pointer to a _cred_info structure that contains the user and group ID credentials.

Library:

libc

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

Description:

The ChannelCreateExt() kernel call creates a channel that can be used to receive messages and pulses. It's an extended version of ChannelCreate() that lets you specify addition information about the channel. Once created, the channel is owned by the process and isn't bound to the creating thread.

ChannelCreateExt() supports all the flags supported by ChannelCreate(), as well as the following:

_NTO_CHF_GLOBAL
Make the channel global. Any process can receive on a global channel.

Blocking states

This call doesn't block.

Returns:

The channel ID of the newly created channel, or -1 if an error occurred (errno is set).

Errors:

EAGAIN
All kernel channel objects are in use.
EPERM
The process tried to create a public channel without having the required permission; see procmgr_ability().

Classification:

QNX Neutrino

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