public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Jeff Garzik <jgarzik@mandrakesoft.com>
Cc: torvalds@transmeta.com, dhinds@valinux.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pcmcia event thread. (fwd)
Date: Mon, 13 Nov 2000 15:14:04 +0000	[thread overview]
Message-ID: <26373.974128444@redhat.com> (raw)
In-Reply-To: <3A10031B.79D8A9B5@mandrakesoft.com>
In-Reply-To: <3A10031B.79D8A9B5@mandrakesoft.com>  <3A0FF138.A510B45@mandrakesoft.com> <7572.974120930@redhat.com> <20554.974126251@redhat.com>


jgarzik@mandrakesoft.com said:
> Doh, totally forgot about that.  Will this work:
> 	save_current = current;
> 	current = find_task_by_pid(1);
> 	waitpid(...);
> 	current = save_current;

Changing the thread's parent to current->pid would be better than modifying 
current. Still sucks though.... 

> In any case, we -really- need a wait_for_kernel_thread_to_die()
> function. 

up_and_exit() would do it. Or preferably passing the address of the 
semaphore as an extra argument to kernel_thread() in the first place.

In the meantime, enough other places in the kernel have this same race that
I'm not too concerned about it. Hopefully, we'll get the extra arg to
kernel_thread before the final cut of 2.4, and this code can get converted
along with everything else.

> > +        spin_lock_irq(&current->sigmask_lock);
> > +        sigfillset(&current->blocked);
> > +        recalc_sigpending(current);
> > +        spin_unlock_irq(&current->sigmask_lock);

> what does this do?

Well, I _hope_ it blocks all signals, so that we can sleep in 
TASK_INTERRUPTIBLE without adding 1 to the load average, and without having 
to worry about the pesky things actually interrupting us.


jgarzik@mandrakesoft.com said:
> why do you store the event_thread_pid but never use it?

Because I got half way through doing waitpid() before I realised it was 
sucky. We store it short-term so we can print it. No reason why we can't 
shift the static declaration into init_pcmcia_cs() though.



--
dwmw2


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  parent reply	other threads:[~2000-11-13 15:14 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-13 13:08 [PATCH] pcmcia event thread. (fwd) David Woodhouse
2000-11-13 13:48 ` Jeff Garzik
2000-11-16 13:28   ` Alan Cox
2000-11-13 14:37 ` David Woodhouse
2000-11-13 15:04   ` Jeff Garzik
2000-11-13 15:14   ` David Woodhouse [this message]
2000-11-13 15:33     ` Jeff Garzik
2000-11-16 13:39       ` Alan Cox
2000-11-16 14:14         ` David Woodhouse
2000-11-16 16:28           ` Tobias Ringstrom
2000-11-18 11:24           ` Pavel Machek
2000-11-13 15:42     ` David Woodhouse
2000-11-13 18:59       ` David Hinds
2000-11-13 21:52         ` David Woodhouse
2000-11-13 21:57           ` David Hinds
2000-11-13 22:30         ` David Woodhouse
2000-11-13 22:47           ` Jeff Garzik
2000-01-01  2:54             ` Pavel Machek
2000-11-16 21:26               ` tytso
2000-11-16 21:42                 ` David Hinds
2000-11-13 23:04             ` David Woodhouse
2000-11-16 16:08             ` Alan Cox
2000-11-16 16:15               ` Jeff Garzik
2000-11-16 16:20                 ` Alan Cox
2000-11-17  0:51               ` Russell King
2000-11-17 10:54                 ` Alan Cox
2000-11-17 16:21                   ` Linus Torvalds
2000-11-17 16:29                     ` Alan Cox
2000-11-17 16:35                       ` Linus Torvalds
2000-11-17 16:39                         ` Alan Cox
2000-11-17 16:34                     ` Russell King
2000-11-17 16:17                 ` Linus Torvalds
2000-11-17 16:34                   ` David Woodhouse
2000-11-17 16:40                     ` Jeff Garzik
2000-11-17 16:47                       ` Linus Torvalds
2000-11-17 16:49                         ` David Woodhouse
2000-11-17 20:01                         ` David Hinds
2000-11-17 16:43                     ` David Woodhouse
2000-11-17 20:30                   ` 2.4's internal PCMCIA works for me (was Re: [PATCH] pcmcia event thread) Barry K. Nathan
2000-11-17 21:07                     ` David Hinds
2000-11-18  9:55                   ` [PATCH] pcmcia event thread. (fwd) David Ford
2000-11-18 16:03                     ` Linus Torvalds
2000-11-18 22:16                       ` David Hinds
2000-11-19  5:32                       ` David Ford
2000-11-19  5:36                         ` Linus Torvalds
2000-11-19  6:30                           ` [FIXED!] " David Ford
2000-11-19  7:03                             ` neighbour table? Andrew Park
2000-11-19  6:57                               ` David Ford
2000-11-19  7:45                                 ` Eric W. Biederman
2000-11-19 10:40                                   ` David Ford
2000-11-16 13:40       ` [PATCH] pcmcia event thread. (fwd) Alan Cox
2000-11-15  0:01   ` Russell King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=26373.974128444@redhat.com \
    --to=dwmw2@infradead.org \
    --cc=dhinds@valinux.com \
    --cc=jgarzik@mandrakesoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox