| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
#pragma once |
| 23 |
|
| 24 |
#include <glib.h> |
| 25 |
|
| 26 |
G_BEGIN_DECLS |
| 27 |
|
| 28 |
#define DEX_THREAD_POOL_WORKER_CURRENT (dex_thread_storage_get()->worker) |
| 29 |
#define DEX_DISPATCH_RECURSE_MAX 4 |
| 30 |
|
| 31 |
typedef struct _DexAioContext DexAioContext; |
| 32 |
typedef struct _DexCoroutineScheduler DexCoroutineScheduler; |
| 33 |
typedef struct _DexFiberScheduler DexFiberScheduler; |
| 34 |
typedef struct _DexScheduler DexScheduler; |
| 35 |
typedef struct _DexThreadPoolWorker DexThreadPoolWorker; |
| 36 |
|
| 37 |
typedef struct _DexThreadStorage |
| 38 |
{ |
| 39 |
DexScheduler *scheduler; |
| 40 |
gpointer task_group; |
| 41 |
DexThreadPoolWorker *worker; |
| 42 |
DexAioContext *aio_context; |
| 43 |
DexFiberScheduler *fiber_scheduler; |
| 44 |
DexCoroutineScheduler *coroutine_scheduler; |
| 45 |
guint sync_dispatch_depth; |
| 46 |
} DexThreadStorage; |
| 47 |
|
| 48 |
DexThreadStorage *dex_thread_storage_get (void); |
| 49 |
DexThreadStorage *dex_thread_storage_peek (void); |
| 50 |
|
| 51 |
G_END_DECLS |