X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e5027d10e013486f32881c05c8c90463b1549250..9089ba6d1c093456af4b2ba8015599f94f39f797:/src/gras/DataDesc/datadesc_interface.h diff --git a/src/gras/DataDesc/datadesc_interface.h b/src/gras/DataDesc/datadesc_interface.h index 69fe2ab442..26c3ae8ceb 100644 --- a/src/gras/DataDesc/datadesc_interface.h +++ b/src/gras/DataDesc/datadesc_interface.h @@ -1,6 +1,8 @@ /* $Id$ */ -/* datadesc_interface - declarations visible within GRAS, but not public */ +/* datadesc - describing the data to exchange */ + +/* module's public interface exported within GRAS, but not to end user. */ /* Authors: Olivier Aumage, Martin Quinson */ /* Copyright (C) 2003, 2004 the GRAS posse. */ @@ -11,17 +13,34 @@ #ifndef GRAS_DATADESC_INTERFACE_H #define GRAS_DATADESC_INTERFACE_H -#include "gras_private.h" - void gras_datadesc_init(void); void gras_datadesc_exit(void); - -/* free a given ddt */ -void gras_ddt_free(gras_datadesc_type_t **type); - -/* declare in the given set */ -gras_error_t gras_ddt_register(gras_set_t *set, - gras_datadesc_type_t *type); - +gras_error_t gras_datadesc_by_id (long int code, + gras_datadesc_type_t **type); + +/* to debug */ +void gras_datadesc_type_dump(const gras_datadesc_type_t *ddt); +const char *gras_datadesc_arch_name(int code); + +/* compare two data type description */ +int +gras_datadesc_type_cmp(const gras_datadesc_type_t *d1, + const gras_datadesc_type_t *d2); + +/* Access function */ +int gras_datadesc_size(gras_datadesc_type_t *type); +/* Described data exchanges */ +gras_error_t +gras_datadesc_cpy(gras_datadesc_type_t *type, void *src, void **dst); +gras_error_t +gras_datadesc_send(gras_socket_t *sock, gras_datadesc_type_t *type, void *src); +gras_error_t +gras_datadesc_recv(gras_socket_t *sock, gras_datadesc_type_t *type, + int r_arch, void *dst); + +/* Indicate (lack of) interest in datatype */ +void gras_datadesc_ref(gras_datadesc_type_t *type); +void gras_datadesc_unref(gras_datadesc_type_t *type); + #endif /* GRAS_DATADESC_INTERFACE_H */