Re: copy to user

From: Jan Hudec (bulb@ucw.cz)
Date: Wed Nov 21 2001 - 05:12:43 EST


> > I suppose now you can understand why SIGSTOP won't work. Hope you can help
> > me :)
>
> how about making a signal handler for SIGUSR1 that checks a global variable and
> loops. an other signal handler for SIGUSR2 to clear the variable so the SIGUSR1
> handler can exit.
>
> All in user space. (to delay execution kill -USR1 $pid, to continue: kill -USR2
> $pid)

The same is possible within the kernel too! Add default handler to some
unused signals (there are more user-defineable signals than SIGUSR[12]
and noone cares to install handler for them) to do the loop in kernel.
Just make sure, that you call shedule() from time to time in that loop,
because in kernel you can't be preempted as you would in user-space.

--------------------------------------------------------------------------------
                                                  - Jan Hudec `Bulb' <bulb@ucw.cz>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Nov 23 2001 - 21:00:26 EST