Query: rad_foreach
OS: osf1
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
rad_foreach(3) Library Functions Manual rad_foreach(3)NAMErad_foreach - Enumerates the members of a Resource Affinity Domain (libnuma library)SYNOPSIS#include <radset.h> rad_cursor_t cursor = SET_CURSOR_INIT; int rad_foreach( radset_t radset, int flags, radset_cursor_t *cursor );PARAMETERSSpecifies a set of Resource Affinity Domains (RADs) whose members are to be enumerated. Specifies one or more flags that control the pro- cessing of RAD members in the set. The following symbolic values are defined for flags: Initialize the cursor to the first member of the set before scanning. Wrap around to the beginning of the RAD set when scanning for members. Consume the set members; in other words, remove members from the set as they are found. Specifies an opaque type that records the position in a set for subsequent invocations of the rad_foreach() function.DESCRIPTIONThe rad_foreach() function scans the specified RAD set, starting at the position saved in cursor, for members of the set and returns the first member found. If the SET_CURSOR_FIRST flag is set, the cursor is initialized to the beginning of the set before starting the scan. If no members are found, the rad_foreach() function will return RAD_NONE. If the SET_CURSOR_WRAP flag is set, the scan will wrap from the end of the set to the beginning searching for a member to return. Other- wise, a one-pass scan is performed, and when the end of the set is reached, cursor()is left positioned at the end of the set. From then on, the rad_foreach() function will continue to return RAD_NONE until cursor is reinitialized, either by specifying the SET_CURSOR_FIRST flag or by specifying the SET_CURSOR_WRAP flag. If the SET_CURSOR_CONSUME flag is set, the member returned, if any, will be removed from the set. The cursor variable may be initialized to the value SET_CURSOR_INIT. This is equivalent to setting SET_CURSOR_FIRST on the initial call to rad_foreach().NOTESAlthough DESCRIPTION discusses the "beginning" and "end" of the set, and wrapping from the end to the beginning, RAD sets are conceptually unordered. Thus, these end points are arbitrary points in the set that exist to ensure that each member is returned only once per pass through the set. Applications should not depend on a numeric ordering of the returned member IDs.RETURN VALUESThis function returns either the next member in the RAD set, starting at the position in cursor, or RAD_NONE (if there is no next member). Execution of this function is always successful.ERRORSNone.EXAMPLESSee EXAMPLES in radsetops(3) for a sample program that uses the rad_foreach() function.SEE ALSOFunctions: numa_intro(3), radsetops(3) Files: numa_types(4) rad_foreach(3)
Related Man Pages |
---|
radaddset(3) - osf1 |
radcopyset(3) - osf1 |
radandset(3) - osf1 |
radfillset(3) - osf1 |
radorset(3) - osf1 |
Similar Topics in the Unix Linux Community |
---|
Throw my Toys out of the Pram! |
PHP Write Man Pages to MySQL DB |