[Mesa-dev] [PATCH] Fix visibility of u_thread functions
Matt Turner
mattst88 at gmail.com
Mon Jan 23 11:48:00 PST 2012
-fvisibility=hidden was preventing them from being exported, which
combined with shared-glapi was causing undefined symbol errors at
runtime.
---
Brian: there might be more functions that should be exported. Let
me know (or let me know what to test to find them) and I'll clean
them up too.
src/mapi/mapi/u_thread.c | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/mapi/mapi/u_thread.c b/src/mapi/mapi/u_thread.c
index 7b52ca9..393ae48 100644
--- a/src/mapi/mapi/u_thread.c
+++ b/src/mapi/mapi/u_thread.c
@@ -62,14 +62,14 @@
*/
#ifdef PTHREADS
-unsigned long
+PUBLIC unsigned long
u_thread_self(void)
{
return (unsigned long) pthread_self();
}
-void
+PUBLIC void
u_tsd_init(struct u_tsd *tsd)
{
if (pthread_key_create(&tsd->key, NULL/*free*/) != 0) {
@@ -80,7 +80,7 @@ u_tsd_init(struct u_tsd *tsd)
}
-void *
+PUBLIC void *
u_tsd_get(struct u_tsd *tsd)
{
if (tsd->initMagic != (int) INIT_MAGIC) {
@@ -90,7 +90,7 @@ u_tsd_get(struct u_tsd *tsd)
}
-void
+PUBLIC void
u_tsd_set(struct u_tsd *tsd, void *ptr)
{
if (tsd->initMagic != (int) INIT_MAGIC) {
@@ -113,14 +113,14 @@ u_tsd_set(struct u_tsd *tsd, void *ptr)
*/
#ifdef WIN32
-unsigned long
+PUBLIC unsigned long
u_thread_self(void)
{
return GetCurrentThreadId();
}
-void
+PUBLIC void
u_tsd_init(struct u_tsd *tsd)
{
tsd->key = TlsAlloc();
@@ -132,7 +132,7 @@ u_tsd_init(struct u_tsd *tsd)
}
-void
+PUBLIC void
u_tsd_destroy(struct u_tsd *tsd)
{
if (tsd->initMagic != INIT_MAGIC) {
@@ -143,7 +143,7 @@ u_tsd_destroy(struct u_tsd *tsd)
}
-void *
+PUBLIC void *
u_tsd_get(struct u_tsd *tsd)
{
if (tsd->initMagic != INIT_MAGIC) {
@@ -153,7 +153,7 @@ u_tsd_get(struct u_tsd *tsd)
}
-void
+PUBLIC void
u_tsd_set(struct u_tsd *tsd, void *ptr)
{
/* the following code assumes that the struct u_tsd has been initialized
@@ -177,21 +177,21 @@ u_tsd_set(struct u_tsd *tsd, void *ptr)
* no-op functions
*/
-unsigned long
+PUBLIC unsigned long
u_thread_self(void)
{
return 0;
}
-void
+PUBLIC void
u_tsd_init(struct u_tsd *tsd)
{
(void) tsd;
}
-void *
+PUBLIC void *
u_tsd_get(struct u_tsd *tsd)
{
(void) tsd;
@@ -199,7 +199,7 @@ u_tsd_get(struct u_tsd *tsd)
}
-void
+PUBLIC void
u_tsd_set(struct u_tsd *tsd, void *ptr)
{
(void) tsd;
--
1.7.3.4
More information about the mesa-dev
mailing list