1
1
This commit was SVN r1290.
Этот коммит содержится в:
Graham Fagg 2004-06-15 23:31:37 +00:00
родитель c0c70e626a
Коммит 6ee86470e0
2 изменённых файлов: 31 добавлений и 1 удалений

Просмотреть файл

@ -15,7 +15,7 @@ headers = \
mca_base_module_exchange.h \
mca_base_param.h \
mca_base_msgbuf.h \
mca_base_msgbuf_internal.h
mca_base_msgbuf_internal.h
# Library

Просмотреть файл

@ -10,6 +10,20 @@
#include "mca/base/mca_base_msgbuf_internal.h"
/*
* local prototypes
*/
int mca_base_msgbuf_init (void);
/*
* local variables
*/
static bool initialized = false;
/* blank prototypes for now that return unimplemented */
@ -19,6 +33,7 @@
/* Giving a req size just makes it more memory efficient. */
mca_base_msgbuf_t mca_base_msgbuf_new (size_t reqsize)
{
if (!initialized) mca_base_msgbuf_init ();
return ((mca_base_msgbuf_t)OMPI_ERR_NOT_SUPPORTED);
}
@ -28,6 +43,7 @@ mca_base_msgbuf_t mca_base_msgbuf_new (size_t reqsize)
mca_base_msgbuf_t mca_base_msgbuf_copy (mca_base_msgbuf_t* copybufid,
mca_base_msgbuf_t orgbufid)
{
if (!initialized) mca_base_msgbuf_init ();
return ((mca_base_msgbuf_t)OMPI_ERR_NOT_SUPPORTED);
}
@ -36,12 +52,14 @@ mca_base_msgbuf_t mca_base_msgbuf_copy (mca_base_msgbuf_t* copybufid,
/* a free on this special buffer just frees its structure not the memory */
mca_base_msgbuf_t mca_base_msgbuf_construct (void* ptr, size_t datasize)
{
if (!initialized) mca_base_msgbuf_init ();
return ((mca_base_msgbuf_t)OMPI_ERR_NOT_SUPPORTED);
}
/* explicit free of a buffer when not auto freeing them */
int mca_base_msgbuf_free (mca_base_msgbuf_t bufid)
{
if (!initialized) mca_base_msgbuf_init ();
return OMPI_ERR_NOT_SUPPORTED;
}
@ -49,12 +67,14 @@ int mca_base_msgbuf_free (mca_base_msgbuf_t bufid)
int mca_base_msgbuf_pack (mca_base_msgbuf_t bufid, void* ptr, size_t num_items,
mca_base_msgbuf_data_t datatype)
{
if (!initialized) mca_base_msgbuf_init ();
return OMPI_ERR_NOT_SUPPORTED;
}
int mca_base_msgbuf_unpack (mca_base_msgbuf_t bufid, void* ptr,
size_t num_items, mca_base_msgbuf_data_t datatype)
{
if (!initialized) mca_base_msgbuf_init ();
return OMPI_ERR_NOT_SUPPORTED;
}
@ -62,12 +82,22 @@ int mca_base_msgbuf_unpack (mca_base_msgbuf_t bufid, void* ptr,
/* note this takes NULL terminated strings and returns null terminated strings */
int mca_base_msgbuf_pack_string (mca_base_msgbuf_t bufid, char* strptr)
{
if (!initialized) mca_base_msgbuf_init ();
return OMPI_ERR_NOT_SUPPORTED;
}
int mca_base_msgbuf_unpack_string (mca_base_msgbuf_t bufid, char* strptr,
size_t maxlen)
{
if (!initialized) mca_base_msgbuf_init ();
return OMPI_ERR_NOT_SUPPORTED;
}
/* private functions just inside this code */
int mca_base_msgbuf_init ()
{
if (initialized) return (0);
}