implement poll and read
[~madcoder/pwqr.git] / kernel / pwqr.h
1 /*
2  * Copyright (C) 2012   Pierre Habouzit <pierre.habouzit@intersec.com>
3  * Copyright (C) 2012   Intersec SAS
4  *
5  * This file implements the Linux Pthread Workqueue Regulator, and is part
6  * of the linux kernel.
7  *
8  * The Linux Kernel is free software: you can redistribute it and/or modify it
9  * under the terms of the GNU General Public License version 2 as published by
10  * the Free Software Foundation.
11  *
12  * The Linux Kernel is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
15  * License for more details.
16  *
17  * You should have received a copy of the GNU General Public License version 2
18  * along with The Linux Kernel.  If not, see <http://www.gnu.org/licenses/>.
19  */
20
21 #ifndef _LINUX_PWQR_H
22 #define _LINUX_PWQR_H
23 #include <linux/ioctl.h>
24
25 #define PWQR_DEVICE_NAME        "pwq"
26 #define PWQR_IO                 '}'
27
28 struct pwqr_ioc_wait {
29         int     pwqr_ticket;
30         void   *pwqr_uaddr;
31 };
32
33 #define PWQR_GET_CONC           _IO (PWQR_IO, 0)
34 #define PWQR_SET_CONC           _IO (PWQR_IO, 1)
35 #define PWQR_REGISTER           _IO (PWQR_IO, 2)
36 #define PWQR_UNREGISTER         _IO (PWQR_IO, 3)
37 #define PWQR_WAKE               _IO (PWQR_IO, 4)
38 #define PWQR_WAKE_OC            _IO (PWQR_IO, 5)
39 #define PWQR_WAIT               _IOW(PWQR_IO, 6, struct pwqr_ioc_wait)
40 #define PWQR_PARK               _IO (PWQR_IO, 7)
41
42 #endif