2 * Copyright (C) 2012 Pierre Habouzit <pierre.habouzit@intersec.com>
3 * Copyright (C) 2012 Intersec SAS
5 * This file implements the Linux Pthread Workqueue Regulator, and is part
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.
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.
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/>.
23 #include <linux/ioctl.h>
26 #include <linux/fcntl.h>
31 #define PWQR_DEVICE_NAME "pwq"
34 struct pwqr_ioc_wait {
39 #define PWQR_CTL_GET_CONC _IO (PWQR_IO, 0)
40 #define PWQR_CTL_SET_CONC _IO (PWQR_IO, 1)
41 #define PWQR_CTL_REGISTER _IO (PWQR_IO, 2)
42 #define PWQR_CTL_UNREGISTER _IO (PWQR_IO, 3)
43 #define PWQR_CTL_WAKE _IO (PWQR_IO, 4)
44 #define PWQR_CTL_WAKE_OC _IO (PWQR_IO, 5)
45 #define PWQR_CTL_WAIT _IOW(PWQR_IO, 6, struct pwqr_ioc_wait)
46 #define PWQR_CTL_PARK _IO (PWQR_IO, 7)
48 #define PWQR_FL_NONBLOCK O_NONBLOCK
49 #define PWQR_FL_CLOEXEC O_CLOEXEC
50 #define PWQR_FL__FCTNL_FLAGS (PWQR_FL_NONBLOCK | PWQR_FL_CLOEXEC)
51 #define PWQR_FL__SET (PWQR_FL__FCTNL_FLAGS)