pr_waitid.c (5891:0d5c6468bb04) | pr_waitid.c (0:68f95e015346) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the | 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 (the "License"). 6 * You may not use this file except in compliance with the License. | 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. |
7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ | 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 */ |
21 | |
22/* | 22/* |
23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. | 23 * Copyright (c) 1998-2000 by Sun Microsystems, Inc. 24 * All rights reserved. |
25 */ 26 27#pragma ident "%Z%%M% %I% %E% SMI" 28 29#include <sys/isa_defs.h> 30 31#include <stdlib.h> 32#include <unistd.h> --- 5 unchanged lines hidden (view full) --- 38#include "P32ton.h" 39#include "libproc.h" 40 41/* 42 * waitid() system call -- executed by subject process 43 */ 44int 45pr_waitid(struct ps_prochandle *Pr, | 25 */ 26 27#pragma ident "%Z%%M% %I% %E% SMI" 28 29#include <sys/isa_defs.h> 30 31#include <stdlib.h> 32#include <unistd.h> --- 5 unchanged lines hidden (view full) --- 38#include "P32ton.h" 39#include "libproc.h" 40 41/* 42 * waitid() system call -- executed by subject process 43 */ 44int 45pr_waitid(struct ps_prochandle *Pr, |
46 idtype_t idtype, id_t id, siginfo_t *infop, int options) | 46 idtype_t idtype, id_t id, siginfo_t *infop, int options) |
47{ 48 sysret_t rval; /* return value from waitid() */ 49 argdes_t argd[4]; /* arg descriptors for waitid() */ 50 argdes_t *adp; 51 int error; 52#ifdef _LP64 53 siginfo32_t siginfo32; 54#endif /* _LP64 */ --- 34 unchanged lines hidden (view full) --- 89 90 adp++; /* options argument */ 91 adp->arg_value = options; 92 adp->arg_object = NULL; 93 adp->arg_type = AT_BYVAL; 94 adp->arg_inout = AI_INPUT; 95 adp->arg_size = 0; 96 | 47{ 48 sysret_t rval; /* return value from waitid() */ 49 argdes_t argd[4]; /* arg descriptors for waitid() */ 50 argdes_t *adp; 51 int error; 52#ifdef _LP64 53 siginfo32_t siginfo32; 54#endif /* _LP64 */ --- 34 unchanged lines hidden (view full) --- 89 90 adp++; /* options argument */ 91 adp->arg_value = options; 92 adp->arg_object = NULL; 93 adp->arg_type = AT_BYVAL; 94 adp->arg_inout = AI_INPUT; 95 adp->arg_size = 0; 96 |
97 error = Psyscall(Pr, &rval, SYS_waitid, 4, &argd[0]); | 97 error = Psyscall(Pr, &rval, SYS_waitsys, 4, &argd[0]); |
98 99 if (error) { 100 errno = (error > 0)? error : ENOSYS; 101 return (-1); 102 } 103#ifdef _LP64 104 if (Pstatus(Pr)->pr_dmodel == PR_MODEL_ILP32) 105 siginfo_32_to_n(&siginfo32, infop); 106#endif /* _LP64 */ 107 return (0); 108} | 98 99 if (error) { 100 errno = (error > 0)? error : ENOSYS; 101 return (-1); 102 } 103#ifdef _LP64 104 if (Pstatus(Pr)->pr_dmodel == PR_MODEL_ILP32) 105 siginfo_32_to_n(&siginfo32, infop); 106#endif /* _LP64 */ 107 return (0); 108} |