'\"macro stdmacro .\" .\" Copyright (c) 2021 Red Hat. .\" .\" This program is free software; you can redistribute it and/or modify it .\" under the terms of the GNU General Public License as published by the .\" Free Software Foundation; either version 2 of the License, or (at your .\" option) any later version. .\" .\" This program is distributed in the hope that it will be useful, but .\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY .\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" for more details. .\" .\" .TH MMV_SET_VALUE 3 "" "Performance Co-Pilot" .SH NAME \f3mmv_set_value\f1 \- set a value in a Memory Mapped Value file .SH "C SYNOPSIS" .ft 3 #include .br #include .sp void mmv_set_value(void *\fIaddr\fP, pmAtomValue *\fIav\fP, double \fIval\fP); .br void mmv_set_atomvalue(void *\fIaddr\fP, pmAtomValue *\fIav\fP, pmAtomValue *\fIval\fP); .sp cc ... \-lpcp_mmv \-lpcp .ft 1 .SH DESCRIPTION \f3mmv_set_value\f1 and \f3mmv_set_atomvalue\f1 provide convenient ways of directly setting a value for a metric \f2av\f1 previously returned by the .BR mmv_lookup_value_desc (3) interface. \f2addr\f1 is the address returned from .BR mmv_stats_init (3). .P These interfaces are typically used with instantaneous and discrete metrics. Refer to .BR mmv_inc_value (3) for a mechanism suited to monotonic increasing counter metrics. .P With \f3mmv_set_atomvalue\f1 the value provided via the \f2inc\f1 pointer must match the type of the metric and will be used as the new value of the metric. .P In the case of \f3mmv_set_value\f1 the value \f2val\f1 is internally cast to match the type of the metric and then used as the value for the metric. .SH SEE ALSO .BR mmv_inc_value (3), .BR mmv_stats_init (3), .BR mmv_lookup_value_desc (3) and .BR mmv (5).