From 24607d88ed29cf3d11c9138adb03089de528b212 Mon Sep 17 00:00:00 2001 From: Jonathan Lemon Date: Sat, 24 Feb 2001 01:44:03 +0000 Subject: [PATCH] Add an EV_SET() convenience macro for initializing struct kevent prior to the call to kevent(). Update the copyright notices as well. --- sys/kern/kern_event.c | 2 +- sys/sys/event.h | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 93a3d9fb1fc..14c162cca94 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999,2000 Jonathan Lemon + * Copyright (c) 1999,2000,2001 Jonathan Lemon * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/sys/event.h b/sys/sys/event.h index 444bcaf27d4..de4eefe9869 100644 --- a/sys/sys/event.h +++ b/sys/sys/event.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999,2000 Jonathan Lemon + * Copyright (c) 1999,2000,2001 Jonathan Lemon * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -38,6 +38,15 @@ #define EVFILT_SYSCOUNT 6 +#define EV_SET(kevp, a, b, c, d, e, f) do { \ + (kevp)->ident = (a); \ + (kevp)->filter = (b); \ + (kevp)->flags = (c); \ + (kevp)->fflags = (d); \ + (kevp)->data = (e); \ + (kevp)->udata = (f); \ +} while(0) + struct kevent { uintptr_t ident; /* identifier for this event */ short filter; /* filter for event */