3 /* process - GRAS process handling (common code for RL and SG) */
5 /* Authors: Martin Quinson */
6 /* Copyright (C) 2003,2004 da GRAS posse. */
8 /* This program is free software; you can redistribute it and/or modify it
9 under the terms of the license (GNU LGPL) which comes with this package. */
11 #include "xbt/sysdep.h"
13 #include "xbt/error.h"
14 #include "gras/transport.h"
15 #include "gras/datadesc.h"
16 #include "gras/messages.h"
18 #include "gras/Virtu/virtu_interface.h"
19 #include "gras/Msg/msg_interface.h" /* FIXME: Get rid of this cyclic */
21 GRAS_LOG_NEW_DEFAULT_SUBCATEGORY(process,gras,"Process manipulation code");
23 /* **************************************************************************
25 * **************************************************************************/
26 void *gras_userdata_get(void) {
27 gras_procdata_t *pd=gras_procdata_get();
31 void gras_userdata_set(void *ud) {
32 gras_procdata_t *pd=gras_procdata_get();
38 gras_procdata_init() {
39 gras_procdata_t *pd=gras_procdata_get();
41 pd->msg_queue = gras_dynar_new(sizeof(gras_msg_t), NULL);
42 pd->cbl_list = gras_dynar_new(sizeof(gras_cblist_t *),gras_cbl_free);
43 pd->sockets = gras_dynar_new(sizeof(gras_socket_t*), NULL);
47 gras_procdata_exit() {
48 gras_procdata_t *pd=gras_procdata_get();
50 gras_dynar_free(pd->msg_queue);
51 gras_dynar_free(pd->cbl_list);
52 gras_dynar_free(pd->sockets);
56 gras_socketset_get(void) {
57 return gras_procdata_get()->sockets;