[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 2

rs_discardname Subroutine

Purpose

Discards a resource set definition from the system resource set registry.

Library

Standard C library (libc.a)

Syntax

#include <sys/rset.h>
int rs_discardname(namespace, rsname)
char *namespace, *rsname;

Description

The rs_discardname subroutine discards from the system global repository the definition of the resource set. The resource set is identified by the namespace and rsname parameters. The specified resource set is removed from the registry, and can no longer be shared with other applcations.

In order to be able to discard a name from the global repository, the calling process must have root authority or attachment privilege, and an effective user ID equal to that of the rsname parameter's creator.

Parameters

namespace Points to a null terminated string corresponding to the name space within which rsname should be found.
rsname Points to a null terminated string corresponding to the name of a registered resource set to be discarded.

Return Values

If successful, a value of 0 is returned. Otherwise, a value of -1 is returned, and the errno global variable is set to indicate the error.

Error Codes

The rs_discardname subroutine is unsuccessful if one or more of the following are true:

EINVAL One of the following is true:
  • The rsname parameter contains a null value.
  • The namespace parameter contains a null value.
  • The rsname or namespace parameters point to an invalid name.
  • The name length is null or greater than the RSET_NAME_SIZE constant (defined in rset.h), or the name contains invalid characters.
EPERM One of the following is true:
  • The calling process has neither root authority nor CAP_NUMA_ATTACH priveleges.
  • The calling process has neither the same user ID as the creator of the rsname definition nor root authority .
  • The namespace parameter starts with sys. This name space is reserved for system use.
EFAULT Invalid address, and/or exceptions outside errno range.

Related Information

rs_getnameattr Subroutine, rs_registername Subroutine, and rs_getnamedrset Subroutine.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]