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

  man pages->Tru64 Unix man pages -> destroy_pset (3)              



NAME    [Toc]    [Back]

       destroy_pset - Destroys a processor set

SYNOPSIS    [Toc]    [Back]

       #include <sys/types.h> #include <sys/processor.h>

       int destroy_pset(
               int pset_id,
               [1 | 0] );

LIBRARY    [Toc]    [Back]

       Pset Library (libpset)

       Mach Library (libmach)

PARAMETERS    [Toc]    [Back]

       Specifies  the identification number for the processor set
       that you want to  destroy.    The  pset_id  processor  set
       identification  number  is  returned  by a successful create_pset()
 call.  A second argument  may  be  required  if
       there  are threads or processors assigned to the processor
       set.  A value of 1 will force the destruction of the pset.
       A  value of 0 will not force destruction automatically but
       will first prompt the user.

DESCRIPTION    [Toc]    [Back]

       The destroy_pset() function destroys a processor  set.   A
       processor  that  belongs  to  a destroyed processor set is
       returned to the default processor set.  You must have root

RETURN VALUES    [Toc]    [Back]

       If the destroy_pset() function succeeds, it returns a zero
       (0). If it fails, it returns a negative number.  Use  this
       number  and  the  print_pset_error(3)  function to print a
       message that describes the error.

       Processor set destruction is logged in  the  /var/adm/wtmp

EXAMPLES    [Toc]    [Back]

       The following is example code for pset_destroy.c using the
       destroy_pset() call:

       retval = destroy_pset(pset_id, 0);
                if (retval == PROCESSOR_SET_ACTIVE) {
                        printf ("processor set %d has  active  ",
                        printf         ("processors/tasks/threads
       assigned to it.0);
                        printf ("destroy anyway? (y/n): ");
                        while ((char)c != 'y' && (char)c != 'n')
                                c = getchar();
                        if ((char)c == 'y') {
                                retval  =   destroy_pset(pset_id,
                                if (retval != KERN_SUCCESS) {

FILES    [Toc]    [Back]


SEE ALSO    [Toc]    [Back]

       create_pset(3),                     assign_cpu_to_pset(3),
       assign_pid_to_pset(3),     print_pset_error(3),    processor_sets(4), pset_create(1)

[ Back ]
 Similar pages
Name OS Title
assign_cpu_to_pset Tru64 Assigns a processor to a processor set
pset_assign_cpu Tru64 Assigns a processor to a processor set
pthread_mutex_destroy Tru64 Destroys a mutex
pthread_rwlockattr_destroy Tru64 Destroys a previously initialized
tis_cond_destroy Tru64 Destroys the specified condition variable
tis_mutex_destroy Tru64 Destroys the specified mutex object
EvmEventCreate Tru64 Creates and destroys events
dmColorDestroy IRIX destroys the color converter.
pthread_cond_destroy Tru64 Destroys a condition variable
BUF_LOCKFREE FreeBSD destroys a buffer's lock
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service