Sun Microsystems Logo
Products and Services
 
Support and Training
 
 

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
 
Program Interfacecmm_notify_dispatch(3CMM)


NAME

 cmm_notify_dispatch - dispatch cluster membership change messages

SYNOPSIS

 
cc [ flag... ] file...  -lcgha_cmm  -lrt
 
#include <cmm.h>
cmm_error_t cmm_notify_dispatch( );

DESCRIPTION

The cmm_notify_dispatch() function processes a cluster membership change control message and invokes the appropriate callback function.

The process uses the select or poll commands to detect messages arriving from the nhcmmd daemon, with at least the file descriptor returned from the cmm_notify_getfd() function. When the file descriptor indicates that data must be read, the cmm_notify__dispatch() function is called, and the registered callback function is invoked from the same thread that calls the cmm_notify_dispatch() function.

If an error occurs on this file descriptor within poll() or if the file descriptor is no longer valid, CMM_EBADF is returned by cmm_notify_dispatch(). Then cmm_cmc_unregister(3CMM) must be called and the whole registration must be performed - including calling the cmm_cmc_register(3CMM), cmm_cmc_filter(3CMM) and cmm_notify_getfd() functions.

Note that one call to cmm_notify_dispatch() can lead to as many calls to the callback as there are pending notifications. If within this callback, some functions are invoked concerning the state of the cluster (for instance, to get the number of nodes), the result of the function refers to the state of the cluster when the function was invoked. It does not refer to the state of the cluster when the notification was generated. In the meantime, some other modifications could have been applied to the cluster.

RETURN VALUES

The cmm_notify_dispatch() function returns one of the following values:

CMM_EBADF

Bad file descriptor.

CMM_ENOENT

No callback is currently registered.

CMM_ENOTSUP

Unexpected service error. Cluster might be in a critical state.

CMM_OK

Operation succeeds.

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
ArchitectureSPARC
AvailabilitySUNWnhcmd
Interface StabilityEvolving
MT-LevelMT-Safe
Cancel-SafetyDeferred-Cancel-Safe Asynchronous-Cancel-Unsafe

SEE ALSO

Intro(3CMM), select(3c), poll(2), cmm_cmc_filter(3CMM), cmm_cmc_register(3CMM), cmm_cmc_unregister(3CMM), cmm_notify_getfd(3CMM)


Netra HAS FS 2.1Go To TopLast Changed September 2004