macro LIBTEST_PAL_LOAD_LINKED

From liblfds.org
Revision as of 20:16, 17 February 2017 by Admin (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Source File

└───test_and_benchmark
    └───libtest
        └───inc
            └───libtest
                    libtest_porting_abstraction_layer_compiler.h

Macro

#define LIBTEST_PAL_LOAD_LINKED( destination, source )

Parameters

destination

A lfds711_pal_uint_t, which is set to the value of *source.

source

A lfds711_pal_uint_t *. The value pointed to by this argument is copied into destination.

Return Value

No return value.

Example

#define LIBTEST_PAL_LOAD_LINKED( destination, source )  \
{                                                       \
  __asm__ __volatile__                                  \
  (                                                     \
    "ldrex  %[alias_dst], [%[alias_src]];"              \
    : [alias_dst] "=r" (destination)                    \
    : [alias_src] "r" (source)                          \
  );                                                    \
}

Optionality

This macro is optional. If not provided, it must be absent, rather than defined empty. If this macro and LIBTEST_PAL_STORE_CONDITIONAL are implemented, the function libtest_misc_determine_erg can be used.

Notes

This macro implements the load-linked half of a load-linked/store-conditional pair. The value pointed to by source is link-loaded into desintation.

See Also