ng_uni_cust.h (137199) | ng_uni_cust.h (138268) |
---|---|
1/* 2 * Copyright (c) 2001-2003 3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). 4 * All rights reserved. 5 * 6 * Author: Hartmut Brandt <harti@freebsd.org> 7 * 8 * Redistribution and use in source and binary forms, with or without --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * Customisation of signalling source to the NG environment. 30 * | 1/* 2 * Copyright (c) 2001-2003 3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). 4 * All rights reserved. 5 * 6 * Author: Hartmut Brandt <harti@freebsd.org> 7 * 8 * Redistribution and use in source and binary forms, with or without --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * Customisation of signalling source to the NG environment. 30 * |
31 * $FreeBSD: head/sys/netgraph/atm/uni/ng_uni_cust.h 137199 2004-11-04 12:33:55Z harti $ | 31 * $FreeBSD: head/sys/netgraph/atm/uni/ng_uni_cust.h 138268 2004-12-01 11:56:32Z glebius $ |
32 */ 33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/kernel.h> 37#include <sys/malloc.h> 38#include <sys/queue.h> 39#include <sys/lock.h> --- 40 unchanged lines hidden (view full) --- 80 */ 81struct uni_timer { 82 struct callout c; 83}; 84 85#define _TIMER_INIT(X,T) ng_callout_init(&(X)->T.c) 86#define _TIMER_DESTROY(UNI,FIELD) _TIMER_STOP(UNI,FIELD) 87#define _TIMER_STOP(UNI,FIELD) do { \ | 32 */ 33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/kernel.h> 37#include <sys/malloc.h> 38#include <sys/queue.h> 39#include <sys/lock.h> --- 40 unchanged lines hidden (view full) --- 80 */ 81struct uni_timer { 82 struct callout c; 83}; 84 85#define _TIMER_INIT(X,T) ng_callout_init(&(X)->T.c) 86#define _TIMER_DESTROY(UNI,FIELD) _TIMER_STOP(UNI,FIELD) 87#define _TIMER_STOP(UNI,FIELD) do { \ |
88 ng_untimeout(&FIELD.c, (UNI)->arg); \ | 88 ng_uncallout(&FIELD.c, (UNI)->arg); \ |
89 } while (0) 90#define TIMER_ISACT(UNI,T) ((UNI)->T.c.c_flags & (CALLOUT_ACTIVE | \ 91 CALLOUT_PENDING)) 92#define _TIMER_START(UNI,ARG,FIELD,DUE,FUNC) do { \ 93 _TIMER_STOP(UNI, FIELD); \ | 89 } while (0) 90#define TIMER_ISACT(UNI,T) ((UNI)->T.c.c_flags & (CALLOUT_ACTIVE | \ 91 CALLOUT_PENDING)) 92#define _TIMER_START(UNI,ARG,FIELD,DUE,FUNC) do { \ 93 _TIMER_STOP(UNI, FIELD); \ |
94 ng_timeout(&FIELD.c, (UNI)->arg, NULL, \ | 94 ng_callout(&FIELD.c, (UNI)->arg, NULL, \ |
95 hz * (DUE) / 1000, FUNC, (ARG), 0); \ 96 } while (0) 97 98#define TIMER_FUNC_UNI(T,F) \ 99static void F(struct uni *); \ 100static void \ 101_##T##_func(node_p node, hook_p hook, void *arg1, int arg2) \ 102{ \ --- 48 unchanged lines hidden --- | 95 hz * (DUE) / 1000, FUNC, (ARG), 0); \ 96 } while (0) 97 98#define TIMER_FUNC_UNI(T,F) \ 99static void F(struct uni *); \ 100static void \ 101_##T##_func(node_p node, hook_p hook, void *arg1, int arg2) \ 102{ \ --- 48 unchanged lines hidden --- |