Example #1
0
/**
 * Set the current context pointer for this thread.
 * The context pointer is an opaque type which should be cast to
 * void from the real context pointer type.
 */
void
u_current_set_user(const void *ptr)
{
   u_current_init();

#if defined(GLX_USE_TLS)
   u_current_user = (void *) ptr;
#elif defined(THREADS)
   u_tsd_set(&u_current_user_tsd, (void *) ptr);
   u_current_user = (ThreadSafe) ? NULL : (void *) ptr;
#else
   u_current_user = (void *) ptr;
#endif
}
Example #2
0
/**
 * Set the global or per-thread dispatch table pointer.
 * If the dispatch parameter is NULL we'll plug in the no-op dispatch
 * table (__glapi_noop_table).
 */
void
u_current_set(const struct mapi_table *tbl)
{
   u_current_init();

   stub_init_once();

   if (!tbl)
      tbl = (const struct mapi_table *) table_noop_array;

#if defined(GLX_USE_TLS)
   u_current_table = (struct mapi_table *) tbl;
#elif defined(THREADS)
   u_tsd_set(&u_current_table_tsd, (void *) tbl);
   u_current_table = (ThreadSafe) ? NULL : (void *) tbl;
#else
   u_current_table = (struct mapi_table *) tbl;
#endif
}
Example #3
0
void
_glapi_check_multithread(void)
{
   u_current_init();
}
Example #4
0
void
_glapi_init(void)
{
    u_current_init();
    entry_init_public();
}