X-Git-Url: http://git.madism.org/?p=~madcoder%2Fpwqr.git;a=blobdiff_plain;f=kernel%2Fpwqr.h;h=aaf2aa4964c79c7abe014adcc0b6e9d4adff92b0;hp=a7aa086bcfbd84cd9a11c0e9cb4014d4fd09d760;hb=a5f7e5aaf5bb2168aca37066eb6b49d126689aa6;hpb=c78f2216a947e712fff07f6e79f743d9009e60c8 diff --git a/kernel/pwqr.h b/kernel/pwqr.h index a7aa086..aaf2aa4 100644 --- a/kernel/pwqr.h +++ b/kernel/pwqr.h @@ -22,6 +22,12 @@ #define _LINUX_PWQR_H #include +#ifdef __KERNEL__ +#include +#else +#include +#endif + #define PWQR_DEVICE_NAME "pwq" #define PWQR_IO '}' @@ -30,13 +36,18 @@ struct pwqr_ioc_wait { void *pwqr_uaddr; }; -#define PWQR_GET_CONC _IO (PWQR_IO, 0) -#define PWQR_SET_CONC _IO (PWQR_IO, 1) -#define PWQR_REGISTER _IO (PWQR_IO, 2) -#define PWQR_UNREGISTER _IO (PWQR_IO, 3) -#define PWQR_WAKE _IO (PWQR_IO, 4) -#define PWQR_WAKE_OC _IO (PWQR_IO, 5) -#define PWQR_WAIT _IOW(PWQR_IO, 6, struct pwqr_ioc_wait) -#define PWQR_PARK _IO (PWQR_IO, 7) +#define PWQR_CTL_GET_CONC _IO (PWQR_IO, 0) +#define PWQR_CTL_SET_CONC _IO (PWQR_IO, 1) +#define PWQR_CTL_REGISTER _IO (PWQR_IO, 2) +#define PWQR_CTL_UNREGISTER _IO (PWQR_IO, 3) +#define PWQR_CTL_WAKE _IO (PWQR_IO, 4) +#define PWQR_CTL_WAKE_OC _IO (PWQR_IO, 5) +#define PWQR_CTL_WAIT _IOW(PWQR_IO, 6, struct pwqr_ioc_wait) +#define PWQR_CTL_PARK _IO (PWQR_IO, 7) + +#define PWQR_FL_NONBLOCK O_NONBLOCK +#define PWQR_FL_CLOEXEC O_CLOEXEC +#define PWQR_FL__FCTNL_FLAGS (PWQR_FL_NONBLOCK | PWQR_FL_CLOEXEC) +#define PWQR_FL__SET (PWQR_FL__FCTNL_FLAGS) #endif