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 */
t/commit/?id=ad3cba989e8b1bbefe078eece29f0e8d8aaea1d6'>ad3cba989e8b1bbefe078eece29f0e8d8aaea1d6 (patch) tree3e112eeef812641a282e1c85cc029a217f2227d1 parent12c97c13ea7174db5b5dc4a1ef91d4e9245bb569 (diff)
net: mediatek: only wake the queue if it is stopped
The current code unconditionally wakes up the queue at the end of each tx_poll action. Change the code to only wake up the queues if any of them have actually been stopped before. Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat