1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright (c) 2001 by Sun Microsystems, Inc. 24 * All rights reserved. 25 */ 26 27 #ifndef _RDUTIL_H 28 #define _RDUTIL_H 29 30 #pragma ident "%Z%%M% %I% %E% SMI" 31 32 #include <sys/processor.h> 33 #include <sys/types.h> 34 35 #include "rdimpl.h" 36 37 #ifdef __cplusplus 38 extern "C" { 39 #endif 40 41 #define RDS_MAXLINE 512 42 #define RDS_MAXLOG_FILE (1024 * 1024) 43 extern void format_err(char *, ...); 44 extern void dmerror(char *, ...); 45 extern void *Realloc(void *ptr, size_t size); 46 extern void *Malloc(size_t); 47 extern void *Zalloc(size_t); 48 extern void Free(void *ptr); 49 extern void list_alloc(list_t *, int); 50 extern void list_init(list_t *, int); 51 extern int Setrlimit(); 52 extern longlong_t get_timestamp(); 53 extern size_t ctok(pgcnt_t clicks); 54 extern void getusrname(int uid, char *name, int length); 55 extern void getprojname(projid_t projid, char *str, int len); 56 extern void napms(int ms); 57 extern void log_open(char *file); 58 extern void log_close(); 59 extern void log_msg(char *fmt, ...); 60 extern void log_err(char *fmt, ...); 61 extern void log_dumpf(char *file); 62 #ifdef __cplusplus 63 } 64 #endif 65 66 #endif /* _RDUTIL_H */ 67