Deleted Added
full compact
freebsd32_misc.c (198506) freebsd32_misc.c (198507)
1/*-
2 * Copyright (c) 2002 Doug Rabson
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

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2002 Doug Rabson
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

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/compat/freebsd32/freebsd32_misc.c 198506 2009-10-27 10:42:24Z kib $");
28__FBSDID("$FreeBSD: head/sys/compat/freebsd32/freebsd32_misc.c 198507 2009-10-27 10:47:58Z kib $");
29
30#include "opt_compat.h"
31#include "opt_inet.h"
32#include "opt_inet6.h"
33
34#include <sys/param.h>
35#include <sys/bus.h>
36#include <sys/clock.h>

--- 2440 unchanged lines hidden (view full) ---

2477int
2478ofreebsd32_sigprocmask(struct thread *td,
2479 struct ofreebsd32_sigprocmask_args *uap)
2480{
2481 sigset_t set, oset;
2482 int error;
2483
2484 OSIG2SIG(uap->mask, set);
29
30#include "opt_compat.h"
31#include "opt_inet.h"
32#include "opt_inet6.h"
33
34#include <sys/param.h>
35#include <sys/bus.h>
36#include <sys/clock.h>

--- 2440 unchanged lines hidden (view full) ---

2477int
2478ofreebsd32_sigprocmask(struct thread *td,
2479 struct ofreebsd32_sigprocmask_args *uap)
2480{
2481 sigset_t set, oset;
2482 int error;
2483
2484 OSIG2SIG(uap->mask, set);
2485 error = kern_sigprocmask(td, uap->how, &set, &oset, 1);
2485 error = kern_sigprocmask(td, uap->how, &set, &oset, SIGPROCMASK_OLD);
2486 SIG2OSIG(oset, td->td_retval[0]);
2487 return (error);
2488}
2489
2490int
2491ofreebsd32_sigpending(struct thread *td,
2492 struct ofreebsd32_sigpending_args *uap)
2493{

--- 47 unchanged lines hidden (view full) ---

2541 }
2542 return (error);
2543}
2544
2545int
2546ofreebsd32_sigblock(struct thread *td,
2547 struct ofreebsd32_sigblock_args *uap)
2548{
2486 SIG2OSIG(oset, td->td_retval[0]);
2487 return (error);
2488}
2489
2490int
2491ofreebsd32_sigpending(struct thread *td,
2492 struct ofreebsd32_sigpending_args *uap)
2493{

--- 47 unchanged lines hidden (view full) ---

2541 }
2542 return (error);
2543}
2544
2545int
2546ofreebsd32_sigblock(struct thread *td,
2547 struct ofreebsd32_sigblock_args *uap)
2548{
2549 struct proc *p = td->td_proc;
2550 sigset_t set;
2549 sigset_t set, oset;
2551
2552 OSIG2SIG(uap->mask, set);
2550
2551 OSIG2SIG(uap->mask, set);
2553 SIG_CANTMASK(set);
2554 PROC_LOCK(p);
2555 SIG2OSIG(td->td_sigmask, td->td_retval[0]);
2556 SIGSETOR(td->td_sigmask, set);
2557 PROC_UNLOCK(p);
2552 kern_sigprocmask(td, SIG_BLOCK, &set, &oset, 0);
2553 SIG2OSIG(oset, td->td_retval[0]);
2558 return (0);
2559}
2560
2561int
2562ofreebsd32_sigsetmask(struct thread *td,
2563 struct ofreebsd32_sigsetmask_args *uap)
2564{
2554 return (0);
2555}
2556
2557int
2558ofreebsd32_sigsetmask(struct thread *td,
2559 struct ofreebsd32_sigsetmask_args *uap)
2560{
2565 struct proc *p = td->td_proc;
2566 sigset_t set;
2561 sigset_t set, oset;
2567
2568 OSIG2SIG(uap->mask, set);
2562
2563 OSIG2SIG(uap->mask, set);
2569 SIG_CANTMASK(set);
2570 PROC_LOCK(p);
2571 SIG2OSIG(td->td_sigmask, td->td_retval[0]);
2572 SIGSETLO(td->td_sigmask, set);
2573 signotify(td);
2574 PROC_UNLOCK(p);
2564 kern_sigprocmask(td, SIG_SETMASK, &set, &oset, 0);
2565 SIG2OSIG(oset, td->td_retval[0]);
2575 return (0);
2576}
2577
2578int
2579ofreebsd32_sigsuspend(struct thread *td,
2580 struct ofreebsd32_sigsuspend_args *uap)
2581{
2582 sigset_t mask;

--- 466 unchanged lines hidden ---
2566 return (0);
2567}
2568
2569int
2570ofreebsd32_sigsuspend(struct thread *td,
2571 struct ofreebsd32_sigsuspend_args *uap)
2572{
2573 sigset_t mask;

--- 466 unchanged lines hidden ---