3 /* process_rl - GRAS process handling on real life */
5 /* Copyright (c) 2003, 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 "gras_modinter.h" /* module initialization interface */
11 #include "gras/Virtu/virtu_rl.h"
15 static gras_procdata_t *_gras_procdata = NULL;
16 XBT_PUBLIC_DATA(char const *) _gras_procname = NULL;
18 void gras_process_init() {
19 _gras_procdata=xbt_new0(gras_procdata_t,1);
22 void gras_process_exit() {
27 const char *xbt_procname(void) {
28 if(_gras_procname) return _gras_procname;
32 int gras_os_getpid(void) {
34 return (long int) GetCurrentProcess();
36 return (long int) getpid();
40 /* **************************************************************************
42 * **************************************************************************/
44 gras_procdata_t *gras_procdata_get(void) {
45 xbt_assert0(_gras_procdata,"Run gras_process_init (ie, gras_init)!");
47 return _gras_procdata;
50 void gras_agent_spawn(const char *name, void *data,
51 xbt_main_func_t code, int argc, char *argv[]) {