#include <errno.h>#include <pthread.h>#include <signal.h>#include <stdatomic.h>#include <string.h>#include <time.h>#include <atalk/logger.h>#include <atalk/util.h>#include <atalk/queue.h>#include "dircache.h"#include "directory.h"#include "idle_worker.h"Macros | |
| #define | IW_WAKE_MS 10 |
| #define | IW_SPIN_ITERATIONS 128 |
| #define | IW_WAIT_SLEEP_NS 100000L |
| #define | IW_CPU_RELAX() __asm__ __volatile__("" ::: "memory") |
| #define | IW_STAT_INC(field) atomic_fetch_add_explicit(&iw_stat.field, 1, memory_order_relaxed) |
Functions | |
| int | iw_init (void) |
| void | iw_grant (void) |
| void | iw_revoke (void) |
| void | iw_revoke_signal_safe (void) |
| void | iw_shutdown (void) |
| void | iw_note_work (void) |
| int | iw_grant_active (void) |
| int | iw_is_active (void) |
| void | iw_log_stats (void) |
Variables | ||
| static atomic_int | iw_has_work = 0 | |
| static atomic_int | iw_can_work = 0 | |
| static atomic_int | iw_is_working = 0 | |
| static atomic_int | iw_shutdown_flag = 0 | |
| static pthread_t | iw_tid | |
| static int | iw_started = 0 | |
| static int | iw_granted = 0 | |
| struct { | ||
| atomic_uint work_noted | ||
| atomic_uint grants | ||
| atomic_uint cycles_started | ||
| atomic_uint cycles_completed | ||
| atomic_uint cycles_interrupted | ||
| atomic_uint cycles_aborted | ||
| atomic_uint invalid_freed | ||
| atomic_uint chains_processed | ||
| } | iw_stat | |
| #define IW_CPU_RELAX | ( | ) | __asm__ __volatile__("" ::: "memory") |
| #define IW_SPIN_ITERATIONS 128 |
| #define IW_STAT_INC | ( | field | ) | atomic_fetch_add_explicit(&iw_stat.field, 1, memory_order_relaxed) |
| #define IW_WAIT_SLEEP_NS 100000L |
| #define IW_WAKE_MS 10 |
| void iw_grant | ( | void | ) |
| int iw_grant_active | ( | void | ) |
| int iw_init | ( | void | ) |
| int iw_is_active | ( | void | ) |
| void iw_log_stats | ( | void | ) |
| void iw_note_work | ( | void | ) |
| void iw_revoke | ( | void | ) |
| void iw_revoke_signal_safe | ( | void | ) |
| void iw_shutdown | ( | void | ) |
| atomic_uint chains_processed |
| atomic_uint cycles_aborted |
| atomic_uint cycles_completed |
| atomic_uint cycles_interrupted |
| atomic_uint cycles_started |
| atomic_uint grants |
| atomic_uint invalid_freed |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| struct { ... } iw_stat |
|
static |
| atomic_uint work_noted |