linux_machdep.c (293493) | linux_machdep.c (293500) |
---|---|
1/*- 2 * Copyright (c) 2000 Marcel Moolenaar 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2000 Marcel Moolenaar 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: stable/10/sys/i386/linux/linux_machdep.c 293493 2016-01-09 15:16:13Z dchagin $"); | 30__FBSDID("$FreeBSD: stable/10/sys/i386/linux/linux_machdep.c 293500 2016-01-09 15:23:54Z dchagin $"); |
31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/capsicum.h> 35#include <sys/file.h> 36#include <sys/fcntl.h> 37#include <sys/imgact.h> 38#include <sys/lock.h> --- 1003 unchanged lines hidden (view full) --- 1042linux_mq_getsetattr(struct thread *td, struct linux_mq_getsetattr_args *args) 1043{ 1044#ifdef P1003_1B_MQUEUE 1045 return sys_kmq_setattr(td, (struct kmq_setattr_args *) args); 1046#else 1047 return (ENOSYS); 1048#endif 1049} | 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/capsicum.h> 35#include <sys/file.h> 36#include <sys/fcntl.h> 37#include <sys/imgact.h> 38#include <sys/lock.h> --- 1003 unchanged lines hidden (view full) --- 1042linux_mq_getsetattr(struct thread *td, struct linux_mq_getsetattr_args *args) 1043{ 1044#ifdef P1003_1B_MQUEUE 1045 return sys_kmq_setattr(td, (struct kmq_setattr_args *) args); 1046#else 1047 return (ENOSYS); 1048#endif 1049} |
1050 1051int 1052linux_wait4(struct thread *td, struct linux_wait4_args *args) 1053{ 1054 int error, options; 1055 struct rusage ru, *rup; 1056 1057#ifdef DEBUG 1058 if (ldebug(wait4)) 1059 printf(ARGS(wait4, "%d, %p, %d, %p"), 1060 args->pid, (void *)args->status, args->options, 1061 (void *)args->rusage); 1062#endif 1063 1064 options = (args->options & (WNOHANG | WUNTRACED)); 1065 /* WLINUXCLONE should be equal to __WCLONE, but we make sure */ 1066 if (args->options & __WCLONE) 1067 options |= WLINUXCLONE; 1068 1069 if (args->rusage != NULL) 1070 rup = &ru; 1071 else 1072 rup = NULL; 1073 error = linux_common_wait(td, args->pid, args->status, options, rup); 1074 if (error) 1075 return (error); 1076 if (args->rusage != NULL) 1077 error = copyout(&ru, args->rusage, sizeof(ru)); 1078 1079 return (error); 1080} | |