Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
1cef5ad8f238efdd6dd7ebd3b1bb30fe821ae393
[simgrid.git] / include / gras / core.h
1 /* $Id$                     */
2
3 /* gras/core.h - Unsorted part of the GRAS public interface                 */
4
5 /* Copyright (c) 2003, 2004 Martin Quinson. All rights reserved.            */
6
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. */
9
10 #ifndef GRAS_CORE_H
11 #define GRAS_CORE_H
12
13 #include <stddef.h>    /* offsetof() */
14 #include <sys/types.h>  /* size_t */
15 #include <stdarg.h>
16
17
18 /*! C++ users need love */
19 #ifndef BEGIN_DECL
20 # ifdef __cplusplus
21 #  define BEGIN_DECL extern "C" {
22 # else
23 #  define BEGIN_DECL 
24 # endif
25 #endif
26
27 /*! C++ users need love */
28 #ifndef END_DECL
29 # ifdef __cplusplus
30 #  define END_DECL }
31 # else
32 #  define END_DECL 
33 # endif
34 #endif
35 /* End of cruft for C++ */
36
37 BEGIN_DECL
38
39 /* **************************************************************************
40  * Garbage collection support
41  * **************************************************************************/
42 typedef enum { free_after_use, free_never } e_xbt_free_directive_t;
43
44
45 /* **************************************************************************
46  * Wrappers over OS functions
47  * **************************************************************************/
48
49 /**
50  * gras_get_my_fqdn:
51  *
52  * Returns the fully-qualified name of the host machine, or NULL if the name
53  * cannot be determined.  Always returns the same value, so multiple calls
54  * cause no problems.
55  */
56 const char *
57 gras_get_my_fqdn(void);
58
59
60 END_DECL
61
62 #endif /* GRAS_CORE_H */
63