container_of is only used within OpenOCD.
 
Symbols
loading...
Files
loading...

container_of macro

Cast a member of a structure out to the containing structure. This is a mechanism which is used throughout the Linux kernel.

Syntax

#define container_of(ptr, type, member) ({ \     const typeof( ((type *)0)->member ) *__mptr = (ptr); \     (type *)( (void *) ( (char *)__mptr - offsetof(type,member) ) );})

Arguments

ptr

The pointer to the member.

type

The type of the container struct this is embedded in.

member

The name of the member within the struct.

References

LocationText
libusbi.h:55
#define container_of(ptr, type, member) \
types.h:68
#define container_of(ptr, type, member) ({ \
aarch64.h:67
return container_of(target->arch_info, struct aarch64_common, armv8_common.arm);
adi_v5_jtag.c:212
struct dap_cmd_pool *pool = container_of(cmd, struct dap_cmd_pool, cmd);
arm11.h:74
return container_of(target->arch_info, struct arm11_common, arm);
arm11_dbgtap.c:1005
return container_of(dpm, struct arm11_common, dpm);
arm720t.h:28
return container_of(target->arch_info, struct arm720t_common, arm7_9_common.arm);
arm7_9_common.h:127
return container_of(target->arch_info, struct arm7_9_common, arm);
arm920t.h:31
return container_of(target->arch_info, struct arm920t_common, arm7_9_common.arm);
arm926ejs.h:33
return container_of(target->arch_info, struct arm926ejs_common, arm7_9_common.arm);
arm946e.h:31
return container_of(target->arch_info, struct arm946e_common,
arm966e.h:28
return container_of(target->arch_info, struct arm966e_common,
arm_dap.c:56
struct arm_dap_object *obj = container_of(self, struct arm_dap_object, dap);
arm_dap.c:62
struct arm_dap_object *obj = container_of(self, struct arm_dap_object, dap);
armv7a.h:122
return container_of(target->arch_info, struct armv7a_common, arm);
armv7m.h:264
return container_of(target->arch_info, struct armv7m_common, arm);
armv8.h:238
return container_of(target->arch_info, struct armv8_common, arm);
cortex_a.c:330
return container_of(dpm, struct cortex_a_common, armv7a_common.dpm);
cortex_a.h:106
return container_of(target->arch_info, struct cortex_a_common, armv7a_common.arm);
cortex_m.h:290
return container_of(target->arch_info,
esp32.c:75
return container_of(target->arch_info, struct esp32_common, esp_xtensa_smp);
esp_xtensa.h:26
return container_of(target->arch_info, struct esp_xtensa_common, xtensa);
esp_xtensa_smp.c:65
return container_of(target->arch_info, struct esp_xtensa_smp_common, esp_xtensa);
libusbi.h:160
container_of(ptr, type, member)
list.h:125
#define list_entry(ptr, type, field) container_of(ptr, type, field)
mips_ejtag.c:262
struct mips32_common *mips32 = container_of(ejtag_info,
mips_m4k.h:31
return container_of(target->arch_info,
xscale.h:131
return container_of(target->arch_info, struct xscale_common, arm);
xtensa_chip.h:22
return container_of(target->arch_info, struct xtensa_chip_common, xtensa);