Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Aug 1999 15:36:24 -0400 (EDT)
From:      Orignal <orignal@root.moose.ca>
To:        hackers@freebsd.org
Subject:   Stopped syscall
Message-ID:  <Pine.LNX.3.96.990824145623.4241A-100000@root>

next in thread | raw e-mail | index | archive | help

Gurus:

Here's the scenario: I'd like to be able to stop a process, call it (PID
42)  (or put it to sleep) while it is in kernel mode on a syscall and wake
it up later. The wakeup would be effected when another process (my own,
let's call it GO) traps to the kernel and tells it (through a function in
a KLD)  to let (PID 42) proceed or refuse it. The sleep channel for the
procs put to sleep (in this manner) would be unique to every proc.

1). If it is to proceed, where/how might I find the syscall args of the
original syscall PID 42 (presumably the u area). Is this in the
sysentvec?

2) How do I go about restarting the process (in kernel mode) where it (PID
42) left off and within it's own context, allowing the syscall to complete
(without, of course, letting it get back to userland)? I imagine that I
would need to temporarily restore the process context for (PID 42), allow
the syscall to complete and then restore the GO process syscall context so
that I can return to userland. After letting the syscall for PID 42
complete, I imagine that I would nedd to make it setrunnable.


If this is a completely stupid setup, please send flames via private mail.

Thanks!

Orig





To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.3.96.990824145623.4241A-100000>