#include <arch/compiler-gcc.h>


Go to the source code of this file.
Defines | |
| #define | __noreturn __attribute__((noreturn)) |
| The function does not return. | |
| #define | __must_check __attribute__((warn_unused_result)) |
| The return value must be checked. | |
| #define | __packed __attribute__((packed)) |
| Pack structure contents. | |
| #define | __section(name) __attribute__((section(name))) |
| Place a function or data object in a specific section. | |
| #define | __weak __attribute__((weak)) |
| Mark a function or data object as weak. | |
| #define | __used __attribute__((used)) |
| Mark a function or data object as being used. | |
| #define | __always_inline inline __attribute__((always_inline)) |
| The function should always be inlined. | |
| #define | __printf_format(fmt_index, first_arg_index) __attribute__((format(printf, fmt_index, first_arg_index))) |
| The function takes a printf-like format string. | |
| #define | likely(exp) __builtin_expect(!!(exp), 1) |
| The expression exp is likely to be true. | |
| #define | unlikely(exp) __builtin_expect(!!(exp), 0) |
| The expression exp is unlikely to be true. | |
| #define | is_constant(exp) __builtin_constant_p(exp) |
| Determine if an expression evaluates to a constant value. | |
| #define | barrier() asm volatile("" ::: "memory") |
| Optimization barrier. | |
| #define | count_leading_zeroes(x) __builtin_clz(x) |
| Count Leading Zeroes. | |
| #define | min(x, y) |
| Get the lowest of two values. | |
| #define | max(x, y) |
| Get the highest of two values. | |
Definition in file gcc.h.
| #define __always_inline inline __attribute__((always_inline)) |
| #define __must_check __attribute__((warn_unused_result)) |
| #define __noreturn __attribute__((noreturn)) |
| struct usb_endpoint_descriptor __packed __attribute__((packed)) |
Pack structure contents.
A Command Status Wrapper (CSW).
This annotation causes the compiler to omit any padding from a struct normally inserted to keep its fields aligned for maximum efficiency.
Standard USB device descriptor.
Standard USB device qualifier descriptor. This contains information about the device when running at the "other" speed (i.e. if the device is currently operating at high speed, this descriptor can be used to determine what would change if the device was operating at full speed.)
Standard USB configuration descriptor.
Standard USB interface descriptor.
Standard USB endpoint descriptor.
| #define __printf_format | ( | fmt_index, | |||
| first_arg_index | ) | __attribute__((format(printf, fmt_index, first_arg_index))) |
| #define __section | ( | name | ) | __attribute__((section(name))) |
| #define __used __attribute__((used)) |
Mark a function or data object as being used.
The compiler will normally warn about functions or variables defined as static but not referenced anywhere. By annotating them with __used, the compiler will shut up and emit the symbol. This is useful when a symbol is only referenced by inline assembly code, for example.
| #define __weak __attribute__((weak)) |
| #define barrier | ( | ) | asm volatile("" ::: "memory") |
Optimization barrier.
This macro forces the compiler to reload any variables from memory. Local variables are left alone, unless they had their address taken at some point.
Definition at line 135 of file gcc.h.
Referenced by cpu_irq_restore(), ring_extract_entries(), ring_insert_entries(), softirq_disable(), udc_ep0_submit_in_req(), udc_ep0_submit_out_req(), udc_ep0_write_sync(), usbb_udc_submit_in_queue(), and usbb_udc_submit_out_queue().
| #define count_leading_zeroes | ( | x | ) | __builtin_clz(x) |
| #define is_constant | ( | exp | ) | __builtin_constant_p(exp) |
Determine if an expression evaluates to a constant value.
| exp | Any expression |
Definition at line 126 of file gcc.h.
Referenced by gpio_get_value(), gpio_set_value(), ilog2(), pm_priv_osc_startup(), portmux_enable_spi(), portmux_enable_usart(), and serial_console_init().
| #define likely | ( | exp | ) | __builtin_expect(!!(exp), 1) |
The expression exp is likely to be true.
Definition at line 113 of file gcc.h.
Referenced by block_alloc_request().
| #define max | ( | x, | |||
| y | ) |
| #define min | ( | x, | |||
| y | ) |
Value:
({ \
typeof(x) __x = (x); \
typeof(y) __y = (y); \
__x < __y ? __x : __y; \
})
| x | An integer | |
| y | Another integer |
Definition at line 151 of file gcc.h.
Referenced by console_drv_write(), sdmmc_mcihost_init(), udc_ep0_write_sync(), and usb_func_get_descriptor().
| #define unlikely | ( | exp | ) | __builtin_expect(!!(exp), 0) |
The expression exp is unlikely to be true.
Definition at line 117 of file gcc.h.
Referenced by aes_duplicate_buffer_refs(), aesblk_alloc_req(), msc_do_read(), msc_submit_read_buffers(), msc_submit_write_data_req(), and usbb_udc_dma_interrupt().
1.5.8