summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7cf1204)
They are not exported and can avoid the GOT and PLT indirections.
+#ifdef __ELF__
+#define XBT_PRIVATE __attribute__((visibility("hidden")))
+#else
+#define XBT_PRIVATE
+#endif
+
#ifdef _MSC_VER /* MSVC has no ssize_t, and I fail to use the SSIZE_T declared in BaseTsd.h */
#if defined(_WIN64)
typedef __int64 ssize_t;
#ifdef _MSC_VER /* MSVC has no ssize_t, and I fail to use the SSIZE_T declared in BaseTsd.h */
#if defined(_WIN64)
typedef __int64 ssize_t;
#define SIMGRID_PORTABLE_H
#include "internal_config.h"
#define SIMGRID_PORTABLE_H
#include "internal_config.h"
#include "xbt/misc.h"
#ifdef _XBT_WIN32
# include <windows.h>
#include "xbt/misc.h"
#ifdef _XBT_WIN32
# include <windows.h>
/* use internal functions when OS provided ones are borken */
#if defined(HAVE_SNPRINTF) && defined(PREFER_PORTABLE_SNPRINTF)
/* use internal functions when OS provided ones are borken */
#if defined(HAVE_SNPRINTF) && defined(PREFER_PORTABLE_SNPRINTF)
-extern int portable_snprintf(char *str, size_t str_m, const char *fmt,
+XBT_PRIVATE int portable_snprintf(char *str, size_t str_m, const char *fmt,
-extern int portable_vsnprintf(char *str, size_t str_m, const char *fmt,
+XBT_PRIVATE int portable_vsnprintf(char *str, size_t str_m, const char *fmt,
va_list ap);
#define snprintf portable_snprintf
#define vsnprintf portable_vsnprintf
va_list ap);
#define snprintf portable_snprintf
#define vsnprintf portable_vsnprintf
#ifndef _XBT_DICT_PRIVATE_H__
#define _XBT_DICT_PRIVATE_H__
#ifndef _XBT_DICT_PRIVATE_H__
#define _XBT_DICT_PRIVATE_H__
#include "xbt/sysdep.h"
#include "xbt/log.h"
#include "xbt/ex.h"
#include "xbt/sysdep.h"
#include "xbt/log.h"
#include "xbt/ex.h"
typedef struct s_xbt_dict_cursor s_xbt_dict_cursor_t;
typedef struct s_xbt_dict_cursor s_xbt_dict_cursor_t;
-extern xbt_mallocator_t dict_elm_mallocator;
-extern void *dict_elm_mallocator_new_f(void);
+extern XBT_PRIVATE xbt_mallocator_t dict_elm_mallocator;
+XBT_PRIVATE void * dict_elm_mallocator_new_f(void);
#define dict_elm_mallocator_free_f xbt_free_f
#define dict_elm_mallocator_reset_f ((void_f_pvoid_t)NULL)
#define dict_elm_mallocator_free_f xbt_free_f
#define dict_elm_mallocator_reset_f ((void_f_pvoid_t)NULL)
-extern xbt_mallocator_t dict_het_elm_mallocator;
-extern void *dict_het_elm_mallocator_new_f(void);
+extern XBT_PRIVATE xbt_mallocator_t dict_het_elm_mallocator;
+extern XBT_PRIVATE void * dict_het_elm_mallocator_new_f(void);
#define dict_het_elm_mallocator_free_f xbt_free_f
#define dict_het_elm_mallocator_reset_f ((void_f_pvoid_t)NULL)
/*####[ Function prototypes ]################################################*/
#define dict_het_elm_mallocator_free_f xbt_free_f
#define dict_het_elm_mallocator_reset_f ((void_f_pvoid_t)NULL)
/*####[ Function prototypes ]################################################*/
-xbt_dictelm_t xbt_dictelm_new(xbt_dict_t dict, const char *key, int key_len,
+XBT_PRIVATE xbt_dictelm_t xbt_dictelm_new(xbt_dict_t dict, const char *key, int key_len,
unsigned int hash_code, void *content,
void_f_pvoid_t free_f);
unsigned int hash_code, void *content,
void_f_pvoid_t free_f);
-void xbt_dictelm_free(xbt_dict_t dict, xbt_dictelm_t element);
-void xbt_dictelm_set_data(xbt_dict_t dict, xbt_dictelm_t element,
+XBT_PRIVATE void xbt_dictelm_free(xbt_dict_t dict, xbt_dictelm_t element);
+XBT_PRIVATE void xbt_dictelm_set_data(xbt_dict_t dict, xbt_dictelm_t element,
void *data, void_f_pvoid_t free_ctn);
#endif /* _XBT_DICT_PRIVATE_H_ */
void *data, void_f_pvoid_t free_ctn);
#endif /* _XBT_DICT_PRIVATE_H_ */
#ifndef _XBT_EX_INTERFACE_H_
#define _XBT_EX_INTERFACE_H_
#ifndef _XBT_EX_INTERFACE_H_
#define _XBT_EX_INTERFACE_H_
#include "xbt/ex.h"
/* Change raw libc symbols to file names and line numbers */
#include "xbt/ex.h"
/* Change raw libc symbols to file names and line numbers */
-void xbt_ex_setup_backtrace(xbt_ex_t * e);
+XBT_PRIVATE void xbt_ex_setup_backtrace(xbt_ex_t * e);
#endif /* _XBT_EX_INTERFACE_H_ */
#endif /* _XBT_EX_INTERFACE_H_ */
#ifndef _XBT_GRAPH_PRIVATE_H
#define _XBT_GRAPH_PRIVATE_H
#ifndef _XBT_GRAPH_PRIVATE_H
#define _XBT_GRAPH_PRIVATE_H
#include "xbt/dynar.h"
#include "xbt/graph.h"
#include "xbt/dynar.h"
#include "xbt/graph.h"
#define CURRENTLY_EXPLORING 1
#define ALREADY_EXPLORED 2
#define CURRENTLY_EXPLORING 1
#define ALREADY_EXPLORED 2
-void xbt_floyd_algorithm(xbt_graph_t g, double *adj, double *d,
+XBT_PRIVATE void xbt_floyd_algorithm(xbt_graph_t g, double *adj, double *d,
-void xbt_graph_depth_visit(xbt_graph_t g, xbt_node_t n,
+XBT_PRIVATE void xbt_graph_depth_visit(xbt_graph_t g, xbt_node_t n,
xbt_node_t * sorted, int *idx);
#endif /* _XBT_GRAPH_PRIVATE_H */
xbt_node_t * sorted, int *idx);
#endif /* _XBT_GRAPH_PRIVATE_H */
#ifndef __MMPRIVATE_H
#define __MMPRIVATE_H 1
#ifndef __MMPRIVATE_H
#define __MMPRIVATE_H 1
#include <xbt/misc.h>
#include "portable.h"
#include <xbt/misc.h>
#include "portable.h"
-void mmcheck(xbt_mheap_t heap);
+XBT_PRIVATE void mmcheck(xbt_mheap_t heap);
-int malloc_use_mmalloc(void);
+XBT_PRIVATE int malloc_use_mmalloc(void);
-int mmalloc_exec_using_mm(int argc, const char** argv);
-void mmalloc_ensure_using_mm(int argc, const char** argv);
+XBT_PRIVATE int mmalloc_exec_using_mm(int argc, const char** argv);
+XBT_PRIVATE void mmalloc_ensure_using_mm(int argc, const char** argv);
-size_t mmalloc_get_bytes_used_remote(size_t heaplimit, const malloc_info* heapinfo);
+XBT_PRIVATE size_t mmalloc_get_bytes_used_remote(size_t heaplimit, const malloc_info* heapinfo);
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "xbt/dict.h"
#include "xbt/dynar.h"
#include "xbt/setset.h"
#include "xbt/dict.h"
#include "xbt/dynar.h"
#include "xbt/setset.h"
/* Some internal functions */
/* Some internal functions */
+XBT_PRIVATE int bitcount(int);
/* Get the object associated to a given index */
/* Get the object associated to a given index */
-void *_xbt_setset_idx_to_obj(xbt_setset_t setset, unsigned long idx);
+XBT_PRIVATE void *_xbt_setset_idx_to_obj(xbt_setset_t setset, unsigned long idx);
/* Check if the nth bit of an integer is set or not*/
/* Check if the nth bit of an integer is set or not*/
-unsigned int _is_bit_set(unsigned int bit, unsigned int integer);
+XBT_PRIVATE unsigned int _is_bit_set(unsigned int bit, unsigned int integer);
/* Set the nth bit of an array of integers */
/* Set the nth bit of an array of integers */
-void _set_bit(unsigned int bit, unsigned int *bitmap);
+XBT_PRIVATE void _set_bit(unsigned int bit, unsigned int *bitmap);
/* Unset the nth bit of an array of integers */
/* Unset the nth bit of an array of integers */
-void _unset_bit(unsigned int bit, unsigned int *bitmap);
+XBT_PRIVATE void _unset_bit(unsigned int bit, unsigned int *bitmap);