1257097Srpaulo/*- 2257097Srpaulo * Copyright (c) 2006 Roman Divacky 3257097Srpaulo * All rights reserved. 4257097Srpaulo * 5257097Srpaulo * Redistribution and use in source and binary forms, with or without 6257097Srpaulo * modification, are permitted provided that the following conditions 7257097Srpaulo * are met: 8257097Srpaulo * 1. Redistributions of source code must retain the above copyright 9257097Srpaulo * notice, this list of conditions and the following disclaimer 10257097Srpaulo * in this position and unchanged. 11257097Srpaulo * 2. Redistributions in binary form must reproduce the above copyright 12257097Srpaulo * notice, this list of conditions and the following disclaimer in the 13257097Srpaulo * documentation and/or other materials provided with the distribution. 14257097Srpaulo * 3. The name of the author may not be used to endorse or promote products 15257097Srpaulo * derived from this software without specific prior written permission 16257097Srpaulo * 17257097Srpaulo * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18257097Srpaulo * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19257097Srpaulo * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20257097Srpaulo * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21257097Srpaulo * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22257097Srpaulo * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23257097Srpaulo * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24257097Srpaulo * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25257097Srpaulo * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26257097Srpaulo * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27257097Srpaulo * 28257097Srpaulo * $FreeBSD$ 29257097Srpaulo */ 30257097Srpaulo 31257097Srpaulo#ifndef _LINUX_MISC_H_ 32257097Srpaulo#define _LINUX_MISC_H_ 33257097Srpaulo 34257097Srpaulo/* defines for prctl */ 35257097Srpaulo#define LINUX_PR_SET_PDEATHSIG 1 /* Second arg is a signal. */ 36257097Srpaulo#define LINUX_PR_GET_PDEATHSIG 2 /* 37257097Srpaulo * Second arg is a ptr to return the 38257097Srpaulo * signal. 39257097Srpaulo */ 40257097Srpaulo#define LINUX_PR_GET_KEEPCAPS 7 /* Get drop capabilities on setuid */ 41257097Srpaulo#define LINUX_PR_SET_KEEPCAPS 8 /* Set drop capabilities on setuid */ 42257097Srpaulo#define LINUX_PR_SET_NAME 15 /* Set process name. */ 43257097Srpaulo#define LINUX_PR_GET_NAME 16 /* Get process name. */ 44257097Srpaulo 45257097Srpaulo#define LINUX_MAX_COMM_LEN 16 /* Maximum length of the process name. */ 46257097Srpaulo 47257097Srpaulo#define LINUX_MREMAP_MAYMOVE 1 48257097Srpaulo#define LINUX_MREMAP_FIXED 2 49257097Srpaulo 50257097Srpauloextern const char *linux_platform; 51257097Srpaulo 52257097Srpaulo/* 53257097Srpaulo * Non-standard aux entry types used in Linux ELF binaries. 54257097Srpaulo */ 55257097Srpaulo 56257097Srpaulo#define LINUX_AT_PLATFORM 15 /* String identifying CPU */ 57#define LINUX_AT_HWCAP 16 /* CPU capabilities */ 58#define LINUX_AT_CLKTCK 17 /* frequency at which times() increments */ 59#define LINUX_AT_SECURE 23 /* secure mode boolean */ 60#define LINUX_AT_BASE_PLATFORM 24 /* string identifying real platform, may 61 * differ from AT_PLATFORM. 62 */ 63#define LINUX_AT_EXECFN 31 /* filename of program */ 64 65/* Linux sets the i387 to extended precision. */ 66#if defined(__i386__) || defined(__amd64__) 67#define __LINUX_NPXCW__ 0x37f 68#endif 69 70extern int stclohz; 71 72#define __WCLONE 0x80000000 73 74int linux_common_wait(struct thread *td, int pid, int *status, 75 int options, struct rusage *ru); 76 77#endif /* _LINUX_MISC_H_ */ 78