return entry;
}
+/*
+ * Wait until the current stack of async calls is completely flushed out
+ */
VG_STATIC void vg_async_stall(void)
{
vg_info( "async_stall: %d\n", SDL_SemValue( vg_async.sem_wait_for_flush ) );
SDL_AtomicUnlock( &vg_async.sl_index );
}
+/*
+ * Make a simple async call without allocating extra.
+ */
+VG_STATIC void vg_async_call( void (*runner)( void *payload, u32 size ),
+ void *payload, u32 size )
+{
+ vg_async_item *call = vg_async_alloc(0);
+ call->payload = payload;
+ call->size = size;
+ vg_async_dispatch( call, runner );
+}
+
/*
* Run as much of the async buffer as possible
*/