logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Author

       Generated automatically by Doxygen for DPDK from the source code.

DPDK                                             Version 24.11.2                                  rte_pause.h(3)

Detailed Description

       CPU pause operation.

       Definition in file rte_pause.h.

Function Documentation

staticvoidrte_pause(void)[inline],[static]
       Pause CPU execution for a short while

       This call is intended for tight loops which poll a shared resource or wait for an event. A short pause
       within the loop may reduce the power consumption.

   static__rte_always_inlinevoidrte_wait_until_equal_16(volatileuint16_t*addr,uint16_texpected,rte_memory_ordermemorder)[static]
       Wait for *addr to be updated with a 16-bit expected value, with a relaxed memory ordering model meaning
       the loads around this API can be reordered.

       Parametersaddr A pointer to the memory location.
           expected A 16-bit expected value to be in the memory location.
           memorder Two different memory orders that can be specified: rte_memory_order_acquire and
           rte_memory_order_relaxed.

       Definition at line 84 of file rte_pause.h.

   static__rte_always_inlinevoidrte_wait_until_equal_32(volatileuint32_t*addr,uint32_texpected,rte_memory_ordermemorder)[static]
       Wait for *addr to be updated with a 32-bit expected value, with a relaxed memory ordering model meaning
       the loads around this API can be reordered.

       Parametersaddr A pointer to the memory location.
           expected A 32-bit expected value to be in the memory location.
           memorder Two different memory orders that can be specified: rte_memory_order_acquire and
           rte_memory_order_relaxed.

       Definition at line 95 of file rte_pause.h.

   static__rte_always_inlinevoidrte_wait_until_equal_64(volatileuint64_t*addr,uint64_texpected,rte_memory_ordermemorder)[static]
       Wait for *addr to be updated with a 64-bit expected value, with a relaxed memory ordering model meaning
       the loads around this API can be reordered.

       Parametersaddr A pointer to the memory location.
           expected A 64-bit expected value to be in the memory location.
           memorder Two different memory orders that can be specified: rte_memory_order_acquire and
           rte_memory_order_relaxed.

       Definition at line 106 of file rte_pause.h.

Name

       rte_pause.h

Synopsis

       #include <stdint.h>
       #include <assert.h>
       #include <rte_common.h>
       #include <rte_atomic.h>
       #include <rte_stdatomic.h>

   Functions
       static void rte_pause (void)
       static __rte_always_inline void rte_wait_until_equal_16 (volatile uint16_t *addr, uint16_t expected,
           rte_memory_order memorder)
       static __rte_always_inline void rte_wait_until_equal_32 (volatile uint32_t *addr, uint32_t expected,
           rte_memory_order memorder)
       static __rte_always_inline void rte_wait_until_equal_64 (volatile uint64_t *addr, uint64_t expected,
           rte_memory_order memorder)

See Also