Blame src/libpfm-3.y/docs/man3/pfm_regmask_set.3

Packit Service a1973e
.TH LIBPFM 3  "Apr, 2006" "" "Linux Programmer's Manual"
Packit Service a1973e
.SH NAME
Packit Service a1973e
pfm_regmask_set, pfm_regmask_isset, pfm_regmask_clr, pfm_regmask_weight,
Packit Service a1973e
pfm_regmask_eq, pfm_regmask_and, pfm_regmask_or, pfm_regmask_copy
Packit Service a1973e
-\ operations on pfmlib_regmask_t bitmasks
Packit Service a1973e
.SH SYNOPSIS
Packit Service a1973e
.nf
Packit Service a1973e
.B #include <perfmon/pfmlib.h>
Packit Service a1973e
.sp
Packit Service a1973e
.BI "int pfm_regmask_isset(pfmlib_regmask_t *"mask ",  unsigned int "b ");"
Packit Service a1973e
.BI "int pfm_regmask_set(pfmlib_regmask_t *"mask ",  unsigned int "b ");"
Packit Service a1973e
.BI "int pfm_regmask_clr(pfmlib_regmask_t *"mask ",  unsigned int "b ");"
Packit Service a1973e
.BI "int pfm_regmask_weight(pfmlib_regmask_t *"mask ", unsigned int *"w ");"
Packit Service a1973e
.BI "int pfm_regmask_eq(pfmlib_regmask_t *"mask1 ", pfmlib_regmask_t *"mask2 ");"
Packit Service a1973e
.BI "int pfm_regmask_and(pfmlib_regmask_t *"dest ", pfmlib_regmask_t *"m1 ", pmlib_regmask_t *"m2 ");"
Packit Service a1973e
.BI "int pfm_regmask_or(pfmlib_regmask_t *"dest ", pfmlib_regmask_t *"m1 ", pmlib_regmask_t *"m2 ");"
Packit Service a1973e
.BI "int pfm_regmask_copy(pfmlib_regmask_t *"dest ", pfmlib_regmask_t *"src ");"
Packit Service a1973e
.sp
Packit Service a1973e
.SH DESCRIPTION
Packit Service a1973e
This set of function is used to operate of the \fBpfmlib_regmask_t\fR bitmasks
Packit Service a1973e
that are returned by certain functions or passed to the \fBpfm_dispatch_events()\fR function.
Packit Service a1973e
Packit Service a1973e
To ensure portability, it is important that applications use \fBonly\fR the 
Packit Service a1973e
functions specified here to access the bitmasks. It is strongly discouraged
Packit Service a1973e
to access the internal fields of the \fBpfm_regmask_t\fR structure.
Packit Service a1973e
Packit Service a1973e
The \fBpfm_regmask_set()\fR function is used to set bit \fBb\fR in the bitmask
Packit Service a1973e
\fBmask\fR.
Packit Service a1973e
Packit Service a1973e
The \fBpfm_regmask_clr()\fR function is used to clear bit \fBb\fR in the bitmask
Packit Service a1973e
\fBmask\fR.
Packit Service a1973e
Packit Service a1973e
The \fBpfm_regmask_isset()\fR function returns a non-zero value if \fBb\fR is set
Packit Service a1973e
in the bitmask \fBmask\fR.
Packit Service a1973e
Packit Service a1973e
The \fBpfm_regmask_weight()\fR function returns in \fBw\fR the number of bits set
Packit Service a1973e
in the bitmask \fBmask\fR.
Packit Service a1973e
Packit Service a1973e
The \fBpfm_regmask_eq()\fR function returns a non-zero value if the bitmasks
Packit Service a1973e
\fBmask1\fR and \fBmask2\fR are identical.
Packit Service a1973e
Packit Service a1973e
The \fBpfm_regmask_and()\fR function returns in bitmask \fBdest\fR the result of
Packit Service a1973e
the logical AND operation between bitmask \fBm1\fR and bitmask \fBm2\fR.
Packit Service a1973e
Packit Service a1973e
The \fBpfm_regmask_or()\fR function returns in bitmask \fBdest\fR the result of
Packit Service a1973e
the logical OR operation between bitmask \fBm1\fR and bitmask \fBm2\fR.
Packit Service a1973e
Packit Service a1973e
The \fBpfm_regmask_copy()\fR function copies bitmask \fBsrc\fR into bitmask
Packit Service a1973e
\fRdest\fR.
Packit Service a1973e
Packit Service a1973e
.SH RETURN
Packit Service a1973e
The function returns whether or not it was successful.
Packit Service a1973e
A return value of \fBPFMLIB_SUCCESS\fR indicates success, 
Packit Service a1973e
otherwise the value is the error code.
Packit Service a1973e
.SH ERRORS
Packit Service a1973e
.B PFMLIB_ERR_INVAL
Packit Service a1973e
the bit \fBb\fR exceeds the limit supported by the library
Packit Service a1973e
.SH AUTHOR
Packit Service a1973e
Stephane Eranian <eranian@hpl.hp.com>
Packit Service a1973e
.PP