3 /* process - GRAS process handling (common code for RL and SG) */
5 /* Copyright (c) 2004 Martin Quinson. All rights reserved. */
7 /* This program is free software; you can redistribute it and/or modify it
8 * under the terms of the license (GNU LGPL) which comes with this package. */
10 #include "xbt/sysdep.h"
12 #include "xbt/error.h"
13 #include "gras/transport.h"
14 #include "gras/datadesc.h"
15 #include "gras/messages.h"
17 #include "gras/Virtu/virtu_interface.h"
18 #include "gras/Msg/msg_interface.h" /* FIXME: Get rid of this cyclic */
20 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(process,gras,"Process manipulation code");
22 /* **************************************************************************
24 * **************************************************************************/
25 void *gras_userdata_get(void) {
26 gras_procdata_t *pd=gras_procdata_get();
30 void gras_userdata_set(void *ud) {
31 gras_procdata_t *pd=gras_procdata_get();
37 gras_procdata_init() {
38 gras_procdata_t *pd=gras_procdata_get();
40 pd->msg_queue = xbt_dynar_new(sizeof(gras_msg_t), NULL);
41 pd->cbl_list = xbt_dynar_new(sizeof(gras_cblist_t *),gras_cbl_free);
42 pd->sockets = xbt_dynar_new(sizeof(gras_socket_t*), NULL);
46 gras_procdata_exit() {
47 gras_procdata_t *pd=gras_procdata_get();
49 xbt_dynar_free(&( pd->msg_queue ));
50 xbt_dynar_free(&( pd->cbl_list ));
51 xbt_dynar_free(&( pd->sockets ));
55 gras_socketset_get(void) {
56 return gras_procdata_get()->sockets;