pmc_write Subroutine
Purpose
Writes a performance monitor control (PMC) in problem state.
Library
Performance Monitor APIs Library (libpmapi.a)
Syntax
#include <pmapi.h>
int _write (int reg_num, void *buffer)
Description
The pmc_write subroutine writes a PMC in problem state.
The function takes two parameters namely the Special Purpose Register (SPR) number of the PMC register into which the value is written and the address from where the value is written to the PMC SPR. The pmc_write subroutine writes the value of the address specified in the second argument into the register specified in the first argument.
Return Values
If the write operation is successful, a value of zero is returned. If the write operation fails, a value of -1 is returned.
Files
The pmapi.h file defines standard macros, data types, and subroutines.