fix header for use in kernel

git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@215 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
This commit is contained in:
mheily 2010-02-27 20:07:48 +00:00
parent 7f9d68e45f
commit e347e440a5
2 changed files with 9 additions and 2 deletions

View File

@ -30,14 +30,17 @@
#ifndef _SYS_EVENT_H_
#define _SYS_EVENT_H_
#ifdef __KERNEL__
#define intptr_t long
#else
#include <sys/queue.h>
#include <sys/types.h>
#include <stdint.h>
#define LIBKQUEUE 1
#endif
struct timespec;
#define LIBKQUEUE 1
#define EVFILT_READ (-1)
#define EVFILT_WRITE (-2)
#define EVFILT_AIO (-3) /* attached to aio requests */
@ -161,6 +164,7 @@ struct kevent {
#define VQ_NOTRESPLOCK 0x0080 /* server lockd down */
#ifndef __KERNEL__
#ifdef __cplusplus
extern "C" {
#endif
@ -173,5 +177,6 @@ int kevent(int kq, const struct kevent *changelist, int nchanges,
#ifdef __cplusplus
}
#endif
#endif /* !__KERNEL__* */
#endif /* !_SYS_EVENT_H_ */

View File

@ -24,6 +24,8 @@
#include <linux/syscalls.h>
#include <linux/uaccess.h>
#include "../include/sys/event.h"
/* Max. number of descriptors that can be associated with a kqueue descriptor */
#define KQUEUE_FD_MAX 10