32 #include <sys/cdefs.h> 33 __FBSDID(
"$FreeBSD$");
36 #ifndef _NETINET_SCTP_CALLOUT_ 37 #define _NETINET_SCTP_CALLOUT_ 49 #define _SCTP_NEEDS_CALLOUT_ 1 51 #define SCTP_TICKS_PER_FASTTIMO 20 53 #if defined(__Userspace__) 54 #if defined(__Userspace_os_Windows) 55 #define SCTP_TIMERQ_LOCK() EnterCriticalSection(&SCTP_BASE_VAR(timer_mtx)) 56 #define SCTP_TIMERQ_UNLOCK() LeaveCriticalSection(&SCTP_BASE_VAR(timer_mtx)) 57 #define SCTP_TIMERQ_LOCK_INIT() InitializeCriticalSection(&SCTP_BASE_VAR(timer_mtx)) 58 #define SCTP_TIMERQ_LOCK_DESTROY() DeleteCriticalSection(&SCTP_BASE_VAR(timer_mtx)) 61 #define SCTP_TIMERQ_LOCK() KASSERT(pthread_mutex_lock(&SCTP_BASE_VAR(timer_mtx)) == 0, ("%s: timer_mtx already locked", __func__)) 62 #define SCTP_TIMERQ_UNLOCK() KASSERT(pthread_mutex_unlock(&SCTP_BASE_VAR(timer_mtx)) == 0, ("%s: timer_mtx not locked", __func__)) 64 #define SCTP_TIMERQ_LOCK() (void)pthread_mutex_lock(&SCTP_BASE_VAR(timer_mtx)) 65 #define SCTP_TIMERQ_UNLOCK() (void)pthread_mutex_unlock(&SCTP_BASE_VAR(timer_mtx)) 67 #define SCTP_TIMERQ_LOCK_INIT() (void)pthread_mutex_init(&SCTP_BASE_VAR(timer_mtx), &SCTP_BASE_VAR(mtx_attr)) 68 #define SCTP_TIMERQ_LOCK_DESTROY() (void)pthread_mutex_destroy(&SCTP_BASE_VAR(timer_mtx)) 85 #define SCTP_CALLOUT_ACTIVE 0x0002 86 #define SCTP_CALLOUT_PENDING 0x0004 92 #define SCTP_OS_TIMER_INIT sctp_os_timer_init 93 #define SCTP_OS_TIMER_START sctp_os_timer_start 94 #define SCTP_OS_TIMER_STOP sctp_os_timer_stop 96 #define SCTP_OS_TIMER_STOP_DRAIN SCTP_OS_TIMER_STOP 97 #define SCTP_OS_TIMER_PENDING(tmr) ((tmr)->c_flags & SCTP_CALLOUT_PENDING) 98 #define SCTP_OS_TIMER_ACTIVE(tmr) ((tmr)->c_flags & SCTP_CALLOUT_ACTIVE) 99 #define SCTP_OS_TIMER_DEACTIVATE(tmr) ((tmr)->c_flags &= ~SCTP_CALLOUT_ACTIVE) 101 #if defined(__Userspace__) 102 void sctp_start_timer(
void);
104 #if defined(__APPLE__) 105 void sctp_timeout(
void *);
TAILQ_HEAD(calloutlist, sctp_callout)
void sctp_os_timer_start(sctp_os_timer_t *, int, void(*)(void *), void *)
Definition: sctp_callout.c:87
int c_flags
Definition: sctp_callout.h:81
int sctp_os_timer_stop(sctp_os_timer_t *)
Definition: sctp_callout.c:125
void * c_arg
Definition: sctp_callout.h:79
void
Definition: AVFoundationCFSoftLinking.h:81
void sctp_os_timer_init(sctp_os_timer_t *tmr)
Definition: sctp_callout.c:81
int c_time
Definition: sctp_callout.h:78
Definition: sctp_callout.h:76
TAILQ_ENTRY(sctp_callout) tqe
void(* c_func)(void *)
Definition: sctp_callout.h:80
int sctp_get_tick_count(void)
Definition: sctp_callout.c:64