Motr  M0
timer.c File Reference
#include "lib/timer.h"
#include <time.h>
#include <signal.h>
#include <unistd.h>
#include <sys/syscall.h>
#include "lib/errno.h"
#include "lib/thread.h"
#include "lib/memory.h"
#include "lib/mutex.h"
#include "lib/semaphore.h"
#include "lib/trace.h"
Include dependency graph for timer.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_LIB
 
#define TIMER_SIGNO   SIGRTMIN
 

Functions

 M0_TL_DESCR_DEFINE (tid, "thread IDs", static, struct m0_timer_tid, tt_linkage, tt_magic, 0x696c444954726d74, 0x686c444954726d74)
 
 M0_TL_DEFINE (tid, static, struct m0_timer_tid)
 
static pid_t _gettid ()
 
M0_INTERNAL void m0_timer_locality_init (struct m0_timer_locality *loc)
 
M0_INTERNAL void m0_timer_locality_fini (struct m0_timer_locality *loc)
 
static struct m0_timer_tidlocality_tid_find (struct m0_timer_locality *loc, pid_t tid)
 
static pid_t timer_locality_tid_next (struct m0_timer_locality *loc)
 
M0_INTERNAL int m0_timer_thread_attach (struct m0_timer_locality *loc)
 
M0_INTERNAL void m0_timer_thread_detach (struct m0_timer_locality *loc)
 
static int timer_posix_init (struct m0_timer *timer)
 
static void timer_posix_fini (timer_t posix_timer)
 
static m0_time_t timer_time_to_realtime (m0_time_t expire)
 
static void timer_posix_set (struct m0_timer *timer, m0_time_t expire, m0_time_t *old_expire)
 
static int timer_sigaction (int signo, void(*sighandler)(int, siginfo_t *, void *))
 
static void timer_sighandler (int signo, siginfo_t *si, void *u_ctx)
 
static int timer_hard_init (struct m0_timer *timer, struct m0_timer_locality *loc)
 
static void timer_hard_fini (struct m0_timer *timer)
 
static void timer_hard_start (struct m0_timer *timer)
 
static void timer_hard_stop (struct m0_timer *timer)
 
static void timer_working_thread (struct m0_timer *timer)
 
static int timer_soft_initfini (struct m0_timer *timer, bool init)
 
static int timer_soft_init (struct m0_timer *timer, struct m0_timer_locality *loc)
 
static void timer_soft_fini (struct m0_timer *timer)
 
static void timer_soft_start (struct m0_timer *timer)
 
static void timer_soft_stop (struct m0_timer *timer)
 
M0_INTERNAL int m0_timers_init (void)
 
M0_INTERNAL void m0_timers_fini (void)
 

Variables

static const m0_time_t zero_time = M0_MKTIME(0, 0)
 
static int clock_source_timer = -1
 
M0_INTERNAL const struct m0_timer_operations m0_timer_ops []
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_LIB

Definition at line 36 of file timer.c.