Deleted Added
full compact
linux_signal.c (165867) linux_signal.c (165869)
1/*-
2 * Copyright (c) 1994-1995 S�ren Schmidt
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) 1994-1995 S�ren Schmidt
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: head/sys/compat/linux/linux_signal.c 165867 2007-01-07 19:00:38Z netchild $");
30__FBSDID("$FreeBSD: head/sys/compat/linux/linux_signal.c 165869 2007-01-07 19:14:06Z netchild $");
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/lock.h>
35#include <sys/mutex.h>
36#include <sys/sx.h>
37#include <sys/proc.h>
38#include <sys/signalvar.h>

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

556 if ((p = pfind(args->pid)) == NULL)
557 return ESRCH;
558
559 if (p->p_sysent != &elf_linux_sysvec)
560 return ESRCH;
561
562 PROC_UNLOCK(p);
563
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/lock.h>
35#include <sys/mutex.h>
36#include <sys/sx.h>
37#include <sys/proc.h>
38#include <sys/signalvar.h>

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

556 if ((p = pfind(args->pid)) == NULL)
557 return ESRCH;
558
559 if (p->p_sysent != &elf_linux_sysvec)
560 return ESRCH;
561
562 PROC_UNLOCK(p);
563
564 em = em_find(p, EMUL_DOLOCK);
564 em = em_find(p, EMUL_DONTLOCK);
565
566 if (em == NULL) {
567#ifdef DEBUG
568 printf("emuldata not found in tgkill.\n");
569#endif
570 return ESRCH;
571 }
572
573 if (em->shared->group_pid != args->tgid)
574 return ESRCH;
575
565
566 if (em == NULL) {
567#ifdef DEBUG
568 printf("emuldata not found in tgkill.\n");
569#endif
570 return ESRCH;
571 }
572
573 if (em->shared->group_pid != args->tgid)
574 return ESRCH;
575
576 EMUL_UNLOCK(&emul_lock);
577
578 return linux_kill(td, &ka);
579}
580
581int
582linux_tkill(struct thread *td, struct linux_tkill_args *args)
583{
584#ifdef DEBUG
585 if (ldebug(tkill))
586 printf(ARGS(tkill, "%i, %i"), args->tid, args->sig);
587#endif
588
589 return (linux_kill(td, (struct linux_kill_args *) args));
590}
576 return linux_kill(td, &ka);
577}
578
579int
580linux_tkill(struct thread *td, struct linux_tkill_args *args)
581{
582#ifdef DEBUG
583 if (ldebug(tkill))
584 printf(ARGS(tkill, "%i, %i"), args->tid, args->sig);
585#endif
586
587 return (linux_kill(td, (struct linux_kill_args *) args));
588}