summaryrefslogtreecommitdiff
path: root/lockme.h
blob: 7cce97bb55330fbe1e755f11865836e25d8ddbe4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef LOCKME_H
#define LOCKME_H

#include <sys/mman.h>

#include "die.h"

static inline void xlockme(void)
{
	if (mlockall(MCL_CURRENT | MCL_FUTURE) != 0)
		panic("Cannot lock pages!\n");
}

static inline void xunlockme(void)
{
	munlockall();
}

#endif /* LOCKME_H */
n>space:mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-02-04 10:38:09 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-04 10:38:09 -0800
commit252bf9f4c43fd58f96587a97866cb7cc980e7544 (patch)
treeaeff11933ae538381392f91ec10da99e49c61c91 /drivers/usb/usb-skeleton.c
parent8fcdcc42a5268f298ac91962a5e816294435006f (diff)
parentb17c1bba9cec1727451b906d9a0c209774624873 (diff)
Merge tag 'staging-4.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging/IIO fixes from Greg KH: "Here are a few small IIO and one staging driver fix for 4.10-rc7. They fix some reported issues with the drivers. All of them have been in linux-next for a week or so with no reported issues" * tag 'staging-4.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: greybus: timesync: validate platform state callback iio: dht11: Use usleep_range instead of msleep for start signal iio: adc: palmas_gpadc: retrieve a valid iio_dev in suspend/resume iio: health: max30100: fixed parenthesis around FIFO count check iio: health: afe4404: retrieve a valid iio_dev in suspend/resume iio: health: afe4403: retrieve a valid iio_dev in suspend/resume
Diffstat (limited to 'drivers/usb/usb-skeleton.c')