Mesa (master): mesa/glthread: remove HAVE_PTHREAD guards

Marek Olšák mareko at kemper.freedesktop.org
Mon Jun 26 00:22:14 UTC 2017


Module: Mesa
Branch: master
Commit: 1e37a5054b1f47a0e95183bd99b8c6a3a8be4725
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1e37a5054b1f47a0e95183bd99b8c6a3a8be4725

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Wed Jun 21 12:24:33 2017 +0200

mesa/glthread: remove HAVE_PTHREAD guards

we are switching to util_queue.

Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>

---

 src/mapi/glapi/gen/gl_marshal.py |  5 +----
 src/mesa/main/glthread.c         |  4 ----
 src/mesa/main/glthread.h         | 30 ------------------------------
 src/mesa/main/marshal.c          |  4 ----
 src/mesa/main/marshal.h          | 27 ---------------------------
 5 files changed, 1 insertion(+), 69 deletions(-)

diff --git a/src/mapi/glapi/gen/gl_marshal.py b/src/mapi/glapi/gen/gl_marshal.py
index f52b9b7b81..062afe566f 100644
--- a/src/mapi/glapi/gen/gl_marshal.py
+++ b/src/mapi/glapi/gen/gl_marshal.py
@@ -66,8 +66,6 @@ class PrintCode(gl_XML.gl_print_base):
 
     def printRealHeader(self):
         print header
-        print '#ifdef HAVE_PTHREAD'
-        print
         print 'static inline int safe_mul(int a, int b)'
         print '{'
         print '    if (a < 0 || b < 0) return -1;'
@@ -78,8 +76,7 @@ class PrintCode(gl_XML.gl_print_base):
         print
 
     def printRealFooter(self):
-        print
-        print '#endif'
+        pass
 
     def print_sync_call(self, func):
         call = 'CALL_{0}(ctx->CurrentServerDispatch, ({1}))'.format(
diff --git a/src/mesa/main/glthread.c b/src/mesa/main/glthread.c
index 455b829cd8..e90709c087 100644
--- a/src/mesa/main/glthread.c
+++ b/src/mesa/main/glthread.c
@@ -38,8 +38,6 @@
 #include "main/marshal_generated.h"
 #include "util/u_thread.h"
 
-#ifdef HAVE_PTHREAD
-
 static void
 glthread_allocate_batch(struct gl_context *ctx)
 {
@@ -284,5 +282,3 @@ _mesa_glthread_finish(struct gl_context *ctx)
 
    pthread_mutex_unlock(&glthread->mutex);
 }
-
-#endif
diff --git a/src/mesa/main/glthread.h b/src/mesa/main/glthread.h
index 50c1db2548..07bed380cb 100644
--- a/src/mesa/main/glthread.h
+++ b/src/mesa/main/glthread.h
@@ -29,8 +29,6 @@
 /* Command size is a number of bytes stored in a short. */
 #define MARSHAL_MAX_CMD_SIZE 65535
 
-#ifdef HAVE_PTHREAD
-
 #include <inttypes.h>
 #include <stdbool.h>
 #include <pthread.h>
@@ -124,32 +122,4 @@ void _mesa_glthread_restore_dispatch(struct gl_context *ctx);
 void _mesa_glthread_flush_batch(struct gl_context *ctx);
 void _mesa_glthread_finish(struct gl_context *ctx);
 
-#else /* HAVE_PTHREAD */
-
-static inline void
-_mesa_glthread_init(struct gl_context *ctx)
-{
-}
-
-static inline void
-_mesa_glthread_destroy(struct gl_context *ctx)
-{
-}
-
-static inline void
-_mesa_glthread_finish(struct gl_context *ctx)
-{
-}
-
-static inline void
-_mesa_glthread_restore_dispatch(struct gl_context *ctx)
-{
-}
-
-static inline void
-_mesa_glthread_flush_batch(struct gl_context *ctx)
-{
-}
-
-#endif /* !HAVE_PTHREAD */
 #endif /* _GLTHREAD_H*/
diff --git a/src/mesa/main/marshal.c b/src/mesa/main/marshal.c
index d4c46a2717..8db4531440 100644
--- a/src/mesa/main/marshal.c
+++ b/src/mesa/main/marshal.c
@@ -33,8 +33,6 @@
 #include "dispatch.h"
 #include "marshal_generated.h"
 
-#ifdef HAVE_PTHREAD
-
 struct marshal_cmd_Flush
 {
    struct marshal_cmd_base cmd_base;
@@ -589,5 +587,3 @@ _mesa_marshal_ClearBufferfv(GLenum buffer, GLint drawbuffer,
                          (buffer, drawbuffer, value));
    }
 }
-
-#endif
diff --git a/src/mesa/main/marshal.h b/src/mesa/main/marshal.h
index 46f76634fb..a6cff8bcbf 100644
--- a/src/mesa/main/marshal.h
+++ b/src/mesa/main/marshal.h
@@ -47,8 +47,6 @@ struct marshal_cmd_base
    uint16_t cmd_size;
 };
 
-#ifdef HAVE_PTHREAD
-
 static inline void *
 _mesa_glthread_allocate_command(struct gl_context *ctx,
                                 uint16_t cmd_id,
@@ -94,31 +92,6 @@ _mesa_glthread_is_non_vbo_draw_elements(const struct gl_context *ctx)
    return ctx->API != API_OPENGL_CORE && !glthread->element_array_is_vbo;
 }
 
-#else
-
-/* FIXME: dummy functions for non PTHREAD platforms */
-static inline void *
-_mesa_glthread_allocate_command(struct gl_context *ctx,
-                                uint16_t cmd_id,
-                                size_t size)
-{
-   return NULL;
-}
-
-static inline bool
-_mesa_glthread_is_non_vbo_vertex_attrib_pointer(const struct gl_context *ctx)
-{
-   return false;
-}
-
-static inline bool
-_mesa_glthread_is_non_vbo_draw_elements(const struct gl_context *ctx)
-{
-   return false;
-}
-
-#endif
-
 #define DEBUG_MARSHAL_PRINT_CALLS 0
 
 /**




More information about the mesa-commit mailing list