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