Deleted Added
full compact
30c30
< __FBSDID("$FreeBSD: head/sys/compat/linux/linux_signal.c 158415 2006-05-10 20:38:16Z netchild $");
---
> __FBSDID("$FreeBSD: head/sys/compat/linux/linux_signal.c 161310 2006-08-15 12:54:30Z netchild $");
51a52
> #include <compat/linux/linux_emul.h>
52a54,56
> extern struct sx emul_shared_lock;
> extern struct sx emul_lock;
>
449a454,507
>
> int
> linux_tgkill(struct thread *td, struct linux_tgkill_args *args)
> {
> struct linux_emuldata *em;
> struct linux_kill_args ka;
> struct proc *p;
>
> #ifdef DEBUG
> if (ldebug(tgkill))
> printf(ARGS(tgkill, "%d, %d, %d"), args->tgid, args->pid, args->sig);
> #endif
>
> ka.pid = args->pid;
> ka.signum = args->sig;
>
> if (args->tgid == -1)
> return linux_kill(td, &ka);
>
> if ((p = pfind(args->pid)) == NULL)
> return ESRCH;
>
> if (p->p_sysent != &elf_linux_sysvec)
> return ESRCH;
>
> PROC_UNLOCK(p);
>
> em = em_find(p, EMUL_UNLOCKED);
>
> if (em == NULL) {
> #ifdef DEBUG
> printf("emuldata not found in tgkill.\n");
> #endif
> return ESRCH;
> }
>
> if (em->shared->group_pid != args->tgid)
> return ESRCH;
>
> EMUL_UNLOCK(&emul_lock);
>
> return linux_kill(td, &ka);
> }
>
> int
> linux_tkill(struct thread *td, struct linux_tkill_args *args)
> {
> #ifdef DEBUG
> if (ldebug(tkill))
> printf(ARGS(tkill, "%i, %i"), args->tid, args->sig);
> #endif
>
> return (linux_kill(td, (struct linux_kill_args *) args));
> }