mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-09 00:00:08 +02:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c191f17091 | ||
|
|
7781f0c8d6 |
@@ -0,0 +1,2 @@
|
||||
# Tokio FFI
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
#include <stdint.h>
|
||||
|
||||
struct RuntimeHooks {
|
||||
void (*on_thread_park)(void);
|
||||
|
||||
void (*on_thread_unpark)(void);
|
||||
|
||||
void (*on_thread_start)(void);
|
||||
|
||||
void (*on_thread_stop)(void);
|
||||
}__attribute__((__packed__));
|
||||
|
||||
struct RuntimeOptions {
|
||||
bool enable_time;
|
||||
bool enable_io;
|
||||
|
||||
uint32_t event_interval;
|
||||
uint32_t global_queue_interval;
|
||||
|
||||
size_t max_blocking_threads;
|
||||
|
||||
size_t max_io_events_per_tick;
|
||||
|
||||
uint8_t runtime_kind;
|
||||
|
||||
bool start_paused;
|
||||
|
||||
struct timespec *thread_keep_alive;
|
||||
|
||||
struct RuntimeHooks *runtime_hooks;
|
||||
|
||||
char *thread_name;
|
||||
|
||||
char *(*thread_name_fn)(void);
|
||||
|
||||
size_t thread_stack_size;
|
||||
|
||||
size_t worker_threads;
|
||||
}__attribute__((__packed__));
|
||||
|
||||
struct Runtime;
|
||||
@@ -0,0 +1,23 @@
|
||||
struct RawWakerVTable {
|
||||
void (*clone)(void *);
|
||||
|
||||
void (*wake)(void *);
|
||||
|
||||
void (*wake_by_ref)(void *);
|
||||
|
||||
void (*drop)(void *);
|
||||
} __attribute__((__packed__));
|
||||
|
||||
struct Waker {
|
||||
void *data;
|
||||
};
|
||||
|
||||
struct Context {
|
||||
|
||||
};
|
||||
|
||||
struct Task {
|
||||
void *data;
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user