3 /* gras/core.h - Unsorted part of the GRAS public interface */
5 /* Authors: Martin Quinson */
6 /* Copyright (C) 2003,2004 the OURAGAN project. */
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 #ifndef GRAS_PROCESS_H
12 #define GRAS_PROCESS_H
14 #include "xbt/misc.h" /* BEGIN_DECL */
18 /* **************************************************************************
19 * Initializing the processes
20 * **************************************************************************/
24 * Perform the various intialisations needed by gras. Each process must run it
26 xbt_error_t gras_process_init(void);
31 * Frees the memory allocated by gras. Processes should run it
33 xbt_error_t gras_process_exit(void);
35 /****************************************************************************/
36 /* Manipulating User Data */
37 /****************************************************************************/
41 * Get the data associated with the current process.
43 void *gras_userdata_get(void);
48 * Set the data associated with the current process.
50 void gras_userdata_set(void *ud);
55 * Malloc and set the data associated with the current process.
58 #define gras_userdata_new(type) (gras_userdata_set(gras_new0(type,1)),gras_userdata_get())
62 #endif /* GRAS_PROCESS_H */