1955d762aSAlexander Leidinger /*- 2955d762aSAlexander Leidinger * Copyright (c) 2006 Roman Divacky 3955d762aSAlexander Leidinger * All rights reserved. 4955d762aSAlexander Leidinger * 5955d762aSAlexander Leidinger * Redistribution and use in source and binary forms, with or without 6955d762aSAlexander Leidinger * modification, are permitted provided that the following conditions 7955d762aSAlexander Leidinger * are met: 8955d762aSAlexander Leidinger * 1. Redistributions of source code must retain the above copyright 9955d762aSAlexander Leidinger * notice, this list of conditions and the following disclaimer 10955d762aSAlexander Leidinger * in this position and unchanged. 11955d762aSAlexander Leidinger * 2. Redistributions in binary form must reproduce the above copyright 12955d762aSAlexander Leidinger * notice, this list of conditions and the following disclaimer in the 13955d762aSAlexander Leidinger * documentation and/or other materials provided with the distribution. 14955d762aSAlexander Leidinger * 3. The name of the author may not be used to endorse or promote products 15955d762aSAlexander Leidinger * derived from this software without specific prior written permission 16955d762aSAlexander Leidinger * 17955d762aSAlexander Leidinger * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18955d762aSAlexander Leidinger * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19955d762aSAlexander Leidinger * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20955d762aSAlexander Leidinger * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21955d762aSAlexander Leidinger * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22955d762aSAlexander Leidinger * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23955d762aSAlexander Leidinger * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24955d762aSAlexander Leidinger * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25955d762aSAlexander Leidinger * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26955d762aSAlexander Leidinger * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27955d762aSAlexander Leidinger * 28955d762aSAlexander Leidinger * $FreeBSD$ 29955d762aSAlexander Leidinger */ 30955d762aSAlexander Leidinger 31955d762aSAlexander Leidinger #ifndef _LINUX_MISC_H_ 32955d762aSAlexander Leidinger #define _LINUX_MISC_H_ 33955d762aSAlexander Leidinger 34955d762aSAlexander Leidinger /* defines for prctl */ 35ef95cfeaSAlexander Leidinger #define LINUX_PR_SET_PDEATHSIG 1 /* Second arg is a signal. */ 36ef95cfeaSAlexander Leidinger #define LINUX_PR_GET_PDEATHSIG 2 /* 37ef95cfeaSAlexander Leidinger * Second arg is a ptr to return the 38ef95cfeaSAlexander Leidinger * signal. 39ef95cfeaSAlexander Leidinger */ 40*605da56bSAndriy Gapon #define LINUX_PR_GET_KEEPCAPS 7 /* Get drop capabilities on setuid */ 41*605da56bSAndriy Gapon #define LINUX_PR_SET_KEEPCAPS 8 /* Set drop capabilities on setuid */ 42ef95cfeaSAlexander Leidinger #define LINUX_PR_SET_NAME 15 /* Set process name. */ 43ef95cfeaSAlexander Leidinger #define LINUX_PR_GET_NAME 16 /* Get process name. */ 44955d762aSAlexander Leidinger 45ef95cfeaSAlexander Leidinger #define LINUX_MAX_COMM_LEN 16 /* Maximum length of the process name. */ 46955d762aSAlexander Leidinger 47cbd2c621SKonstantin Belousov #define LINUX_MREMAP_MAYMOVE 1 48cbd2c621SKonstantin Belousov #define LINUX_MREMAP_FIXED 2 49cbd2c621SKonstantin Belousov 504d7c2e8aSDmitry Chagin extern const char *linux_platform; 514d7c2e8aSDmitry Chagin 524d7c2e8aSDmitry Chagin /* 534d7c2e8aSDmitry Chagin * Non-standard aux entry types used in Linux ELF binaries. 544d7c2e8aSDmitry Chagin */ 554d7c2e8aSDmitry Chagin 564d7c2e8aSDmitry Chagin #define LINUX_AT_PLATFORM 15 /* String identifying CPU */ 574d7c2e8aSDmitry Chagin #define LINUX_AT_HWCAP 16 /* CPU capabilities */ 584d7c2e8aSDmitry Chagin #define LINUX_AT_CLKTCK 17 /* frequency at which times() increments */ 594d7c2e8aSDmitry Chagin #define LINUX_AT_SECURE 23 /* secure mode boolean */ 604d7c2e8aSDmitry Chagin #define LINUX_AT_BASE_PLATFORM 24 /* string identifying real platform, may 614d7c2e8aSDmitry Chagin * differ from AT_PLATFORM. 624d7c2e8aSDmitry Chagin */ 634d7c2e8aSDmitry Chagin #define LINUX_AT_EXECFN 31 /* filename of program */ 644d7c2e8aSDmitry Chagin 652ee8325fSJohn Baldwin /* Linux sets the i387 to extended precision. */ 662ee8325fSJohn Baldwin #if defined(__i386__) || defined(__amd64__) 672ee8325fSJohn Baldwin #define __LINUX_NPXCW__ 0x37f 682ee8325fSJohn Baldwin #endif 692ee8325fSJohn Baldwin 701ca16454SDmitry Chagin extern int stclohz; 711ca16454SDmitry Chagin 72adc7ece0SDmitry Chagin #define __WCLONE 0x80000000 73adc7ece0SDmitry Chagin 74adc7ece0SDmitry Chagin int linux_common_wait(struct thread *td, int pid, int *status, 75adc7ece0SDmitry Chagin int options, struct rusage *ru); 76adc7ece0SDmitry Chagin 77955d762aSAlexander Leidinger #endif /* _LINUX_MISC_H_ */ 78