浏览代码

Set visibility of internal functions to hidden by default

Except the few ones that we happen to use in libstarpu-mpi or in
tests/examples
Samuel Thibault 4 年之前
父节点
当前提交
3e3954171f
共有 78 个文件被更改,包括 399 次插入72 次删除
  1. 21 3
      include/starpu_util.h
  2. 4 0
      src/common/barrier.h
  3. 5 0
      src/common/barrier_counter.h
  4. 14 7
      src/common/fxt.h
  5. 4 0
      src/common/graph.h
  6. 4 0
      src/common/knobs.h
  7. 4 0
      src/common/rwlock.h
  8. 4 0
      src/common/starpu_spinlock.h
  9. 6 2
      src/common/thread.h
  10. 5 1
      src/common/timing.h
  11. 4 0
      src/common/uthash.h
  12. 7 3
      src/common/utils.h
  13. 4 0
      src/core/combined_workers.h
  14. 4 0
      src/core/debug.h
  15. 4 0
      src/core/dependencies/cg.h
  16. 4 0
      src/core/dependencies/data_concurrency.h
  17. 6 1
      src/core/dependencies/implicit_data_deps.h
  18. 4 0
      src/core/dependencies/tags.h
  19. 5 0
      src/core/detect_combined_workers.h
  20. 4 0
      src/core/disk.h
  21. 5 0
      src/core/disk_ops/unistd/disk_unistd_global.h
  22. 4 0
      src/core/drivers.h
  23. 4 0
      src/core/errorcheck.h
  24. 4 0
      src/core/idle_hook.h
  25. 4 0
      src/core/jobs.h
  26. 4 0
      src/core/perfmodel/multiple_regression.h
  27. 7 3
      src/core/perfmodel/perfmodel.h
  28. 4 0
      src/core/perfmodel/regression.h
  29. 4 0
      src/core/progress_hook.h
  30. 5 0
      src/core/sched_ctx.h
  31. 25 21
      src/core/sched_ctx_list.h
  32. 6 2
      src/core/sched_policy.h
  33. 4 0
      src/core/simgrid.h
  34. 3 0
      src/core/task.h
  35. 4 0
      src/core/task_bundle.h
  36. 6 2
      src/core/topology.h
  37. 4 4
      src/core/workers.c
  38. 10 6
      src/core/workers.h
  39. 5 1
      src/datawizard/coherency.h
  40. 4 0
      src/datawizard/copy_driver.h
  41. 5 0
      src/datawizard/data_request.h
  42. 4 0
      src/datawizard/datastats.h
  43. 3 0
      src/datawizard/datawizard.h
  44. 5 0
      src/datawizard/filters.h
  45. 4 0
      src/datawizard/footprint.h
  46. 12 11
      src/datawizard/interfaces/data_interface.h
  47. 5 0
      src/datawizard/malloc.h
  48. 4 0
      src/datawizard/memalloc.h
  49. 4 0
      src/datawizard/memory_manager.h
  50. 4 0
      src/datawizard/memory_nodes.h
  51. 4 0
      src/datawizard/memstats.h
  52. 4 0
      src/datawizard/node_ops.h
  53. 4 0
      src/datawizard/sort_data_handles.h
  54. 4 0
      src/datawizard/write_back.h
  55. 6 2
      src/debug/starpu_debug_helpers.h
  56. 4 0
      src/debug/traces/starpu_fxt.h
  57. 4 0
      src/drivers/cpu/driver_cpu.h
  58. 4 0
      src/drivers/cuda/driver_cuda.h
  59. 4 0
      src/drivers/disk/driver_disk.h
  60. 5 0
      src/drivers/driver_common/driver_common.h
  61. 4 0
      src/drivers/mp_common/mp_common.h
  62. 4 1
      src/drivers/mp_common/sink_common.h
  63. 4 0
      src/drivers/mp_common/source_common.h
  64. 4 0
      src/drivers/mpi/driver_mpi_common.h
  65. 4 0
      src/drivers/mpi/driver_mpi_sink.h
  66. 4 0
      src/drivers/mpi/driver_mpi_source.h
  67. 4 0
      src/drivers/opencl/driver_opencl.h
  68. 4 0
      src/drivers/opencl/driver_opencl_utils.h
  69. 4 0
      src/profiling/bound.h
  70. 4 0
      src/profiling/profiling.h
  71. 4 0
      src/sched_policies/fifo_queues.h
  72. 4 0
      src/sched_policies/helper_mct.h
  73. 4 0
      src/sched_policies/prio_deque.h
  74. 3 0
      src/sched_policies/sched_component.h
  75. 4 0
      src/util/openmp_runtime_support.h
  76. 4 0
      src/util/starpu_clusters_create.h
  77. 4 0
      src/util/starpu_data_cpy.h
  78. 6 2
      src/util/starpu_task_insert_utils.h

+ 21 - 3
include/starpu_util.h

@@ -95,12 +95,30 @@ extern "C"
 #endif
 
 /**
-   When building with a GNU C Compiler, defined to __attribute__((visibility ("internal")))
+   When building with a GNU C Compiler, defined to __attribute__((visibility ("default")))
 */
 #ifdef __GNUC__
-#  define STARPU_ATTRIBUTE_INTERNAL      __attribute__ ((visibility ("internal")))
+#  define STARPU_ATTRIBUTE_VISIBILITY_DEFAULT      __attribute__ ((visibility ("default")))
 #else
-#  define STARPU_ATTRIBUTE_INTERNAL
+#  define STARPU_ATTRIBUTE_VISIBILITY_DEFAULT
+#endif
+
+/**
+   When building with a GNU C Compiler, defined to #pragma GCC visibility push(hidden)
+*/
+#ifdef __GNUC__
+#  define STARPU_VISIBILITY_PUSH_HIDDEN      #pragma GCC visibility push(hidden)
+#else
+#  define STARPU_VISIBILITY_PUSH_HIDDEN
+#endif
+
+/**
+   When building with a GNU C Compiler, defined to #pragma GCC visibility pop
+*/
+#ifdef __GNUC__
+#  define STARPU_VISIBILITY_POP      #pragma GCC visibility pop
+#else
+#  define STARPU_VISIBILITY_POP
 #endif
 
 /**

+ 4 - 0
src/common/barrier.h

@@ -19,6 +19,8 @@
 
 #include <starpu_thread.h>
 
+#pragma GCC visibility push(hidden)
+
 /** @file */
 
 struct _starpu_barrier
@@ -38,4 +40,6 @@ int _starpu_barrier_destroy(struct _starpu_barrier *barrier);
 
 int _starpu_barrier_wait(struct _starpu_barrier *barrier);
 
+#pragma GCC visibility pop
+
 #endif // __COMMON_BARRIER_H__

+ 5 - 0
src/common/barrier_counter.h

@@ -23,6 +23,8 @@
 #include <common/utils.h>
 #include <common/barrier.h>
 
+#pragma GCC visibility push(hidden)
+
 struct _starpu_barrier_counter
 {
 	struct _starpu_barrier barrier;
@@ -53,4 +55,7 @@ int _starpu_barrier_counter_check(struct _starpu_barrier_counter *barrier_c);
 int _starpu_barrier_counter_get_reached_start(struct _starpu_barrier_counter *barrier_c);
 
 double _starpu_barrier_counter_get_reached_flops(struct _starpu_barrier_counter *barrier_c);
+
+#pragma GCC visibility pop
+
 #endif

+ 14 - 7
src/common/fxt.h

@@ -36,6 +36,13 @@
 #include <common/utils.h>
 #include <starpu.h>
 
+#ifdef STARPU_USE_FXT
+#include <fxt/fxt.h>
+#include <fxt/fut.h>
+#endif
+
+#pragma GCC visibility push(hidden)
+
 /* some key to identify the worker kind */
 #define _STARPU_FUT_WORKER_KEY(kind) (kind + 0x100)
 #define _STARPU_FUT_KEY_WORKER(key) (key - 0x100)
@@ -268,8 +275,6 @@ static inline unsigned long _starpu_fxt_get_job_id(void)
 }
 
 #ifdef STARPU_USE_FXT
-#include <fxt/fxt.h>
-#include <fxt/fut.h>
 
 /* Some versions of FxT do not include the declaration of the function */
 #ifdef HAVE_ENABLE_FUT_FLUSH
@@ -283,10 +288,10 @@ void fut_set_filename(char *filename);
 #endif
 #endif
 
-extern int _starpu_fxt_started;
-extern int _starpu_fxt_willstart;
-extern starpu_pthread_mutex_t _starpu_fxt_started_mutex;
-extern starpu_pthread_cond_t _starpu_fxt_started_cond;
+extern int _starpu_fxt_started STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+extern int _starpu_fxt_willstart STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+extern starpu_pthread_mutex_t _starpu_fxt_started_mutex STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+extern starpu_pthread_cond_t _starpu_fxt_started_cond STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
 
 /** Wait until FXT is started (or not). Returns if FXT was started */
 static inline int _starpu_fxt_wait_initialisation()
@@ -308,7 +313,7 @@ static inline unsigned long _starpu_fxt_get_submit_order(void)
 	return ret;
 }
 
-long _starpu_gettid(void);
+long _starpu_gettid(void) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
 
 /** Initialize the FxT library. */
 void _starpu_fxt_init_profiling(uint64_t trace_buffer_size);
@@ -1456,4 +1461,6 @@ do {										\
 
 #endif // STARPU_USE_FXT
 
+#pragma GCC visibility pop
+
 #endif // __FXT_H__

+ 4 - 0
src/common/graph.h

@@ -19,6 +19,8 @@
 
 #include <common/list.h>
 
+#pragma GCC visibility push(hidden)
+
 /** @file */
 
 MULTILIST_CREATE_TYPE(_starpu_graph_node, all)
@@ -118,4 +120,6 @@ void _starpu_graph_compute_descendants(void);
 */
 void _starpu_graph_foreach(void (*func)(void *data, struct _starpu_graph_node *node), void *data);
 
+#pragma GCC visibility pop
+
 #endif /* __GRAPH_H__ */

+ 4 - 0
src/common/knobs.h

@@ -25,6 +25,8 @@
 #include <starpu.h>
 #include <common/config.h>
 
+#pragma GCC visibility push(hidden)
+
 /** Performance Monitoring */
 #define STARPU_ASSERT_PERF_COUNTER_SCOPE_DEFINED(t) STARPU_ASSERT( \
 		(t == starpu_perf_counter_scope_global ) \
@@ -358,4 +360,6 @@ void _starpu__workers_c__unregister_knobs(void);	/* module: workers.c */
 void _starpu__task_c__unregister_knobs(void); /* module: task.c */
 void _starpu__dmda_c__unregister_knobs(void); /* module: dmda.c */
 
+#pragma GCC visibility pop
+
 #endif // __KNOBS_H__

+ 4 - 0
src/common/rwlock.h

@@ -20,6 +20,8 @@
 #include <stdint.h>
 #include <starpu.h>
 
+#pragma GCC visibility push(hidden)
+
 /** @file */
 
 /** Dummy implementation of a RW-lock using a spinlock. */
@@ -50,4 +52,6 @@ int _starpu_take_rw_lock_read_try(struct _starpu_rw_lock *lock);
 /** Unlock the RW-lock. */
 void _starpu_release_rw_lock(struct _starpu_rw_lock *lock);
 
+#pragma GCC visibility pop
+
 #endif

+ 4 - 0
src/common/starpu_spinlock.h

@@ -25,6 +25,8 @@
 #include <common/thread.h>
 #include <starpu.h>
 
+#pragma GCC visibility push(hidden)
+
 #ifdef STARPU_SPINLOCK_CHECK
 
 /* We don't care about performance */
@@ -132,4 +134,6 @@ static inline int __starpu_spin_unlock(struct _starpu_spinlock *lock, const char
 
 #define STARPU_SPIN_MAXTRY 10 
 
+#pragma GCC visibility pop
+
 #endif // __STARPU_SPINLOCK_H__

+ 6 - 2
src/common/thread.h

@@ -21,8 +21,10 @@
 
 #include <common/utils.h>
 
+#pragma GCC visibility push(hidden)
+
 #if defined(STARPU_LINUX_SYS) && defined(STARPU_HAVE_XCHG)
-int _starpu_pthread_spin_do_lock(starpu_pthread_spinlock_t *lock);
+int _starpu_pthread_spin_do_lock(starpu_pthread_spinlock_t *lock) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
 #endif
 
 #if defined(STARPU_SIMGRID) || (defined(STARPU_LINUX_SYS) && defined(STARPU_HAVE_XCHG)) || !defined(STARPU_HAVE_PTHREAD_SPIN_LOCK)
@@ -107,7 +109,7 @@ static inline int _starpu_pthread_spin_trylock(starpu_pthread_spinlock_t *lock)
 #define starpu_pthread_spin_trylock _starpu_pthread_spin_trylock
 
 #if defined(STARPU_LINUX_SYS) && defined(STARPU_HAVE_XCHG)
-void _starpu_pthread_spin_do_unlock(starpu_pthread_spinlock_t *lock);
+void _starpu_pthread_spin_do_unlock(starpu_pthread_spinlock_t *lock) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
 #endif
 
 static inline int _starpu_pthread_spin_unlock(starpu_pthread_spinlock_t *lock)
@@ -139,6 +141,8 @@ static inline void _starpu_pthread_spin_checklocked(starpu_pthread_spinlock_t *l
 #endif /* defined(STARPU_SIMGRID) || (defined(STARPU_LINUX_SYS) && defined(STARPU_HAVE_XCHG)) || !defined(STARPU_HAVE_PTHREAD_SPIN_LOCK) */
 
 
+#pragma GCC visibility pop
+
 #endif /* __COMMON_THREAD_H__ */
 
 

+ 5 - 1
src/common/timing.h

@@ -27,12 +27,16 @@
 #include <starpu.h>
 #include <starpu_util.h>
 
+#pragma GCC visibility push(hidden)
+
 /**
  * _starpu_timing_init must be called prior to using any of these timing
  * functions.
  */
 void _starpu_timing_init(void);
-void _starpu_clock_gettime(struct timespec *ts);
+void _starpu_clock_gettime(struct timespec *ts) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+
+#pragma GCC visibility pop
 
 #endif /* TIMING_H */
 

+ 4 - 0
src/common/uthash.h

@@ -64,6 +64,8 @@ typedef unsigned int uint32_t;
 #include <inttypes.h>   /* uint32_t */
 #endif
 
+#pragma GCC visibility push(hidden)
+
 #define UTHASH_VERSION 1.9.3
 
 #define uthash_fatal(msg) exit(-1)        /* fatal error (out of memory,etc) */
@@ -1023,4 +1025,6 @@ typedef struct UT_hash_handle {
    unsigned hashv;                   /* result of hash-fcn(key)        */
 } UT_hash_handle;
 
+#pragma GCC visibility pop
+
 #endif /* UTHASH_H */

+ 7 - 3
src/common/utils.h

@@ -33,6 +33,8 @@
 #include <valgrind/helgrind.h>
 #endif
 
+#pragma GCC visibility push(hidden)
+
 #ifndef DO_CREQ_v_WW
 #define DO_CREQ_v_WW(_creqF, _ty1F, _arg1F, _ty2F, _arg2F) ((void)0)
 #endif
@@ -143,8 +145,8 @@
 #define _STARPU_IS_ZERO(a) (fpclassify(a) == FP_ZERO)
 #endif
 
-char *_starpu_mkdtemp_internal(char *tmpl);
-char *_starpu_mkdtemp(char *tmpl);
+char *_starpu_mkdtemp_internal(char *tmpl) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+char *_starpu_mkdtemp(char *tmpl) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
 int _starpu_mkpath(const char *s, mode_t mode);
 void _starpu_mkpath_and_check(const char *s, mode_t mode);
 char *_starpu_mktemp(const char *directory, int flags, int *fd);
@@ -160,7 +162,7 @@ int _starpu_frdunlock(FILE *file);
 int _starpu_fwrlock(FILE *file);
 int _starpu_fwrunlock(FILE *file);
 char *_starpu_get_home_path(void);
-void _starpu_gethostname(char *hostname, size_t size);
+void _starpu_gethostname(char *hostname, size_t size) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
 
 /** If FILE is currently on a comment line, eat it.  */
 void _starpu_drop_comments(FILE *f);
@@ -184,4 +186,6 @@ void _starpu_util_init(void);
 
 enum initialization { UNINITIALIZED = 0, CHANGING, INITIALIZED };
 
+#pragma GCC visibility pop
+
 #endif // __COMMON_UTILS_H__

+ 4 - 0
src/core/combined_workers.h

@@ -22,4 +22,8 @@
 #include <starpu.h>
 #include <common/config.h>
 
+#pragma GCC visibility push(hidden)
+
+#pragma GCC visibility pop
+
 #endif // __COMBINED_WORKERS_H__

+ 4 - 0
src/core/debug.h

@@ -290,6 +290,8 @@
 
 #endif
 
+#pragma GCC visibility push(hidden)
+
 /** Create a file that will contain StarPU's log */
 void _starpu_open_debug_logfile(void);
 
@@ -310,4 +312,6 @@ int64_t _starpu_ayudame_get_func_id(struct starpu_codelet *cl);
 void _starpu_watchdog_init(void);
 void _starpu_watchdog_shutdown(void);
 
+#pragma GCC visibility pop
+
 #endif // __DEBUG_H__

+ 4 - 0
src/core/dependencies/cg.h

@@ -22,6 +22,8 @@
 #include <starpu.h>
 #include <common/config.h>
 
+#pragma GCC visibility push(hidden)
+
 /** we do not necessarily want to allocate room for 256 dependencies, but we
    want to handle the few situation where there are a lot of dependencies as
    well */
@@ -132,4 +134,6 @@ void _starpu_notify_job_start_cg_list(void *pred, struct _starpu_cg_list *succes
 void _starpu_notify_task_dependencies(struct _starpu_job *j);
 void _starpu_notify_job_start_tasks(struct _starpu_job *j, _starpu_notify_job_start_data *data);
 
+#pragma GCC visibility pop
+
 #endif // __CG_H__

+ 4 - 0
src/core/dependencies/data_concurrency.h

@@ -21,6 +21,8 @@
 
 #include <core/jobs.h>
 
+#pragma GCC visibility push(hidden)
+
 void _starpu_job_set_ordered_buffers(struct _starpu_job *j);
 
 unsigned _starpu_submit_job_enforce_data_deps(struct _starpu_job *j);
@@ -40,5 +42,7 @@ unsigned _starpu_attempt_to_submit_arbitered_data_request(unsigned request_from_
 						       void (*callback)(void *), void *argcb,
 						       struct _starpu_job *j, unsigned buffer_index);
 
+#pragma GCC visibility pop
+
 #endif // __DATA_CONCURRENCY_H__
 

+ 6 - 1
src/core/dependencies/implicit_data_deps.h

@@ -22,6 +22,8 @@
 #include <starpu.h>
 #include <common/config.h>
 
+#pragma GCC visibility push(hidden)
+
 struct starpu_task *_starpu_detect_implicit_data_deps_with_handle(struct starpu_task *pre_sync_task, int *submit_pre_sync, struct starpu_task *post_sync_task, struct _starpu_task_wrapper_dlist *post_sync_task_dependency_slot,
 								  starpu_data_handle_t handle, enum starpu_data_access_mode mode, unsigned task_handle_sequential_consistency);
 int _starpu_test_implicit_data_deps_with_handle(starpu_data_handle_t handle, enum starpu_data_access_mode mode);
@@ -33,11 +35,14 @@ void _starpu_add_post_sync_tasks(struct starpu_task *post_sync_task, starpu_data
 void _starpu_unlock_post_sync_tasks(starpu_data_handle_t handle, enum starpu_data_access_mode mode);
 
 /** Register a hook to be called when a write is submitted */
-void _starpu_implicit_data_deps_write_hook(void (*func)(starpu_data_handle_t));
+void _starpu_implicit_data_deps_write_hook(void (*func)(starpu_data_handle_t)) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
 
 /** This function blocks until the handle is available in the requested mode */
 int _starpu_data_wait_until_available(starpu_data_handle_t handle, enum starpu_data_access_mode mode, const char *sync_name);
 
 void _starpu_data_clear_implicit(starpu_data_handle_t handle);
+
+#pragma GCC visibility pop
+
 #endif // __IMPLICIT_DATA_DEPS_H__
 

+ 4 - 0
src/core/dependencies/tags.h

@@ -24,6 +24,8 @@
 #include <common/starpu_spinlock.h>
 #include <core/dependencies/cg.h>
 
+#pragma GCC visibility push(hidden)
+
 #define _STARPU_TAG_SIZE        (sizeof(starpu_tag_t)*8)
 
 enum _starpu_tag_state
@@ -78,4 +80,6 @@ unsigned _starpu_submit_job_enforce_task_deps(struct _starpu_job *j);
 
 void _starpu_tag_clear(void);
 
+#pragma GCC visibility pop
+
 #endif // __TAGS_H__

+ 5 - 0
src/core/detect_combined_workers.h

@@ -16,9 +16,14 @@
 
 #include <starpu.h>
 
+#pragma GCC visibility push(hidden)
+
 /** @file */
 
 /** Initialize combined workers */
 void _starpu_sched_find_worker_combinations(int *workerids, int nworkers);
 
 extern int _starpu_initialized_combined_workers;
+
+#pragma GCC visibility pop
+

+ 4 - 0
src/core/disk.h

@@ -31,6 +31,8 @@ extern "C"
 #include <datawizard/copy_driver.h>
 #include <datawizard/malloc.h>
 
+#pragma GCC visibility push(hidden)
+
 /** interface to manipulate memory disk */
 void * _starpu_disk_alloc (unsigned node, size_t size) STARPU_ATTRIBUTE_MALLOC;
 
@@ -67,4 +69,6 @@ void _starpu_swap_init(void);
 }
 #endif
 
+#pragma GCC visibility pop
+
 #endif /* __DISK_H__ */

+ 5 - 0
src/core/disk_ops/unistd/disk_unistd_global.h

@@ -25,6 +25,8 @@
 #include <sys/syscall.h>
 #endif
 
+#pragma GCC visibility push(hidden)
+
 #ifndef O_BINARY
 #define O_BINARY 0
 #endif
@@ -64,4 +66,7 @@ int starpu_unistd_global_full_write (void * base, void * obj, void * ptr, size_t
 #ifdef STARPU_UNISTD_USE_COPY
 void *  starpu_unistd_global_copy(void *base_src, void* obj_src, off_t offset_src,  void *base_dst, void* obj_dst, off_t offset_dst, size_t size);
 #endif
+
+#pragma GCC visibility pop
+
 #endif

+ 4 - 0
src/core/drivers.h

@@ -18,6 +18,8 @@
 #ifndef __DRIVERS_H__
 #define __DRIVERS_H__
 
+#pragma GCC visibility push(hidden)
+
 /** @file */
 
 struct _starpu_driver_ops
@@ -28,4 +30,6 @@ struct _starpu_driver_ops
 	int (*deinit)(struct _starpu_worker *worker);
 };
 
+#pragma GCC visibility pop
+
 #endif // __DRIVERS_H__

+ 4 - 0
src/core/errorcheck.h

@@ -21,6 +21,8 @@
 
 #include <starpu.h>
 
+#pragma GCC visibility push(hidden)
+
 /** This type describes in which state a worker may be. */
 enum _starpu_worker_status
 {
@@ -60,4 +62,6 @@ enum _starpu_worker_status _starpu_get_local_worker_status(void);
  * legal to call a blocking operation in the current context. */
 unsigned _starpu_worker_may_perform_blocking_calls(void);
 
+#pragma GCC visibility pop
+
 #endif // __ERRORCHECK_H__

+ 4 - 0
src/core/idle_hook.h

@@ -17,10 +17,14 @@
 #ifndef __IDLE_HOOK_H__
 #define __IDLE_HOOK_H__
 
+#pragma GCC visibility push(hidden)
+
 /** @file */
 
 void _starpu_init_idle_hooks(void);
 
 unsigned _starpu_execute_registered_idle_hooks(void);
 
+#pragma GCC visibility pop
+
 #endif /* !__IDLE_HOOK_H__ */

+ 4 - 0
src/core/jobs.h

@@ -47,6 +47,8 @@
 #include <cuda.h>
 #endif
 
+#pragma GCC visibility push(hidden)
+
 struct _starpu_worker;
 
 /** codelet function */
@@ -287,4 +289,6 @@ int _starpu_push_local_task(struct _starpu_worker *worker, struct starpu_task *t
 
 #define _STARPU_JOB_GET_DEP_SLOTS(job) (((job)->dyn_dep_slots) ? (job)->dyn_dep_slots : (job)->dep_slots)
 
+#pragma GCC visibility pop
+
 #endif // __JOBS_H__

+ 4 - 0
src/core/perfmodel/multiple_regression.h

@@ -25,6 +25,10 @@
 #include <core/perfmodel/perfmodel.h>
 #include <starpu.h>
 
+#pragma GCC visibility push(hidden)
+
 int _starpu_multiple_regression(struct starpu_perfmodel_history_list *ptr, double *coeff, unsigned ncoeff, unsigned nparameters, const char **parameters_names, unsigned **combinations, const char *codelet_name);
 
+#pragma GCC visibility pop
+
 #endif // __MULTIPLE_REGRESSION_H__

+ 7 - 3
src/core/perfmodel/perfmodel.h

@@ -26,6 +26,8 @@
 #include <core/task_bundle.h>
 #include <stdio.h>
 
+#pragma GCC visibility push(hidden)
+
 #ifdef __cplusplus
 extern "C"
 {
@@ -63,7 +65,7 @@ struct starpu_perfmodel_arch;
 
 extern unsigned _starpu_calibration_minimum;
 
-char *_starpu_get_perf_model_dir_codelet();
+char *_starpu_get_perf_model_dir_codelet() STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
 char *_starpu_get_perf_model_dir_bus();
 char *_starpu_get_perf_model_dir_debug();
 
@@ -96,8 +98,8 @@ unsigned *_starpu_get_opencl_affinity_vector(unsigned gpuid);
 
 void _starpu_save_bandwidth_and_latency_disk(double bandwidth_write, double bandwidth_read, double latency_write, double latency_read, unsigned node, const char *name);
 
-void _starpu_write_double(FILE *f, const char *format, double val);
-int _starpu_read_double(FILE *f, char *format, double *val);
+void _starpu_write_double(FILE *f, const char *format, double val) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+int _starpu_read_double(FILE *f, char *format, double *val) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
 void _starpu_simgrid_get_platform_path(int version, char *path, size_t maxlen);
 
 void _starpu_perfmodel_realloc(struct starpu_perfmodel *model, int nb);
@@ -112,4 +114,6 @@ hwloc_topology_t _starpu_perfmodel_get_hwtopology();
 }
 #endif
 
+#pragma GCC visibility pop
+
 #endif // __PERFMODEL_H__

+ 4 - 0
src/core/perfmodel/regression.h

@@ -25,6 +25,10 @@
 #include <core/perfmodel/perfmodel.h>
 #include <starpu.h>
 
+#pragma GCC visibility push(hidden)
+
 int _starpu_regression_non_linear_power(struct starpu_perfmodel_history_list *ptr, double *a, double *b, double *c);
 
+#pragma GCC visibility pop
+
 #endif // __REGRESSION_H__

+ 4 - 0
src/core/progress_hook.h

@@ -17,10 +17,14 @@
 #ifndef __PROGRESS_HOOK_H__
 #define __PROGRESS_HOOK_H__
 
+#pragma GCC visibility push(hidden)
+
 /** @file */
 
 void _starpu_init_progression_hooks(void);
 
 unsigned _starpu_execute_registered_progression_hooks(void);
 
+#pragma GCC visibility pop
+
 #endif /* !__PROGRESS_HOOK_H__ */

+ 5 - 0
src/core/sched_ctx.h

@@ -36,6 +36,8 @@
 #include <hwloc.h>
 #endif
 
+#pragma GCC visibility push(hidden)
+
 #define NO_RESIZE -1
 #define REQ_RESIZE 0
 #define DO_RESIZE 1
@@ -317,4 +319,7 @@ static inline unsigned _starpu_sched_ctx_worker_is_master_for_child_ctx(unsigned
 /** Go through the list of deferred ctx changes of the current worker and apply
  * any ctx change operation found until the list is empty */
 void _starpu_worker_apply_deferred_ctx_changes(void);
+
+#pragma GCC visibility pop
+
 #endif // __SCHED_CONTEXT_H__

+ 25 - 21
src/core/sched_ctx_list.h

@@ -17,6 +17,8 @@
 #ifndef __SCHED_CONTEXT_LIST_H__
 #define __SCHED_CONTEXT_LIST_H__
 
+#pragma GCC visibility push(hidden)
+
 /** @file */
 
 /** Represents a non circular list of priorities and contains a list of sched context */
@@ -47,27 +49,27 @@ struct _starpu_sched_ctx_list_iterator
 };
 
 /** Element (sched_ctx) level operations */
-struct _starpu_sched_ctx_elt* _starpu_sched_ctx_elt_find(struct _starpu_sched_ctx_list *list, unsigned sched_ctx);
-void _starpu_sched_ctx_elt_ensure_consistency(struct _starpu_sched_ctx_list *list, unsigned sched_ctx);
-void _starpu_sched_ctx_elt_init(struct _starpu_sched_ctx_elt *elt, unsigned sched_ctx);
-struct _starpu_sched_ctx_elt* _starpu_sched_ctx_elt_add_after(struct _starpu_sched_ctx_list *list, unsigned sched_ctx);
-struct _starpu_sched_ctx_elt* _starpu_sched_ctx_elt_add_before(struct _starpu_sched_ctx_list *list, unsigned sched_ctx);
-struct _starpu_sched_ctx_elt* _starpu_sched_ctx_elt_add(struct _starpu_sched_ctx_list *list, unsigned sched_ctx);
-void _starpu_sched_ctx_elt_remove(struct _starpu_sched_ctx_list *list, struct _starpu_sched_ctx_elt *elt);
-int _starpu_sched_ctx_elt_exists(struct _starpu_sched_ctx_list *list, unsigned sched_ctx);
-int _starpu_sched_ctx_elt_get_priority(struct _starpu_sched_ctx_list *list, unsigned sched_ctx);
+struct _starpu_sched_ctx_elt* _starpu_sched_ctx_elt_find(struct _starpu_sched_ctx_list *list, unsigned sched_ctx) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+void _starpu_sched_ctx_elt_ensure_consistency(struct _starpu_sched_ctx_list *list, unsigned sched_ctx) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+void _starpu_sched_ctx_elt_init(struct _starpu_sched_ctx_elt *elt, unsigned sched_ctx) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+struct _starpu_sched_ctx_elt* _starpu_sched_ctx_elt_add_after(struct _starpu_sched_ctx_list *list, unsigned sched_ctx) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+struct _starpu_sched_ctx_elt* _starpu_sched_ctx_elt_add_before(struct _starpu_sched_ctx_list *list, unsigned sched_ctx) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+struct _starpu_sched_ctx_elt* _starpu_sched_ctx_elt_add(struct _starpu_sched_ctx_list *list, unsigned sched_ctx) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+void _starpu_sched_ctx_elt_remove(struct _starpu_sched_ctx_list *list, struct _starpu_sched_ctx_elt *elt) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+int _starpu_sched_ctx_elt_exists(struct _starpu_sched_ctx_list *list, unsigned sched_ctx) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+int _starpu_sched_ctx_elt_get_priority(struct _starpu_sched_ctx_list *list, unsigned sched_ctx) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
 
 
 /** List (priority) level operations */
-struct _starpu_sched_ctx_list* _starpu_sched_ctx_list_find(struct _starpu_sched_ctx_list *list, unsigned prio);
-struct _starpu_sched_ctx_elt* _starpu_sched_ctx_list_add_prio(struct _starpu_sched_ctx_list **list, unsigned prio, unsigned sched_ctx);
-int _starpu_sched_ctx_list_add(struct _starpu_sched_ctx_list **list, unsigned sched_ctx);
-void _starpu_sched_ctx_list_remove_elt(struct _starpu_sched_ctx_list **list, struct _starpu_sched_ctx_elt *rm);
-int _starpu_sched_ctx_list_remove(struct _starpu_sched_ctx_list **list, unsigned sched_ctx);
-int _starpu_sched_ctx_list_move(struct _starpu_sched_ctx_list **list, unsigned sched_ctx, unsigned prio_to);
-int _starpu_sched_ctx_list_exists(struct _starpu_sched_ctx_list *list, unsigned prio);
-void _starpu_sched_ctx_list_remove_all(struct _starpu_sched_ctx_list *list);
-void _starpu_sched_ctx_list_delete(struct _starpu_sched_ctx_list **list);
+struct _starpu_sched_ctx_list* _starpu_sched_ctx_list_find(struct _starpu_sched_ctx_list *list, unsigned prio) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+struct _starpu_sched_ctx_elt* _starpu_sched_ctx_list_add_prio(struct _starpu_sched_ctx_list **list, unsigned prio, unsigned sched_ctx) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+int _starpu_sched_ctx_list_add(struct _starpu_sched_ctx_list **list, unsigned sched_ctx) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+void _starpu_sched_ctx_list_remove_elt(struct _starpu_sched_ctx_list **list, struct _starpu_sched_ctx_elt *rm) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+int _starpu_sched_ctx_list_remove(struct _starpu_sched_ctx_list **list, unsigned sched_ctx) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+int _starpu_sched_ctx_list_move(struct _starpu_sched_ctx_list **list, unsigned sched_ctx, unsigned prio_to) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+int _starpu_sched_ctx_list_exists(struct _starpu_sched_ctx_list *list, unsigned prio) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+void _starpu_sched_ctx_list_remove_all(struct _starpu_sched_ctx_list *list) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+void _starpu_sched_ctx_list_delete(struct _starpu_sched_ctx_list **list) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
 
 /** Task number management */
 int _starpu_sched_ctx_list_push_event(struct _starpu_sched_ctx_list *list, unsigned sched_ctx);
@@ -75,8 +77,10 @@ int _starpu_sched_ctx_list_pop_event(struct _starpu_sched_ctx_list *list, unsign
 int _starpu_sched_ctx_list_pop_all_event(struct _starpu_sched_ctx_list *list, unsigned sched_ctx);
 
 /** Iterator operations */
-int _starpu_sched_ctx_list_iterator_init(struct _starpu_sched_ctx_list *list, struct _starpu_sched_ctx_list_iterator *it);
-int _starpu_sched_ctx_list_iterator_has_next(struct _starpu_sched_ctx_list_iterator *it);
-struct _starpu_sched_ctx_elt* _starpu_sched_ctx_list_iterator_get_next(struct _starpu_sched_ctx_list_iterator *it);
+int _starpu_sched_ctx_list_iterator_init(struct _starpu_sched_ctx_list *list, struct _starpu_sched_ctx_list_iterator *it) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+int _starpu_sched_ctx_list_iterator_has_next(struct _starpu_sched_ctx_list_iterator *it) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+struct _starpu_sched_ctx_elt* _starpu_sched_ctx_list_iterator_get_next(struct _starpu_sched_ctx_list_iterator *it) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+
+#pragma GCC visibility pop
 
 #endif // __SCHED_CONTEXT_H__

+ 6 - 2
src/core/sched_policy.h

@@ -28,6 +28,8 @@
 
 #include <core/simgrid.h>
 
+#pragma GCC visibility push(hidden)
+
 #define _STARPU_SCHED_BEGIN \
 	_STARPU_TRACE_WORKER_SCHEDULING_PUSH;	\
 	_SIMGRID_TIMER_BEGIN(_starpu_simgrid_sched_cost())
@@ -80,13 +82,13 @@ extern struct starpu_sched_policy _starpu_sched_ws_policy;
 extern struct starpu_sched_policy _starpu_sched_prio_policy;
 extern struct starpu_sched_policy _starpu_sched_random_policy;
 extern struct starpu_sched_policy _starpu_sched_dm_policy;
-extern struct starpu_sched_policy _starpu_sched_dmda_policy;
+extern struct starpu_sched_policy _starpu_sched_dmda_policy STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
 extern struct starpu_sched_policy _starpu_sched_dmda_prio_policy;
 extern struct starpu_sched_policy _starpu_sched_dmda_ready_policy;
 extern struct starpu_sched_policy _starpu_sched_dmda_sorted_policy;
 extern struct starpu_sched_policy _starpu_sched_dmda_sorted_decision_policy;
 extern struct starpu_sched_policy _starpu_sched_eager_policy;
-extern struct starpu_sched_policy _starpu_sched_parallel_heft_policy;
+extern struct starpu_sched_policy _starpu_sched_parallel_heft_policy STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
 extern struct starpu_sched_policy _starpu_sched_peager_policy;
 extern struct starpu_sched_policy _starpu_sched_heteroprio_policy;
 extern struct starpu_sched_policy _starpu_sched_modular_eager_policy;
@@ -125,4 +127,6 @@ extern long _starpu_task_break_on_exec;
 #define _STARPU_TASK_BREAK_ON(task, what) ((void) 0)
 #endif
 
+#pragma GCC visibility pop
+
 #endif // __SCHED_POLICY_H__

+ 4 - 0
src/core/simgrid.h

@@ -49,6 +49,8 @@ extern "C"
 
 #include <xbt/xbt_os_time.h>
 
+#pragma GCC visibility push(hidden)
+
 struct _starpu_pthread_args
 {
 	void *(*f)(void*);
@@ -137,6 +139,8 @@ void _starpu_simgrid_xbt_thread_create(const char *name, starpu_pthread_attr_t *
 		}	\
 	}
 
+#pragma GCC visibility pop
+
 #else // !STARPU_SIMGRID
 #define _SIMGRID_TIMER_BEGIN(cond) {
 #define _SIMGRID_TIMER_END }

+ 3 - 0
src/core/task.h

@@ -23,6 +23,8 @@
 #include <common/config.h>
 #include <core/jobs.h>
 
+#pragma GCC visibility push(hidden)
+
 /** Internal version of starpu_task_destroy: don't check task->destroy flag */
 void _starpu_task_destroy(struct starpu_task *task);
 
@@ -121,6 +123,7 @@ void _starpu_watchdog_shutdown(void);
 int _starpu_task_wait_for_all_and_return_nb_waited_tasks(void);
 int _starpu_task_wait_for_all_in_ctx_and_return_nb_waited_tasks(unsigned sched_ctx);
 
+#pragma GCC visibility pop
 
 #ifdef BUILDING_STARPU
 LIST_CREATE_TYPE_NOSTRUCT(starpu_task, prev, next);

+ 4 - 0
src/core/task_bundle.h

@@ -21,6 +21,8 @@
 
 #include <starpu_thread.h>
 
+#pragma GCC visibility push(hidden)
+
 /** struct _starpu_task_bundle_entry
  * ================================
  * Purpose
@@ -133,4 +135,6 @@ void _starpu_task_bundle_destroy(starpu_task_bundle_t bundle);
  */
 void _starpu_insertion_handle_sorted(struct _starpu_handle_list **listp, starpu_data_handle_t handle, enum starpu_data_access_mode mode);
 
+#pragma GCC visibility pop
+
 #endif // __CORE_TASK_BUNDLE_H__

+ 6 - 2
src/core/topology.h

@@ -24,6 +24,8 @@
 #include <common/list.h>
 #include <common/fxt.h>
 
+#pragma GCC visibility push(hidden)
+
 struct _starpu_machine_config;
 
 #ifndef STARPU_SIMGRID
@@ -60,7 +62,7 @@ unsigned _starpu_topology_get_nhwpu(struct _starpu_machine_config *config);
 unsigned _starpu_topology_get_nnumanodes(struct _starpu_machine_config *config);
 
 /** returns the number of hyperthreads per core */
-unsigned _starpu_get_nhyperthreads();
+unsigned _starpu_get_nhyperthreads() STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
 
 #ifdef STARPU_HAVE_HWLOC
 /** Small convenient function to filter hwloc topology depending on HWLOC API version */
@@ -81,11 +83,13 @@ void _starpu_bind_thread_on_cpus(struct _starpu_combined_worker *combined_worker
 
 struct _starpu_worker *_starpu_get_worker_from_driver(struct starpu_driver *d);
 
-int starpu_memory_nodes_get_numa_count(void);
+int starpu_memory_nodes_get_numa_count(void) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
 int starpu_memory_nodes_numa_id_to_hwloclogid(unsigned id);
 
 /** Get the memory node for data number i when task is to be executed on memory node target_node */
 int _starpu_task_data_get_node_on_node(struct starpu_task *task, unsigned index, unsigned target_node);
 int _starpu_task_data_get_node_on_worker(struct starpu_task *task, unsigned index, unsigned worker);
 
+#pragma GCC visibility pop
+
 #endif // __TOPOLOGY_H__

+ 4 - 4
src/core/workers.c

@@ -184,11 +184,11 @@ static starpu_pthread_cond_t init_cond = STARPU_PTHREAD_COND_INITIALIZER;
 static int init_count = 0;
 static enum initialization initialized = UNINITIALIZED;
 
-int _starpu_keys_initialized STARPU_ATTRIBUTE_INTERNAL;
-starpu_pthread_key_t _starpu_worker_key STARPU_ATTRIBUTE_INTERNAL;
-starpu_pthread_key_t _starpu_worker_set_key STARPU_ATTRIBUTE_INTERNAL;
+int _starpu_keys_initialized;
+starpu_pthread_key_t _starpu_worker_key;
+starpu_pthread_key_t _starpu_worker_set_key;
 
-struct _starpu_machine_config _starpu_config STARPU_ATTRIBUTE_INTERNAL;
+struct _starpu_machine_config _starpu_config;
 
 static int check_entire_platform;
 

+ 10 - 6
src/core/workers.h

@@ -55,6 +55,8 @@
 
 #include <datawizard/datawizard.h>
 
+#pragma GCC visibility push(hidden)
+
 #define STARPU_MAX_PIPELINE 4
 
 struct _starpu_ctx_change_list;
@@ -427,10 +429,10 @@ void _starpu_memory_driver_info_register(enum starpu_node_kind kind, const struc
 
 extern int _starpu_worker_parallel_blocks;
 
-extern struct _starpu_machine_config _starpu_config STARPU_ATTRIBUTE_INTERNAL;
-extern int _starpu_keys_initialized STARPU_ATTRIBUTE_INTERNAL;
-extern starpu_pthread_key_t _starpu_worker_key STARPU_ATTRIBUTE_INTERNAL;
-extern starpu_pthread_key_t _starpu_worker_set_key STARPU_ATTRIBUTE_INTERNAL;
+extern struct _starpu_machine_config _starpu_config;
+extern int _starpu_keys_initialized;
+extern starpu_pthread_key_t _starpu_worker_key;
+extern starpu_pthread_key_t _starpu_worker_set_key;
 
 /** Three functions to manage argv, argc */
 void _starpu_set_argc_argv(int *argc, char ***argv);
@@ -461,7 +463,7 @@ static inline unsigned _starpu_machine_is_running(void)
 void _starpu_worker_init(struct _starpu_worker *workerarg, struct _starpu_machine_config *pconfig);
 
 /** Check if there is a worker that may execute the task. */
-uint32_t _starpu_worker_exists(struct starpu_task *);
+uint32_t _starpu_worker_exists(struct starpu_task *) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
 
 /** Is there a worker that can execute CUDA code ? */
 uint32_t _starpu_can_submit_cuda_task(void);
@@ -1152,7 +1154,7 @@ static inline int _starpu_wake_worker_relax(int workerid)
 }
 #define starpu_wake_worker_relax _starpu_wake_worker_relax
 
-int starpu_wake_worker_relax_light(int workerid);
+int starpu_wake_worker_relax_light(int workerid) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
 
 /**
  * Allow a worker pulling a task it cannot execute to properly refuse it and
@@ -1172,4 +1174,6 @@ static inline int _starpu_perf_counter_paused(void)
 
 /* @}*/
 
+#pragma GCC visibility pop
+
 #endif // __WORKERS_H__

+ 5 - 1
src/datawizard/coherency.h

@@ -33,6 +33,8 @@
 #include <datawizard/memstats.h>
 #include <datawizard/data_request.h>
 
+#pragma GCC visibility push(hidden)
+
 enum _starpu_cache_state
 {
 	STARPU_OWNER,
@@ -378,6 +380,8 @@ void _starpu_data_start_reduction_mode(starpu_data_handle_t handle);
 void _starpu_data_end_reduction_mode(starpu_data_handle_t handle);
 void _starpu_data_end_reduction_mode_terminate(starpu_data_handle_t handle);
 
-void _starpu_data_set_unregister_hook(starpu_data_handle_t handle, _starpu_data_handle_unregister_hook func);
+void _starpu_data_set_unregister_hook(starpu_data_handle_t handle, _starpu_data_handle_unregister_hook func) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+
+#pragma GCC visibility pop
 
 #endif // __COHERENCY__H__

+ 4 - 0
src/datawizard/copy_driver.h

@@ -39,6 +39,8 @@
 #include <mpi.h>
 #endif
 
+#pragma GCC visibility push(hidden)
+
 #ifdef __cplusplus
 extern "C"
 {
@@ -133,4 +135,6 @@ void _starpu_driver_wait_request_completion(struct _starpu_async_channel *async_
 }
 #endif
 
+#pragma GCC visibility pop
+
 #endif // __COPY_DRIVER_H__

+ 5 - 0
src/datawizard/data_request.h

@@ -28,6 +28,8 @@
 #include <common/prio_list.h>
 #include <common/starpu_spinlock.h>
 
+#pragma GCC visibility push(hidden)
+
 /* TODO: This should be tuned according to driver capabilities
  * Data interfaces should also have to declare how many asynchronous requests
  * they have actually started (think of e.g. csr).
@@ -184,4 +186,7 @@ void _starpu_data_request_append_callback(struct _starpu_data_request *r,
 					  void *callback_arg);
 
 void _starpu_update_prefetch_status(struct _starpu_data_request *r, enum starpu_is_prefetch prefetch);
+
+#pragma GCC visibility pop
+
 #endif // __DATA_REQUEST_H__

+ 4 - 0
src/datawizard/datastats.h

@@ -24,6 +24,8 @@
 #include <stdint.h>
 #include <stdlib.h>
 
+#pragma GCC visibility push(hidden)
+
 extern int _starpu_enable_stats;
 
 void _starpu_datastats_init();
@@ -63,4 +65,6 @@ void __starpu_data_allocation_inc_stats(unsigned node STARPU_ATTRIBUTE_UNUSED);
 
 void _starpu_display_alloc_cache_stats(FILE *stream);
 
+#pragma GCC visibility pop
+
 #endif // __DATASTATS_H__

+ 3 - 0
src/datawizard/datawizard.h

@@ -34,6 +34,7 @@
 
 #include <core/dependencies/implicit_data_deps.h>
 
+#pragma GCC visibility push(hidden)
 
 /** Make data transfers progress on all memory nodes driven by the current worker.
  *
@@ -49,4 +50,6 @@ void _starpu_datawizard_progress(enum _starpu_may_alloc may_alloc);
 /** Check for all pending data request progress on node \p memory_node */
 void _starpu_datawizard_handle_all_pending_node_data_requests(unsigned memnode);
 
+#pragma GCC visibility pop
+
 #endif // __DATAWIZARD_H__

+ 5 - 0
src/datawizard/filters.h

@@ -26,6 +26,11 @@
 #include <starpu.h>
 #include <common/config.h>
 
+#pragma GCC visibility push(hidden)
+
 /** submit asynchronous unpartitioning / partitioning to make target active read-only or read-write */
 void _starpu_data_partition_access_submit(starpu_data_handle_t target, int write);
+
+#pragma GCC visibility pop
+
 #endif

+ 4 - 0
src/datawizard/footprint.h

@@ -24,6 +24,8 @@
 #include <common/config.h>
 #include <core/jobs.h>
 
+#pragma GCC visibility push(hidden)
+
 /** Compute the footprint that characterizes the job and cache it into the job
  * structure. */
 uint32_t _starpu_compute_buffers_footprint(struct starpu_perfmodel *model, struct starpu_perfmodel_arch * arch, unsigned nimpl, struct _starpu_job *j);
@@ -34,4 +36,6 @@ uint32_t _starpu_compute_data_footprint(starpu_data_handle_t handle);
 /** Compute the footprint that characterizes the allocation of the data handle. */
 uint32_t _starpu_compute_data_alloc_footprint(starpu_data_handle_t handle);
 
+#pragma GCC visibility pop
+
 #endif // __FOOTPRINT_H__

+ 12 - 11
src/datawizard/interfaces/data_interface.h

@@ -26,6 +26,8 @@
 #include <util/openmp_runtime_support.h>
 #endif
 
+#pragma GCC visibility push(hidden)
+
 /** Generic type representing an interface, for now it's only used before
  * execution on message-passing devices but it can be useful in other cases.
  */
@@ -44,43 +46,42 @@ union _starpu_interface
 /** Some data interfaces or filters use this interface internally */
 extern struct starpu_data_interface_ops starpu_interface_matrix_ops;
 extern struct starpu_data_interface_ops starpu_interface_block_ops;
-extern struct starpu_data_interface_ops starpu_interface_vector_ops;
+extern struct starpu_data_interface_ops starpu_interface_vector_ops STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
 extern struct starpu_data_interface_ops starpu_interface_csr_ops;
 extern struct starpu_data_interface_ops starpu_interface_bcsr_ops;
 extern struct starpu_data_interface_ops starpu_interface_variable_ops;
 extern struct starpu_data_interface_ops starpu_interface_void_ops;
 extern struct starpu_data_interface_ops starpu_interface_multiformat_ops;
 
-void _starpu_data_free_interfaces(starpu_data_handle_t handle)
-	STARPU_ATTRIBUTE_INTERNAL;
+void _starpu_data_free_interfaces(starpu_data_handle_t handle);
 
 extern
 int _starpu_data_handle_init(starpu_data_handle_t handle, struct starpu_data_interface_ops *interface_ops, unsigned int mf_node);
 void _starpu_data_initialize_per_worker(starpu_data_handle_t handle);
 
 extern struct starpu_arbiter *_starpu_global_arbiter;
-extern void _starpu_data_interface_init(void) STARPU_ATTRIBUTE_INTERNAL;
-extern int __starpu_data_check_not_busy(starpu_data_handle_t handle) STARPU_ATTRIBUTE_INTERNAL STARPU_ATTRIBUTE_WARN_UNUSED_RESULT;
+extern void _starpu_data_interface_init(void);
+extern int __starpu_data_check_not_busy(starpu_data_handle_t handle) STARPU_ATTRIBUTE_WARN_UNUSED_RESULT;
 #define _starpu_data_check_not_busy(handle) \
 	(STARPU_UNLIKELY(!handle->busy_count && \
 			 (handle->busy_waiting || handle->lazy_unregister)) ? \
 		__starpu_data_check_not_busy(handle) : 0)
-extern void _starpu_data_interface_shutdown(void) STARPU_ATTRIBUTE_INTERNAL;
+extern void _starpu_data_interface_shutdown(void);
 
 #ifdef STARPU_OPENMP
 void _starpu_omp_unregister_region_handles(struct starpu_omp_region *region);
 void _starpu_omp_unregister_task_handles(struct starpu_omp_task *task);
 #endif
 
-struct starpu_data_interface_ops *_starpu_data_interface_get_ops(unsigned interface_id);
+struct starpu_data_interface_ops *_starpu_data_interface_get_ops(unsigned interface_id) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
 
 extern void _starpu_data_register_ram_pointer(starpu_data_handle_t handle,
-						void *ptr)
-	STARPU_ATTRIBUTE_INTERNAL;
+						void *ptr);
 
-extern void _starpu_data_unregister_ram_pointer(starpu_data_handle_t handle, unsigned node)
-	STARPU_ATTRIBUTE_INTERNAL;
+extern void _starpu_data_unregister_ram_pointer(starpu_data_handle_t handle, unsigned node);
 
 #define _starpu_data_is_multiformat_handle(handle) handle->ops->is_multiformat
 
+#pragma GCC visibility pop
+
 #endif // __DATA_INTERFACE_H__

+ 5 - 0
src/datawizard/malloc.h

@@ -17,6 +17,8 @@
 #ifndef __ALLOC_H__
 #define __ALLOC_H__
 
+#pragma GCC visibility push(hidden)
+
 /** @file */
 
 void _starpu_malloc_init(unsigned dst_node);
@@ -33,4 +35,7 @@ int _starpu_free_flags_on_node(unsigned dst_node, void *A, size_t dim, int flags
    critical path
   */
 int _starpu_malloc_willpin_on_node(unsigned dst_node);
+
+#pragma GCC visibility pop
+
 #endif

+ 4 - 0
src/datawizard/memalloc.h

@@ -28,6 +28,8 @@
 #include <datawizard/copy_driver.h>
 #include <datawizard/data_request.h>
 
+#pragma GCC visibility push(hidden)
+
 struct _starpu_data_replicate;
 
 /** While associated with a handle, the content is protected by the handle lock, except a few fields
@@ -95,4 +97,6 @@ int _starpu_is_reclaiming(unsigned node);
 
 void _starpu_mem_chunk_disk_register(unsigned disk_memnode);
 
+#pragma GCC visibility pop
+
 #endif

+ 4 - 0
src/datawizard/memory_manager.h

@@ -21,6 +21,8 @@
 
 #include <starpu.h>
 
+#pragma GCC visibility push(hidden)
+
 #ifdef __cplusplus
 extern "C"
 {
@@ -49,4 +51,6 @@ int _starpu_memory_manager_test_allocate_size(unsigned node, size_t size);
 }
 #endif
 
+#pragma GCC visibility pop
+
 #endif /* __MEMORY_MANAGER_H__ */

+ 4 - 0
src/datawizard/memory_nodes.h

@@ -31,6 +31,8 @@
 #include <core/simgrid.h>
 #endif
 
+#pragma GCC visibility push(hidden)
+
 extern char _starpu_worker_drives_memory[STARPU_NMAXWORKERS][STARPU_MAXNODES];
 
 struct _starpu_cond_and_worker
@@ -162,4 +164,6 @@ static inline unsigned _starpu_worker_get_local_memory_node(void)
 #endif
 #define starpu_worker_get_local_memory_node _starpu_worker_get_local_memory_node
 
+#pragma GCC visibility pop
+
 #endif // __MEMORY_NODES_H__

+ 4 - 0
src/datawizard/memstats.h

@@ -22,6 +22,8 @@
 #include <starpu.h>
 #include <common/config.h>
 
+#pragma GCC visibility push(hidden)
+
 #ifdef STARPU_MEMORY_STATS
 struct _starpu_memory_stats
 {
@@ -51,4 +53,6 @@ void _starpu_memory_handle_stats_loaded_owner(starpu_data_handle_t handle, unsig
 void _starpu_memory_handle_stats_shared_to_owner(starpu_data_handle_t handle, unsigned node);
 void _starpu_memory_handle_stats_invalidated(starpu_data_handle_t handle, unsigned node);
 
+#pragma GCC visibility pop
+
 #endif /* __MEMSTATS_H__ */

+ 4 - 0
src/datawizard/node_ops.h

@@ -23,6 +23,8 @@
 #include <common/config.h>
 #include <datawizard/copy_driver.h>
 
+#pragma GCC visibility push(hidden)
+
 typedef int (*copy_interface_func_t)(starpu_data_handle_t handle, void *src_interface, unsigned src_node,
 				void *dst_interface, unsigned dst_node,
 				struct _starpu_data_request *req);
@@ -60,4 +62,6 @@ struct _starpu_node_ops
 
 const char* _starpu_node_get_prefix(enum starpu_node_kind kind);
 
+#pragma GCC visibility pop
+
 #endif // __NODE_OPS_H__

+ 4 - 0
src/datawizard/sort_data_handles.h

@@ -28,9 +28,13 @@
 #include <datawizard/coherency.h>
 #include <datawizard/memalloc.h>
 
+#pragma GCC visibility push(hidden)
+
 /** To avoid deadlocks, we reorder the different buffers accessed to by the task
  * so that we always grab the rw-lock associated to the handles in the same
  * order. */
 void _starpu_sort_task_handles(struct _starpu_data_descr descr[], unsigned nbuffers);
 
+#pragma GCC visibility pop
+
 #endif // SORT_DATA_HANDLES

+ 4 - 0
src/datawizard/write_back.h

@@ -22,10 +22,14 @@
 #include <starpu.h>
 #include <datawizard/coherency.h>
 
+#pragma GCC visibility push(hidden)
+
 /** If a write-through mask is associated to that data handle, this propagates
  * the the current value of the data onto the different memory nodes in the
  * write_through_mask. */
 void _starpu_write_through_data(starpu_data_handle_t handle, unsigned requesting_node,
 					   uint32_t write_through_mask);
 
+#pragma GCC visibility pop
+
 #endif // __DW_WRITE_BACK_H__

+ 6 - 2
src/debug/starpu_debug_helpers.h

@@ -23,19 +23,23 @@
 #include <starpu_config.h>
 #include <starpu_util.h>
 
+#pragma GCC visibility push(hidden)
+
 #ifdef __cplusplus
 extern "C"
 {
 #endif
 
 /** Perform a ping pong between the two memory nodes */
-void _starpu_benchmark_ping_pong(starpu_data_handle_t handle, unsigned node0, unsigned node1, unsigned niter);
+void _starpu_benchmark_ping_pong(starpu_data_handle_t handle, unsigned node0, unsigned node1, unsigned niter) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
 
 /** Display the size of different data structures */
-void _starpu_debug_display_structures_size(FILE *stream);
+void _starpu_debug_display_structures_size(FILE *stream) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
 
 #ifdef __cplusplus
 }
 #endif
 
+#pragma GCC visibility pop
+
 #endif // __STARPU_DEBUG_HELPERS_H__

+ 4 - 0
src/debug/traces/starpu_fxt.h

@@ -41,6 +41,8 @@
 #include <starpu.h>
 #include "../../../include/starpu_fxt.h"
 
+#pragma GCC visibility push(hidden)
+
 extern char _starpu_last_codelet_symbol[STARPU_NMAXWORKERS][(FXT_MAX_PARAMS-5)*sizeof(unsigned long)];
 
 void _starpu_fxt_dag_init(char *dag_filename);
@@ -87,4 +89,6 @@ void _starpu_fxt_component_deinit(void);
 
 #endif // STARPU_USE_FXT
 
+#pragma GCC visibility pop
+
 #endif // __STARPU__FXT_H__

+ 4 - 0
src/drivers/cpu/driver_cpu.h

@@ -22,6 +22,8 @@
 #include <common/config.h>
 #include <datawizard/node_ops.h>
 
+#pragma GCC visibility push(hidden)
+
 void _starpu_cpu_preinit(void);
 
 extern struct _starpu_driver_ops _starpu_driver_cpu_ops;
@@ -36,4 +38,6 @@ int _starpu_cpu_is_direct_access_supported(unsigned node, unsigned handling_node
 uintptr_t _starpu_cpu_malloc_on_node(unsigned dst_node, size_t size, int flags);
 void _starpu_cpu_free_on_node(unsigned dst_node, uintptr_t addr, size_t size, int flags);
 
+#pragma GCC visibility pop
+
 #endif //  __DRIVER_CPU_H__

+ 4 - 0
src/drivers/cuda/driver_cuda.h

@@ -37,6 +37,8 @@ void _starpu_cuda_preinit(void);
 #include <core/workers.h>
 #include <datawizard/node_ops.h>
 
+#pragma GCC visibility push(hidden)
+
 extern struct _starpu_driver_ops _starpu_driver_cuda_ops;
 extern struct _starpu_node_ops _starpu_driver_cuda_node_ops;
 
@@ -86,5 +88,7 @@ int _starpu_cuda_is_direct_access_supported(unsigned node, unsigned handling_nod
 uintptr_t _starpu_cuda_malloc_on_node(unsigned dst_node, size_t size, int flags);
 void _starpu_cuda_free_on_node(unsigned dst_node, uintptr_t addr, size_t size, int flags);
 
+#pragma GCC visibility pop
+
 #endif //  __DRIVER_CUDA_H__
 

+ 4 - 0
src/drivers/disk/driver_disk.h

@@ -22,6 +22,8 @@
 
 #include <datawizard/node_ops.h>
 
+#pragma GCC visibility push(hidden)
+
 void _starpu_disk_preinit(void);
 
 int _starpu_disk_copy_src_to_disk(void * src, unsigned src_node, void * dst, size_t dst_offset, unsigned dst_node, size_t size, void * async_channel);
@@ -46,4 +48,6 @@ int _starpu_disk_is_direct_access_supported(unsigned node, unsigned handling_nod
 uintptr_t _starpu_disk_malloc_on_node(unsigned dst_node, size_t size, int flags);
 void _starpu_disk_free_on_node(unsigned dst_node, uintptr_t addr, size_t size, int flags);
 
+#pragma GCC visibility pop
+
 #endif

+ 5 - 0
src/drivers/driver_common/driver_common.h

@@ -25,6 +25,8 @@
 #include <core/jobs.h>
 #include <common/utils.h>
 
+#pragma GCC visibility push(hidden)
+
 void _starpu_driver_start_job(struct _starpu_worker *args, struct _starpu_job *j, struct starpu_perfmodel_arch* perf_arch,
 			      int rank, int profiling);
 void _starpu_driver_end_job(struct _starpu_worker *args, struct _starpu_job *j, struct starpu_perfmodel_arch* perf_arch,
@@ -36,4 +38,7 @@ void _starpu_driver_update_job_feedback(struct _starpu_job *j, struct _starpu_wo
 struct starpu_task *_starpu_get_worker_task(struct _starpu_worker *args, int workerid, unsigned memnode);
 /** Get from the scheduler tasks to be executed on the workers \p workers */
 int _starpu_get_multi_worker_task(struct _starpu_worker *workers, struct starpu_task ** tasks, int nworker, unsigned memnode);
+
+#pragma GCC visibility pop
+
 #endif // __DRIVER_COMMON_H__

+ 4 - 0
src/drivers/mp_common/mp_common.h

@@ -30,6 +30,8 @@
 #include <datawizard/interfaces/data_interface.h>
 #include <datawizard/copy_driver.h>
 
+#pragma GCC visibility push(hidden)
+
 #ifdef STARPU_USE_MP
 
 #define BUFFER_SIZE 65536
@@ -247,4 +249,6 @@ enum _starpu_mp_command _starpu_mp_common_recv_command(const struct _starpu_mp_n
 
 #endif /* STARPU_USE_MP */
 
+#pragma GCC visibility pop
+
 #endif /* __MP_COMMON_H__ */

+ 4 - 1
src/drivers/mp_common/sink_common.h

@@ -27,6 +27,8 @@
 
 #include <drivers/mp_common/mp_common.h>
 
+#pragma GCC visibility push(hidden)
+
 /** Represent the topology of sink devices, contains useful informations about
  * their capabilities
  * XXX: unused.
@@ -51,7 +53,8 @@ void _starpu_sink_common_free(const struct _starpu_mp_node *mp_node STARPU_ATTRI
 
 void* _starpu_sink_thread(void * thread_arg);
 
-#endif /* STARPU_USE_MP */
+#pragma GCC visibility pop
 
+#endif /* STARPU_USE_MP */
 
 #endif /* __SINK_COMMON_H__ */

+ 4 - 0
src/drivers/mp_common/source_common.h

@@ -26,6 +26,8 @@
 #include <core/task.h>
 #include <drivers/mp_common/mp_common.h>
 
+#pragma GCC visibility push(hidden)
+
 enum _starpu_mp_command _starpu_src_common_wait_command_sync(struct _starpu_mp_node *node, void ** arg, int* arg_size);
 int _starpu_src_common_store_message(struct _starpu_mp_node *node, void * arg, int arg_size, enum _starpu_mp_command answer);
 
@@ -67,6 +69,8 @@ void _starpu_src_common_init_switch_env(unsigned this);
 void _starpu_src_common_workers_set(struct _starpu_worker_set * worker_set, int ndevices, struct _starpu_mp_node ** mp_node);
 #endif
 
+#pragma GCC visibility pop
+
 #endif /* STARPU_USE_MP */
 
 #endif /* __SOURCE_COMMON_H__ */

+ 4 - 0
src/drivers/mpi/driver_mpi_common.h

@@ -22,6 +22,8 @@
 #include <drivers/mp_common/mp_common.h>
 #include <drivers/mpi/driver_mpi_source.h>
 
+#pragma GCC visibility push(hidden)
+
 #ifdef STARPU_USE_MPI_MASTER_SLAVE
 
 #define SYNC_TAG 44
@@ -56,4 +58,6 @@ void _starpu_mpi_common_measure_bandwidth_latency(double bandwidth_dtod[STARPU_M
 
 #endif  /* STARPU_USE_MPI_MASTER_SLAVE */
 
+#pragma GCC visibility pop
+
 #endif	/* __DRIVER_MPI_COMMON_H__ */

+ 4 - 0
src/drivers/mpi/driver_mpi_sink.h

@@ -21,6 +21,8 @@
 
 #include <drivers/mp_common/sink_common.h>
 
+#pragma GCC visibility push(hidden)
+
 #ifdef STARPU_USE_MPI_MASTER_SLAVE
 
 void _starpu_mpi_sink_init(struct _starpu_mp_node *node);
@@ -31,4 +33,6 @@ void (*_starpu_mpi_sink_lookup (const struct _starpu_mp_node * node STARPU_ATTRI
 
 #endif  /* STARPU_USE_MPI_MASTER_SLAVE */
 
+#pragma GCC visibility pop
+
 #endif	/* __DRIVER_MPI_SINK_H__ */

+ 4 - 0
src/drivers/mpi/driver_mpi_source.h

@@ -23,6 +23,8 @@
 #include <starpu_mpi_ms.h>
 #include <datawizard/node_ops.h>
 
+#pragma GCC visibility push(hidden)
+
 void _starpu_mpi_ms_preinit(void);
 
 #ifdef STARPU_USE_MPI_MASTER_SLAVE
@@ -68,4 +70,6 @@ void(* _starpu_mpi_ms_src_get_kernel_from_job(const struct _starpu_mp_node *node
 
 #endif /* STARPU_USE_MPI_MASTER_SLAVE */
 
+#pragma GCC visibility pop
+
 #endif	/* __DRIVER_MPI_SOURCE_H__ */

+ 4 - 0
src/drivers/opencl/driver_opencl.h

@@ -36,6 +36,8 @@
 #include <core/workers.h>
 #include <datawizard/node_ops.h>
 
+#pragma GCC visibility push(hidden)
+
 void _starpu_opencl_preinit(void);
 
 #if defined(STARPU_USE_OPENCL) || defined(STARPU_SIMGRID)
@@ -89,4 +91,6 @@ int _starpu_opencl_is_direct_access_supported(unsigned node, unsigned handling_n
 uintptr_t _starpu_opencl_malloc_on_node(unsigned dst_node, size_t size, int flags);
 void _starpu_opencl_free_on_node(unsigned dst_node, uintptr_t addr, size_t size, int flags);
 
+#pragma GCC visibility pop
+
 #endif //  __DRIVER_OPENCL_H__

+ 4 - 0
src/drivers/opencl/driver_opencl_utils.h

@@ -17,10 +17,14 @@
 #ifndef __STARPU_OPENCL_UTILS_H__
 #define __STARPU_OPENCL_UTILS_H__
 
+#pragma GCC visibility push(hidden)
+
 /** @file */
 
 char *_starpu_opencl_get_device_type_as_string(int id);
 
 #define _STARPU_OPENCL_PLATFORM_MAX 4
 
+#pragma GCC visibility pop
+
 #endif /* __STARPU_OPENCL_UTILS_H__ */

+ 4 - 0
src/profiling/bound.h

@@ -23,6 +23,8 @@
 #include <starpu_bound.h>
 #include <core/jobs.h>
 
+#pragma GCC visibility push(hidden)
+
 /** Are we recording? */
 extern int _starpu_bound_recording;
 
@@ -41,4 +43,6 @@ extern void _starpu_bound_job_id_dep(starpu_data_handle_t handle, struct _starpu
 /** Clear recording */
 extern void starpu_bound_clear(void);
 
+#pragma GCC visibility pop
+
 #endif // __BOUND_H__

+ 4 - 0
src/profiling/profiling.h

@@ -25,6 +25,8 @@
 #include <starpu_util.h>
 #include <common/config.h>
 
+#pragma GCC visibility push(hidden)
+
 /** Create a task profiling info structure (with the proper time stamps) in case
  * profiling is enabled. */
 struct starpu_profiling_task_info *_starpu_allocate_profiling_info_if_needed(struct starpu_task *task);
@@ -81,4 +83,6 @@ void _starpu_profiling_start(void);
 
 void _starpu_profiling_terminate(void);
 
+#pragma GCC visibility pop
+
 #endif // __PROFILING_H__

+ 4 - 0
src/sched_policies/fifo_queues.h

@@ -25,6 +25,8 @@
 #include <starpu.h>
 #include <core/task.h>
 
+#pragma GCC visibility push(hidden)
+
 struct _starpu_fifo_taskq
 {
 	/** the actual list */
@@ -72,4 +74,6 @@ int _starpu_count_non_ready_buffers(struct starpu_task *task, unsigned worker);
 void _starpu_size_non_ready_buffers(struct starpu_task *task, unsigned worker, size_t *non_ready, size_t *non_loading);
 struct starpu_task *_starpu_fifo_pop_first_ready_task(struct _starpu_fifo_taskq *fifo_queue, unsigned workerid, int num_priorities);
 
+#pragma GCC visibility pop
+
 #endif // __FIFO_QUEUES_H__

+ 4 - 0
src/sched_policies/helper_mct.h

@@ -15,6 +15,8 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
+#pragma GCC visibility push(hidden)
+
 /** @file */
 
 struct _starpu_mct_data
@@ -69,3 +71,5 @@ void starpu_mct_compute_energy(struct starpu_sched_component *component,
 			       double *local_energy,
 			       unsigned *suitable_components,
 			       unsigned nsuitable_components);
+
+#pragma GCC visibility pop

+ 4 - 0
src/sched_policies/prio_deque.h

@@ -20,6 +20,8 @@
 #include <starpu_scheduler.h>
 #include <core/task.h>
 
+#pragma GCC visibility push(hidden)
+
 /** @file */
 
 struct _starpu_prio_deque
@@ -137,4 +139,6 @@ struct starpu_task * _starpu_prio_deque_deque_task_for_worker(struct _starpu_pri
 
 struct starpu_task *_starpu_prio_deque_deque_first_ready_task(struct _starpu_prio_deque *, unsigned workerid);
 
+#pragma GCC visibility pop
+
 #endif /* __PRIO_DEQUE_H__ */

+ 3 - 0
src/sched_policies/sched_component.h

@@ -22,6 +22,7 @@
 
 #include <starpu_sched_component.h>
 
+#pragma GCC visibility push(hidden)
 
 /** lock and unlock drivers for modifying schedulers */
 void _starpu_sched_component_lock_all_workers(void);
@@ -33,4 +34,6 @@ struct _starpu_worker * _starpu_sched_component_worker_get_worker(struct starpu_
 
 struct starpu_bitmap * _starpu_get_worker_mask(unsigned sched_ctx_id);
 
+#pragma GCC visibility pop
+
 #endif

+ 4 - 0
src/util/openmp_runtime_support.h

@@ -36,6 +36,8 @@
 #endif
 #include <ucontext.h>
 
+#pragma GCC visibility push(hidden)
+
 extern starpu_pthread_key_t omp_thread_key;
 extern starpu_pthread_key_t omp_task_key;
 
@@ -417,4 +419,6 @@ void _starpu_omp_dummy_init(void);
 void _starpu_omp_dummy_shutdown(void);
 #endif // STARPU_OPENMP
 
+#pragma GCC visibility pop
+
 #endif // __OPENMP_RUNTIME_SUPPORT_H__

+ 4 - 0
src/util/starpu_clusters_create.h

@@ -34,6 +34,8 @@
 extern
 #endif
 
+#pragma GCC visibility push(hidden)
+
 struct starpu_cluster_machine
 {
 	unsigned id;
@@ -126,5 +128,7 @@ static struct starpu_codelet _starpu_cluster_bind_cl=
 typedef void (*starpu_binding_function)(void*);
 starpu_binding_function _starpu_cluster_type_get_func(enum starpu_cluster_types type);
 
+#pragma GCC visibility pop
+
 #endif
 #endif /* __STARPU_CLUSTERS_CREATE_H__ */

+ 4 - 0
src/util/starpu_data_cpy.h

@@ -21,9 +21,13 @@
 
 #include <starpu.h>
 
+#pragma GCC visibility push(hidden)
+
 int _starpu_data_cpy(starpu_data_handle_t dst_handle, starpu_data_handle_t src_handle,
 			int asynchronous, void (*callback_func)(void*), void *callback_arg,
 			int reduction, struct starpu_task *reduction_dep_task);
 
+#pragma GCC visibility pop
+
 #endif // __STARPU_DATA_CPY_H__
 

+ 6 - 2
src/util/starpu_task_insert_utils.h

@@ -23,11 +23,15 @@
 #include <stdarg.h>
 #include <starpu.h>
 
+#pragma GCC visibility push(hidden)
+
 typedef void (*_starpu_callback_func_t)(void *);
 
 int _starpu_codelet_pack_args(void **arg_buffer, size_t *arg_buffer_size, va_list varg_list);
-int _starpu_task_insert_create(struct starpu_codelet *cl, struct starpu_task *task, va_list varg_list);
-int _fstarpu_task_insert_create(struct starpu_codelet *cl, struct starpu_task *task, void **arglist);
+int _starpu_task_insert_create(struct starpu_codelet *cl, struct starpu_task *task, va_list varg_list) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+int _fstarpu_task_insert_create(struct starpu_codelet *cl, struct starpu_task *task, void **arglist) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
+
+#pragma GCC visibility pop
 
 #endif // __STARPU_TASK_INSERT_UTILS_H__