1*62c4d5a4Sbouyer /* $OpenBSD: pmon.h,v 1.2 2010/02/14 22:39:33 miod Exp $ */ 2*62c4d5a4Sbouyer 3*62c4d5a4Sbouyer /* 4*62c4d5a4Sbouyer * Copyright (c) 2009 Miodrag Vallat. 5*62c4d5a4Sbouyer * 6*62c4d5a4Sbouyer * Permission to use, copy, modify, and distribute this software for any 7*62c4d5a4Sbouyer * purpose with or without fee is hereby granted, provided that the above 8*62c4d5a4Sbouyer * copyright notice and this permission notice appear in all copies. 9*62c4d5a4Sbouyer * 10*62c4d5a4Sbouyer * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11*62c4d5a4Sbouyer * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12*62c4d5a4Sbouyer * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13*62c4d5a4Sbouyer * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14*62c4d5a4Sbouyer * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15*62c4d5a4Sbouyer * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16*62c4d5a4Sbouyer * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17*62c4d5a4Sbouyer */ 18*62c4d5a4Sbouyer 19*62c4d5a4Sbouyer #ifndef _MACHINE_PMON_H_ 20*62c4d5a4Sbouyer #define _MACHINE_PMON_H_ 21*62c4d5a4Sbouyer 22*62c4d5a4Sbouyer #if defined(_KERNEL) || defined(_STANDALONE) 23*62c4d5a4Sbouyer 24*62c4d5a4Sbouyer /* 25*62c4d5a4Sbouyer * PMON2000 callvec definitions 26*62c4d5a4Sbouyer */ 27*62c4d5a4Sbouyer 28*62c4d5a4Sbouyer /* 32-bit compatible types */ 29*62c4d5a4Sbouyer typedef uint32_t pmon_size_t; 30*62c4d5a4Sbouyer typedef int32_t pmon_ssize_t; 31*62c4d5a4Sbouyer typedef int64_t pmon_off_t; 32*62c4d5a4Sbouyer 33*62c4d5a4Sbouyer int pmon_open(const char *, int, ...); 34*62c4d5a4Sbouyer int pmon_close(int); 35*62c4d5a4Sbouyer int pmon_read(int, void *, pmon_size_t); 36*62c4d5a4Sbouyer pmon_ssize_t pmon_write(int, const void *, pmon_size_t); 37*62c4d5a4Sbouyer pmon_off_t pmon_lseek(int, pmon_off_t, int); 38*62c4d5a4Sbouyer int pmon_printf(const char *, ...); 39*62c4d5a4Sbouyer void pmon_cacheflush(void); 40*62c4d5a4Sbouyer char * pmon_gets(char *); 41*62c4d5a4Sbouyer 42*62c4d5a4Sbouyer #define PMON_MAXLN 256 /* internal gets() size limit */ 43*62c4d5a4Sbouyer 44*62c4d5a4Sbouyer extern int32_t pmon_callvec; 45*62c4d5a4Sbouyer 46*62c4d5a4Sbouyer const char *pmon_getarg(const int); 47*62c4d5a4Sbouyer const char *pmon_getenv(const char *); 48*62c4d5a4Sbouyer void pmon_init(int32_t, int32_t, int32_t, int32_t); 49*62c4d5a4Sbouyer 50*62c4d5a4Sbouyer #endif /* _KERNEL || _STANDALONE */ 51*62c4d5a4Sbouyer 52*62c4d5a4Sbouyer #endif /* _MACHINE_PMON_H_ */ 53