we are switching to util_queue.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
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;'
print
def printRealFooter(self):
- print
- print '#endif'
+ pass
def print_sync_call(self, func):
call = 'CALL_{0}(ctx->CurrentServerDispatch, ({1}))'.format(
#include "main/marshal_generated.h"
#include "util/u_thread.h"
-#ifdef HAVE_PTHREAD
-
static void
glthread_allocate_batch(struct gl_context *ctx)
{
pthread_mutex_unlock(&glthread->mutex);
}
-
-#endif
/* 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>
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*/
#include "dispatch.h"
#include "marshal_generated.h"
-#ifdef HAVE_PTHREAD
-
struct marshal_cmd_Flush
{
struct marshal_cmd_base cmd_base;
(buffer, drawbuffer, value));
}
}
-
-#endif
uint16_t cmd_size;
};
-#ifdef HAVE_PTHREAD
-
static inline void *
_mesa_glthread_allocate_command(struct gl_context *ctx,
uint16_t cmd_id,
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
/**