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

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