*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> rad_foreach (3)              
Title
Content
Arch
Section
 

rad_foreach(3)

Contents


NAME    [Toc]    [Back]

       rad_foreach  - Enumerates the members of a Resource Affinity
 Domain (libnuma library)

SYNOPSIS    [Toc]    [Back]

       #include <numa.h> rad_cursor_t cursor = SET_CURSOR_INIT;

       int rad_foreach(
               radset_t radset,
               unsigned int flags,
               radset_cursor_t *cursor );

PARAMETERS    [Toc]    [Back]

       Specifies a set of Resource Affinity Domains (RADs)  whose
       members are to be enumerated.  Specifies one or more flags
       that control the processing 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.

DESCRIPTION    [Toc]    [Back]

       The 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.  Otherwise,  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().

NOTES    [Toc]    [Back]

       Although  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 VALUES    [Toc]    [Back]

       This  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.

ERRORS    [Toc]    [Back]

       None.

EXAMPLES    [Toc]    [Back]

       See EXAMPLES in radsetops(3) for  a  sample  program  that
       uses the rad_foreach() function.

SEE ALSO    [Toc]    [Back]

      
      
       Functions: numa_intro(3), radsetops(3)

       Files: numa_types(4)



                                                   rad_foreach(3)
[ Back ]
 Similar pages
Name OS Title
rad_fork Tru64 Creates a new process on a Resource Affinity Domain (libnuma library)
rad_detach_pid Tru64 Detach a process from a Resource Affinity Domain by pid (libnuma library)
rad_get_current_home Tru64 Returns the caller's home Resource Affinity Domain (libnuma library)
rad_get_physmem Tru64 Query resource complements of a Resource Affinity Domain (libnuma)
rad_get_state Tru64 Query resource complements of a Resource Affinity Domain (libnuma)
rad_get_info Tru64 Query resource complements of a Resource Affinity Domain (libnuma)
rad_get_num Tru64 Query resource complements of a Resource Affinity Domain (libnuma)
rad_get_max Tru64 Query resource complements of a Resource Affinity Domain (libnuma)
rad_get_freemem Tru64 Query resource complements of a Resource Affinity Domain (libnuma)
rad_get_cpus Tru64 Query resource complements of a Resource Affinity Domain (libnuma)
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service