summaryrefslogtreecommitdiff
path: root/memdebug/memdebug.h
blob: 3ae1159c4da612b53236b15c350429a490c945a8 (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
35
36
37
38
39
40
41
42
43
44
#ifndef _MEMDEBUG_H_
#define _MEMDEBUG_H_

#include <stdlib.h>

#ifdef MEMDEBUG_TRACE
# define memdebug_trace(fmt, args...) \
	({ \
	 fprintf(stderr, "*** " fmt " ***\n", ##args); \
	 fflush(stderr); \
	 })
#else
# define memdebug_trace(fmt, args...)
#endif

struct memdebug_heap_item {
	struct memdebug_heap_item *next;

	void *addr;
	size_t size;

	const char *func;
	const char *file;
	unsigned int line;

#ifdef MEMDEBUG_TRACE_DOUBLE_FREE
	const char *freed_func;
	const char *freed_file;
	unsigned int freed_line;
#endif
};

#define memdebug_malloc(size) \
	__memdebug_malloc(size, __func__, __FILE__, __LINE__)
#define memdebug_free(ptr) \
	__memdebug_free(ptr, __func__, __FILE__, __LINE__)

void *__memdebug_malloc(size_t size, const char *func,
                        const char *file, const unsigned int line);
void __memdebug_free(void *ptr, const char *func,
                   const char *file, const unsigned int line);
void memdebug_report(void);

#endif /* _MEMDEBUG_H_ */
1b69099c3c7bd6be3087b0ba'>e7aa8c2eb11ba69b1b69099c3c7bd6be3087b0ba (diff)parentacf1fcf77247efa01d7213f53082451f6c9c8f3b (diff)
Merge tag 'gpio-v4.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
Pull GPIO updates from Luinus Walleij: "Bulk GPIO changes for the v4.10 kernel cycle: Core changes: - Simplify threaded interrupt handling: instead of passing numbed parameters to gpiochip_irqchip_add_chained() we create a new call: gpiochip_irqchip_add_nested() so the two types are clearly semantically different. Also make sure that all nested chips call gpiochip_set_nested_irqchip() which is necessary for IRQ resend to work properly if it happens. - Return error on seek operations for the chardev. - Clamp values set as part of gpio[d]_direction_output() so that anything != 0 will be send down to the driver as "1" not the value passed in. - ACPI can now support naming of GPIO lines, hogs and holes in the GPIO lists. New drivers: - The SX150x driver was deemed unfit for the GPIO subsystem and was moved over to a combined GPIO+pinctrl driver in the pinctrl subsystem. New features: - Various cleanups to various drivers" * tag 'gpio-v4.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (49 commits) gpio: merrifield: Implement gpio_get_direction callback gpio: merrifield: Add support for hardware debouncer gpio: chardev: Return error for seek operations gpio: arizona: Tidy up probe error path gpio: arizona: Remove pointless set of platform drvdata gpio: pl061: delete platform data handling gpio: pl061: move platform data into driver gpio: pl061: rename variable from chip to pl061 gpio: pl061: rename state container struct gpio: pl061: use local state for parent IRQ storage gpio: set explicit nesting on drivers gpio: simplify adding threaded interrupts gpio: vf610: use builtin_platform_driver gpio: axp209: use correct register for GPIO input status gpio: stmpe: fix interrupt handling bug gpio: em: depnd on ARCH_SHMOBILE gpio: zx: depend on ARCH_ZX gpio: x86: update config dependencies for x86 specific hardware gpio: mb86s7x: use builtin_platform_driver gpio: etraxfs: use builtin_platform_driver ...
Diffstat (limited to 'tools')