ibcs2_util.h (139799) | ibcs2_util.h (141488) |
---|---|
1/*- 2 * Copyright (c) 1994 Christos Zoulas 3 * Copyright (c) 1995 Frank van der Linden 4 * Copyright (c) 1995 Scott Bartram 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 15 unchanged lines hidden (view full) --- 24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * 29 * from: svr4_util.h,v 1.5 1994/11/18 02:54:31 christos Exp 30 * from: linux_util.h,v 1.2 1995/03/05 23:23:50 fvdl Exp 31 * | 1/*- 2 * Copyright (c) 1994 Christos Zoulas 3 * Copyright (c) 1995 Frank van der Linden 4 * Copyright (c) 1995 Scott Bartram 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 15 unchanged lines hidden (view full) --- 24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * 29 * from: svr4_util.h,v 1.5 1994/11/18 02:54:31 christos Exp 30 * from: linux_util.h,v 1.2 1995/03/05 23:23:50 fvdl Exp 31 * |
32 * $FreeBSD: head/sys/i386/ibcs2/ibcs2_util.h 139799 2005-01-06 23:22:04Z imp $ | 32 * $FreeBSD: head/sys/i386/ibcs2/ibcs2_util.h 141488 2005-02-07 22:02:18Z jhb $ |
33 */ 34 35/* 36 * This file is pretty much the same as Christos' svr4_util.h 37 * (for now). 38 */ 39 40#ifndef _IBCS2_UTIL_H_ --- 4 unchanged lines hidden (view full) --- 45 * included here. 46 */ 47#include <vm/vm.h> 48#include <vm/pmap.h> 49#include <machine/vmparam.h> 50#include <sys/exec.h> 51#include <sys/sysent.h> 52#include <sys/proc.h> | 33 */ 34 35/* 36 * This file is pretty much the same as Christos' svr4_util.h 37 * (for now). 38 */ 39 40#ifndef _IBCS2_UTIL_H_ --- 4 unchanged lines hidden (view full) --- 45 * included here. 46 */ 47#include <vm/vm.h> 48#include <vm/pmap.h> 49#include <machine/vmparam.h> 50#include <sys/exec.h> 51#include <sys/sysent.h> 52#include <sys/proc.h> |
53#include <sys/uio.h> |
|
53 54static __inline caddr_t stackgap_init(void); 55static __inline void *stackgap_alloc(caddr_t *, size_t); 56 57static __inline caddr_t 58stackgap_init() 59{ 60#define szsigcode (*(curthread->td_proc->p_sysent->sv_szsigcode)) --- 16 unchanged lines hidden (view full) --- 77#ifdef DEBUG_IBCS2 78#define DPRINTF(a) printf a; 79#else 80#define DPRINTF(a) 81#endif 82 83extern const char ibcs2_emul_path[]; 84 | 54 55static __inline caddr_t stackgap_init(void); 56static __inline void *stackgap_alloc(caddr_t *, size_t); 57 58static __inline caddr_t 59stackgap_init() 60{ 61#define szsigcode (*(curthread->td_proc->p_sysent->sv_szsigcode)) --- 16 unchanged lines hidden (view full) --- 78#ifdef DEBUG_IBCS2 79#define DPRINTF(a) printf a; 80#else 81#define DPRINTF(a) 82#endif 83 84extern const char ibcs2_emul_path[]; 85 |
85int ibcs2_emul_find(struct thread *, caddr_t *, const char *, char *, 86 char **, int); | 86int ibcs2_emul_find(struct thread *, char *, enum uio_seg, char **, int); |
87 | 87 |
88#define CHECKALTEXIST(p, sgp, path) \ 89 ibcs2_emul_find(td, sgp, ibcs2_emul_path, path, &(path), 0) | 88#define CHECKALT(td, upath, pathp, i) \ 89 do { \ 90 int _error; \ 91 \ 92 _error = ibcs2_emul_find(td, upath, UIO_USERSPACE, pathp, i); \ 93 if (*(pathp) == NULL) \ 94 return (_error); \ 95 } while (0) |
90 | 96 |
91#define CHECKALTCREAT(p, sgp, path) \ 92 ibcs2_emul_find(td, sgp, ibcs2_emul_path, path, &(path), 1) | 97#define CHECKALTEXIST(td, upath, pathp) CHECKALT(td, upath, pathp, 0) 98#define CHECKALTCREAT(td, upath, pathp) CHECKALT(td, upath, pathp, 1) |
93 94#ifdef SPX_HACK | 99 100#ifdef SPX_HACK |
95int spx_open(struct thread *td, void *uap); | 101int spx_open(struct thread *td); |
96#endif 97 98#endif /* !_IBCS2_UTIL_H_ */ | 102#endif 103 104#endif /* !_IBCS2_UTIL_H_ */ |