OpenMPI  0.1.1
keyval_parse.h File Reference
#include "opal_config.h"

Go to the source code of this file.

Functions

OPAL_DECLSPEC int opal_util_keyval_parse (const char *filename, opal_keyval_parse_fn_t callback)
 Parse filename, made up of key = value pairs. More...
 
OPAL_DECLSPEC int opal_util_keyval_parse_init (void)
 
OPAL_DECLSPEC int opal_util_keyval_parse_finalize (void)
 

Variables

BEGIN_C_DECLS typedef void(* opal_keyval_parse_fn_t )(const char *key, const char *value)
 Callback triggered for each key = value pair. More...
 

Function Documentation

OPAL_DECLSPEC int opal_util_keyval_parse ( const char *  filename,
opal_keyval_parse_fn_t  callback 
)

Parse filename, made up of key = value pairs.

Parse filename, made up of key = value pairs. For each line that appears to contain a key = value pair, callback will be called exactly once. In a multithreaded context, calls to opal_util_keyval_parse() will serialize multiple calls.

References OPAL_THREAD_LOCK, and OPAL_THREAD_UNLOCK.

Variable Documentation

BEGIN_C_DECLS typedef void(* opal_keyval_parse_fn_t)(const char *key, const char *value)

Callback triggered for each key = value pair.

Callback triggered from opal_util_keyval_parse for each key = value pair. Both key and value will be pointers into static buffers. The buffers must not be free()ed and contents may be overwritten immediately after the callback returns.