summaryrefslogtreecommitdiff
path: root/include/linux/tegra_sema.h
blob: 7b423b6cb5c4abcaaf455788831cb14881d19348 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
 * Copyright (C) 2010 Google, Inc.
 *
 * Author:
 *   Dima Zavin <dima@android.com>
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
 * may be copied, distributed, and modified under those terms.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 */

#ifndef __LINUX_TEGRA_SEMA_H
#define __LINUX_TEGRA_SEMA_H

/* this shares the magic with the tegra RPC and AVP drivers.
 *  See include/linux/tegra_avp.h and include/linux/tegra_rpc.h */
#define TEGRA_SEMA_IOCTL_MAGIC		'r'

/* If IOCTL_WAIT is interrupted by a signal and the timeout was not -1,
 * then the value pointed to by the argument will be updated with the amount
 * of time remaining for the wait. */
#define TEGRA_SEMA_IOCTL_WAIT		_IOW(TEGRA_SEMA_IOCTL_MAGIC, 0x30, long *)
#define TEGRA_SEMA_IOCTL_SIGNAL		_IO(TEGRA_SEMA_IOCTL_MAGIC, 0x31)

#define TEGRA_SEMA_IOCTL_MIN_NR		_IOC_NR(TEGRA_SEMA_IOCTL_WAIT)
#define TEGRA_SEMA_IOCTL_MAX_NR		_IOC_NR(TEGRA_SEMA_IOCTL_SIGNAL)

#endif