X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ff021a73f0cd26b2f27ca729783aa486393f9b3a..4952700bfa2cab452513cdad187994f1e17d7388:/src/amok/base.c diff --git a/src/amok/base.c b/src/amok/base.c index 8278bb62b5..fa3b09ee85 100644 --- a/src/amok/base.c +++ b/src/amok/base.c @@ -1,38 +1,29 @@ /* $Id$ */ -/* gras_addons - several addons to do specific stuff not in GRAS itself */ +/* base - several addons to do specific stuff not in GRAS itself */ -/* Authors: Martin Quinson */ -/* Copyright (C) 2003 the OURAGAN project. */ +/* Copyright (c) 2003, 2004 Martin Quinson. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it - under the terms of the license (GNU LGPL) which comes with this package. */ - -#include -#include - -#include - -void -grasRepportError (gras_sock_t *sock, gras_msgid_t id, int SeqCount, - const char *severeError, - gras_error_t errcode, const char* format,...) { - msgError_t *error; - va_list ap; - - if (!(error=(msgError_t*)malloc(sizeof(msgError_t)))) { - fprintf(stderr,severeError); - return; - } - - error->errcode=errcode; - va_start(ap,format); - vsprintf(error->errmsg,format,ap); - va_end(ap); - - /* FIXME: If message id have more than 17 sequences, the following won't work */ - if (gras_msg_new_and_send(sock,id,SeqCount, error,1,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0, - NULL,0,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0)) { - fprintf(stderr,severeError); - } + * under the terms of the license (GNU LGPL) which comes with this package. */ + +#include "gras.h" +#include "amok/base.h" + +XBT_LOG_NEW_SUBCATEGORY(amok,XBT_LOG_ROOT_CAT,"All AMOK categories"); + +void amok_base_init(void) { + gras_datadesc_type_t host_desc; + + /* Build the datatype descriptions */ + host_desc = gras_datadesc_struct("s_xbt_host_t"); + gras_datadesc_struct_append(host_desc,"name",gras_datadesc_by_name("string")); + gras_datadesc_struct_append(host_desc,"exp_size",gras_datadesc_by_name("int")); + gras_datadesc_struct_close(host_desc); + host_desc = gras_datadesc_ref("xbt_host_t",host_desc); } + +void amok_base_exit(void) { + /* FIXME: No real module mechanism in GRAS so far, nothing to do. */ +} +