OpenOCD
container_of
is only used within OpenOCD.
Symbol previews are coming soon...
Symbols
loading...
Files
loading...
Summary
Syntax
Arguments
Examples
References
Call Tree
Data Use
Class Tree
Override Tree
Implementations
Instances
Lifecycle
SourceVu
Development Tools
OpenOCD
container_of
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
Show:
Summary
Declaration
from
types.h:68
#define
container_of
(
ptr
,
type
,
member
)
(
{
\
const
typeof
(
(
(
type
*
)
0
)
->
member
)
*
__mptr
=
(
ptr
)
;
\
(
type
*
)
(
(
void
*
)
(
(
char
*
)
__mptr
-
offsetof
(
type
,
member
)
)
)
;
}
)
Arguments
Argument
Description
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.
Examples
References
from
examples
Call Tree
from
examples
All items filtered out
All items filtered out
Data Use
from
examples
All items filtered out
All items filtered out
Class Tree
from
examples
All items filtered out
All items filtered out
Override Tree
from
examples
All items filtered out
All items filtered out
Implementations
from
examples
All items filtered out
All items filtered out
Instances
from
examples
Lifecycle
from
examples
All items filtered out
All items filtered out