scripts/include/array_size.h

Source file repositories/reference/linux-study-clean/scripts/include/array_size.h

File Facts

System
Linux kernel
Corpus path
scripts/include/array_size.h
Extension
.h
Size
258 bytes
Lines
12
Domain
Support Tooling And Documentation
Bucket
scripts
Inferred role
Support Tooling And Documentation: implementation source
Status
source implementation candidate

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef ARRAY_SIZE_H
#define ARRAY_SIZE_H

/**
 * ARRAY_SIZE - get the number of elements in array @arr
 * @arr: array to be sized
 */
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))

#endif /* ARRAY_SIZE_H */

Annotation

Implementation Notes