1 /* Copyright (C) 2014 Free Software Foundation, Inc.
3 Contributed by Mentor Embedded.
5 This file is part of the GNU Offloading and Multi Processing Library
8 Libgomp is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3, or (at your option)
13 Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 FOR A PARTICULAR PURPOSE. See the GNU General Public License for
18 Under Section 7 of GPL version 3, you are granted additional
19 permissions described in the GCC Runtime Library Exception, version
20 3.1, as published by the Free Software Foundation.
22 You should have received a copy of the GNU General Public License and
23 a copy of the GCC Runtime Library Exception along with this program;
24 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
25 <http://www.gnu.org/licenses/>. */
27 /* Exported (non-hidden) functions exposing libgomp interface for plugins. */
32 #include "libgomp-plugin.h"
33 #include "libgomp_target.h"
36 GOMP_PLUGIN_malloc (size_t size
)
38 return gomp_malloc (size
);
42 GOMP_PLUGIN_malloc_cleared (size_t size
)
44 return gomp_malloc_cleared (size
);
48 GOMP_PLUGIN_realloc (void *ptr
, size_t size
)
50 return gomp_realloc (ptr
, size
);
54 GOMP_PLUGIN_debug (int kind
, const char *msg
, ...)
59 gomp_debug (kind
, msg
, ap
);
64 GOMP_PLUGIN_error (const char *msg
, ...)
69 gomp_verror (msg
, ap
);
74 GOMP_PLUGIN_fatal (const char *msg
, ...)
79 gomp_vfatal (msg
, ap
);
87 GOMP_PLUGIN_mutex_init (gomp_mutex_t
*mutex
)
89 gomp_mutex_init (mutex
);
93 GOMP_PLUGIN_mutex_destroy (gomp_mutex_t
*mutex
)
95 gomp_mutex_destroy (mutex
);
99 GOMP_PLUGIN_mutex_lock (gomp_mutex_t
*mutex
)
101 gomp_mutex_lock (mutex
);
105 GOMP_PLUGIN_mutex_unlock (gomp_mutex_t
*mutex
)
107 gomp_mutex_unlock (mutex
);