Difference between pages "r7.1.1:Define LIBTEST PAL LOAD LINKED" and "r7.1.1:Function libbenchmark misc pal helper add logical processor node to topology tree"

From liblfds.org
(Difference between pages)
Jump to navigation Jump to search
m (1 revision imported)
 
m (1 revision imported)
 
Line 1: Line 1:
{{DISPLAYTITLE:macro LIBTEST_PAL_LOAD_LINKED}}
{{DISPLAYTITLE:function libbenchmark_misc_pal_helper_new_topology_node}}
==Source File==
==Source Files==
  └───test_and_benchmark
  └───test_and_benchmark
     └───libtest
     └───libbenchmark
         └───inc
         ├───inc
             └───libtest
        │  └───libbenchmark
                     libtest_porting_abstraction_layer_compiler.h
        │          libbenchmark_porting_abstraction_layer.h
        └───src
             └───libbenchmark_misc
                     libbenchmark_misc_pal_helpers.c


==Macro==
==Opaque Structures==
  #define LIBTEST_PAL_LOAD_LINKED( destination, source )
  struct [[r7.1.1:struct libbenchmark_topology_state|libbenchmark_topology_state]];
 
==Prototype==
void libbenchmark_misc_pal_helper_add_logical_processor_node_to_topology_tree( struct libbenchmark_topology_state *ts,
                                                                                lfds711_pal_uint_t logical_processor_number,
                                                                                enum flag windows_processor_group_inuse_flag,
                                                                                lfds711_pal_uint_t windows_processor_group_number );


==Parameters==
==Parameters==
''destination''
''struct libbenchmark_topology_state *ts''
: A ''lfds711_pal_uint_t'', which is set to the value of ''*source''.
: A pointer a ''struct libbenchmark_topology'' obtained from ''libbenchmark_pal_populate_topology''.
 
''lfds711_pal_uint_t logical_processor_number''
: The logical processor number of the logical processor to add to the topology tree pointed to by ''ts''.
 
''enum flag windows_processor_group_inuse_flag''
: An ''enum flag'' which indicates whether or not the ''windows_processor_group_number'' argument contains a valid value (for that field is only meaningful on Windows 7 and greater).


''source''
''lfds711_pal_uint_t windows_processor_group_number''
: A ''lfds711_pal_uint_t *''.  The value pointed to by this argument is copied into ''destination''.
: The Windows processor group number of the logical processor to add to the topology tree pointed to by ''ts''.  This value is only meaningful on Windows 7 and greater.  It will only be used if the ''windows_processor_group_inuse_flag'' is set to ''RAISED'', and so if not used, can be set to any value.  Zero is as good a choice as any other.


==Return Value==
==Return Value==
Line 21: Line 36:


==Example==
==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 [[r7.1.1:function libtest_misc_determine_erg|libtest_misc_determine_erg]] can be used.


==Notes==
==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.
This helper function is used by ''libbenchmark_pal_populate_topology'' to add a logical processor node to the topology tree.


==See Also==
==See Also==
* [[r7.1.1:Porting Guide (libtest)|Porting Guide (libtest)]]
* [[r7.1.1:Porting Guide (libbenchmark)|Porting Guide (libbenchmark)]]
* ''[[r7.1.1:function libbenchmark_pal_populate_topology|libbenchmark_pal_populate_topology]]''

Latest revision as of 20:16, 17 February 2017

Source Files

└───test_and_benchmark
    └───libbenchmark
        ├───inc
        │   └───libbenchmark
        │           libbenchmark_porting_abstraction_layer.h
        └───src
            └───libbenchmark_misc
                    libbenchmark_misc_pal_helpers.c

Opaque Structures

struct libbenchmark_topology_state;

Prototype

void libbenchmark_misc_pal_helper_add_logical_processor_node_to_topology_tree( struct libbenchmark_topology_state *ts,
                                                                               lfds711_pal_uint_t logical_processor_number,
                                                                               enum flag windows_processor_group_inuse_flag,
                                                                               lfds711_pal_uint_t windows_processor_group_number );

Parameters

struct libbenchmark_topology_state *ts

A pointer a struct libbenchmark_topology obtained from libbenchmark_pal_populate_topology.

lfds711_pal_uint_t logical_processor_number

The logical processor number of the logical processor to add to the topology tree pointed to by ts.

enum flag windows_processor_group_inuse_flag

An enum flag which indicates whether or not the windows_processor_group_number argument contains a valid value (for that field is only meaningful on Windows 7 and greater).

lfds711_pal_uint_t windows_processor_group_number

The Windows processor group number of the logical processor to add to the topology tree pointed to by ts. This value is only meaningful on Windows 7 and greater. It will only be used if the windows_processor_group_inuse_flag is set to RAISED, and so if not used, can be set to any value. Zero is as good a choice as any other.

Return Value

No return value.

Example

Notes

This helper function is used by libbenchmark_pal_populate_topology to add a logical processor node to the topology tree.

See Also